Coverage Report

Created: 2026-11-02 11:38

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exprs/aggregate/aggregate_function_topk.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
18
#pragma once
19
20
#include <algorithm>
21
#include <atomic>
22
#include <cstdint>
23
#include <limits>
24
#include <memory>
25
#include <random>
26
#include <type_traits>
27
#include <utility>
28
29
#include "common/check.h"
30
#include "common/compare.h"
31
#include "common/exception.h"
32
#include "core/assert_cast.h"
33
#include "core/column/column.h"
34
#include "core/column/column_array.h"
35
#include "core/column/column_decimal.h"
36
#include "core/column/column_nullable.h"
37
#include "core/column/column_string.h"
38
#include "core/column/column_struct.h"
39
#include "core/column/column_vector.h"
40
#include "core/custom_allocator.h"
41
#include "core/data_type/data_type.h"
42
#include "core/data_type/data_type_array.h"
43
#include "core/data_type/data_type_nullable.h"
44
#include "core/data_type/data_type_number.h"
45
#include "core/data_type/data_type_struct.h"
46
#include "core/data_type/primitive_type.h"
47
#include "core/memcmp_small.h"
48
#include "core/pod_array.h"
49
#include "core/string_buffer.hpp"
50
#include "core/string_ref.h"
51
#include "core/types.h"
52
#include "exprs/aggregate/aggregate_function.h"
53
54
namespace doris {
55
56
/// A string payload's position in its state's arena.
57
struct StringSpan {
58
    size_t offset = 0;
59
    size_t length = 0;
60
};
61
62
/// The bytes of one group's string values. A StringRef cannot be stored in a slot: the arena
63
/// reallocates and would invalidate the pointers, so a slot keeps a span instead and materializes a
64
/// view on access. Fixed-width value types inherit EmptyTopKArena instead, so this costs them
65
/// nothing.
66
struct StringTopKArena {
67
    /// The initial allocation is small on purpose: the arena grows with the bytes actually retained,
68
    /// unlike a Doris column's container, whose PaddedPODArray allocates a 4 KiB initial chunk as
69
    /// soon as it holds one value.
70
    /// PaddedPODArray, not PODArray: comparisons go through memcmp_small_allow_overflow15, which
71
    /// loads a full 16-byte vector even for a one-byte string, the same tail allowance
72
    /// ColumnString's chars buffer provides.
73
    PaddedPODArray<char, 32> bytes;
74
    // Sum of the live slots' payload and of the payload evicted since the last compaction. The
75
    // slot counters alone cannot bound the memory: replacing 1024 1 MiB strings with short ones
76
    // leaves dead == live by slot count while ~1 GiB of discarded bytes stay in the arena.
77
    size_t live_payload_bytes = 0;
78
    size_t dead_payload_bytes = 0;
79
};
80
81
/// The payload holder of a fixed-width value type: its values live in their slots, so its states
82
/// own no arena at all.
83
struct EmptyTopKArena {};
84
85
/// A per-state seed for the treap priorities. A fixed sequence is predictable from the input: an
86
/// adversarial input can feed the n-th generated priority as the n-th smallest value, making the
87
/// value order match the priority order and turning the treap into a chain of depth n. The
88
/// process-random base and the counter keep the sequence independent of the data.
89
663
inline uint32_t next_topk_priority_seed() {
90
663
    static std::atomic<uint32_t> counter {0};
91
663
    static const uint32_t base = [] {
92
2
        std::random_device device;
93
2
        return static_cast<uint32_t>(device());
94
2
    }();
95
663
    uint32_t z = base + counter.fetch_add(1, std::memory_order_relaxed) * 0x9E3779B9U;
96
663
    z = (z ^ (z >> 16)) * 0x21F0AAADU;
97
663
    z = (z ^ (z >> 15)) * 0x735A2D97U;
98
663
    return z ^ (z >> 15);
99
663
}
100
101
/**
102
 * State shared by min_topk and max_topk, for one value type.
103
 *
104
 * The distinct values sit in slots (see the stores above), with one Slot record per value carrying
105
 * the row count and the links of a treap ordered best-first (ascending values for MIN, descending
106
 * for MAX). A row costs one O(log k) descent: it either finds its value and bumps the count or
107
 * links a new slot at the leaf. A sorted vector would shift O(k) elements for the same insert.
108
 *
109
 * The treap stores explicit child links because, unlike a heap, its shape is not the complete tree
110
 * that an array index can describe: rotations move entries, and the in-order sequence is the value
111
 * order rather than the arrival order. A heap could evict and append in O(log k), but it cannot
112
 * find an existing value without a hash index or a linear scan, and it cannot produce the sorted
113
 * result without sorting. The ordered tree is the structure that keeps find, insert and eviction
114
 * all at O(log k) with comparisons only.
115
 *
116
 * An entry that is evicted keeps its slot and value until the next compaction. The tree never
117
 * points at a dead slot.
118
 *
119
 * With k == 0 the state holds at most the single extreme value and its row count; the caller
120
 * derives truncation from the list length, so the state carries no separate bound.
121
 */
122
template <PrimitiveType T>
123
struct AggregateTopKCountData
124
        : std::conditional_t<is_string_type(T), StringTopKArena, EmptyTopKArena> {
125
    using CppType = typename PrimitiveTypeTraits<T>::CppType;
126
    static constexpr bool IS_STRING = is_string_type(T);
127
    /// A value as the state stores it: the value itself for fixed-width types, the span of its
128
    /// bytes in the arena for strings.
129
    using Payload = std::conditional_t<IS_STRING, StringSpan, CppType>;
130
    /// A value read out of a state: a view valid until that state's arena changes.
131
    using ValueRef = std::conditional_t<IS_STRING, StringRef, const CppType&>;
132
    /// A value copied out of a state, for building the sorted list a rebuild starts from.
133
    using ValueCopy = std::conditional_t<IS_STRING, StringRef, CppType>;
134
135
    static constexpr int32_t NO_SLOT = -1;
136
    // Row counts are never negative, so this cannot collide with a live entry.
137
    static constexpr int64_t DEAD_COUNT = -1;
138
139
    /// One running value: its count, its payload and its treap links. Keeping the payload in the
140
    /// slot is what makes a group cost one heap allocation instead of two: the slot array carries
141
    /// the values with it.
142
    struct Slot {
143
        int64_t count = 0;
144
        int32_t left = NO_SLOT;
145
        int32_t right = NO_SLOT;
146
        uint32_t priority = 0;
147
        Payload payload {};
148
    };
149
150
    /// One (value, count) entry of the sorted list a state is rebuilt from.
151
    struct Entry {
152
        ValueCopy value {};
153
        int64_t count = 0;
154
    };
155
156
    // k is the aggregate's count argument, which is never negative, so -1 can stand in for "this
157
    // partial state has not seen its first row yet" and the state needs no separate flag.
158
    static constexpr int64_t NO_K = -1;
159
    int64_t k = NO_K;
160
    // Indexed by slot; an evicted slot stays as a dead entry until compaction.
161
    DorisVector<Slot> slots;
162
    int32_t root = NO_SLOT;
163
    // The last live slot in the aggregate's order: the value an incoming row has to beat to enter
164
    // a full list. Cached so that rejecting a worse value costs one comparison, not a descent.
165
    int32_t worst = NO_SLOT;
166
    // Both counters are bounded by the slot count, which the int32_t links already cap, so 32 bits
167
    // are enough; keeping them (and the seed) 32-bit is what holds the state to 56 bytes.
168
    uint32_t live = 0;
169
    // Slots evicted since the last compaction.
170
    uint32_t dead = 0;
171
    uint32_t rng = next_topk_priority_seed();
172
173
663
    AggregateTopKCountData() = default;
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE2EEC2Ev
_ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE3EEC2Ev
Line
Count
Source
173
1
    AggregateTopKCountData() = default;
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE4EEC2Ev
_ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE5EEC2Ev
Line
Count
Source
173
451
    AggregateTopKCountData() = default;
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE6EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE7EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE8EEC2Ev
_ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE9EEC2Ev
Line
Count
Source
173
10
    AggregateTopKCountData() = default;
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE28EEC2Ev
_ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE29EEC2Ev
Line
Count
Source
173
68
    AggregateTopKCountData() = default;
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE20EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE30EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE35EEC2Ev
_ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE10EEC2Ev
Line
Count
Source
173
87
    AggregateTopKCountData() = default;
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE11EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE12EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE25EEC2Ev
_ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE26EEC2Ev
Line
Count
Source
173
46
    AggregateTopKCountData() = default;
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE27EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE43EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE42EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE36EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE37EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE44EEC2Ev
174
    AggregateTopKCountData(const AggregateTopKCountData&) = delete;
175
    AggregateTopKCountData& operator=(const AggregateTopKCountData&) = delete;
176
};
177
178
/**
179
 * min_topk(x, k) / max_topk(x, k).
180
 *
181
 * Result: ARRAY<STRUCT<value T, count BIGINT>>. NULL inputs are ignored: add validates k for
182
 * every row and then skips a NULL x, so the aggregate deliberately does not use the
183
 * nullable-argument wrapper. The array is ordered by value (ascending for MIN), holds at most k
184
 * distinct values with count > 0, and carries no truncation flag: the caller infers it from the
185
 * length (a list of exactly k entries is treated as possibly truncated).
186
 *
187
 * With k = 0 the array holds at most the extreme value and its row count, which lets the
188
 * append-only IVM path compute MIN/MAX from the delta extreme alone.
189
 */
190
template <PrimitiveType T, bool IsMin>
191
class AggregateFunctionTopK final
192
        : public IAggregateFunctionDataHelper<AggregateTopKCountData<T>,
193
                                              AggregateFunctionTopK<T, IsMin>, false>,
194
          public MultiExpression,
195
          public NotNullableAggregateFunction {
196
public:
197
    using State = AggregateTopKCountData<T>;
198
    using Base = IAggregateFunctionDataHelper<State, AggregateFunctionTopK<T, IsMin>, false>;
199
    using Slot = typename State::Slot;
200
    using Payload = typename State::Payload;
201
    using ValueRef = typename State::ValueRef;
202
    using ValueCopy = typename State::ValueCopy;
203
    using Entry = typename State::Entry;
204
    using ColumnType = typename PrimitiveTypeTraits<T>::ColumnType;
205
    static constexpr bool IS_STRING = State::IS_STRING;
206
    static constexpr int32_t NO_SLOT = State::NO_SLOT;
207
208
116
    explicit AggregateFunctionTopK(const DataTypes& argument_types_) : Base(argument_types_) {
209
116
        DCHECK_EQ(argument_types_.size(), 2);
210
116
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
208
1
    explicit AggregateFunctionTopK(const DataTypes& argument_types_) : Base(argument_types_) {
209
        DCHECK_EQ(argument_types_.size(), 2);
210
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
208
48
    explicit AggregateFunctionTopK(const DataTypes& argument_types_) : Base(argument_types_) {
209
        DCHECK_EQ(argument_types_.size(), 2);
210
48
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
208
2
    explicit AggregateFunctionTopK(const DataTypes& argument_types_) : Base(argument_types_) {
209
        DCHECK_EQ(argument_types_.size(), 2);
210
2
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
208
4
    explicit AggregateFunctionTopK(const DataTypes& argument_types_) : Base(argument_types_) {
209
        DCHECK_EQ(argument_types_.size(), 2);
210
4
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
208
14
    explicit AggregateFunctionTopK(const DataTypes& argument_types_) : Base(argument_types_) {
209
        DCHECK_EQ(argument_types_.size(), 2);
210
14
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
208
2
    explicit AggregateFunctionTopK(const DataTypes& argument_types_) : Base(argument_types_) {
209
        DCHECK_EQ(argument_types_.size(), 2);
210
2
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
208
32
    explicit AggregateFunctionTopK(const DataTypes& argument_types_) : Base(argument_types_) {
209
        DCHECK_EQ(argument_types_.size(), 2);
210
32
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
208
2
    explicit AggregateFunctionTopK(const DataTypes& argument_types_) : Base(argument_types_) {
209
        DCHECK_EQ(argument_types_.size(), 2);
210
2
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
208
4
    explicit AggregateFunctionTopK(const DataTypes& argument_types_) : Base(argument_types_) {
209
        DCHECK_EQ(argument_types_.size(), 2);
210
4
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
208
5
    explicit AggregateFunctionTopK(const DataTypes& argument_types_) : Base(argument_types_) {
209
        DCHECK_EQ(argument_types_.size(), 2);
210
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
208
2
    explicit AggregateFunctionTopK(const DataTypes& argument_types_) : Base(argument_types_) {
209
        DCHECK_EQ(argument_types_.size(), 2);
210
2
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
211
212
1
    String get_name() const override { return IsMin ? "min_topk" : "max_topk"; }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE8get_nameB5cxx11Ev
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE8get_nameB5cxx11Ev
Line
Count
Source
212
1
    String get_name() const override { return IsMin ? "min_topk" : "max_topk"; }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE8get_nameB5cxx11Ev
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE8get_nameB5cxx11Ev
213
214
234
    DataTypePtr get_return_type() const override {
215
234
        return make_return_type(remove_nullable(this->argument_types[0]));
216
234
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE15get_return_typeEv
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE15get_return_typeEv
Line
Count
Source
214
4
    DataTypePtr get_return_type() const override {
215
4
        return make_return_type(remove_nullable(this->argument_types[0]));
216
4
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE15get_return_typeEv
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE15get_return_typeEv
Line
Count
Source
214
98
    DataTypePtr get_return_type() const override {
215
98
        return make_return_type(remove_nullable(this->argument_types[0]));
216
98
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE15get_return_typeEv
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE15get_return_typeEv
Line
Count
Source
214
5
    DataTypePtr get_return_type() const override {
215
5
        return make_return_type(remove_nullable(this->argument_types[0]));
216
5
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE15get_return_typeEv
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE15get_return_typeEv
Line
Count
Source
214
10
    DataTypePtr get_return_type() const override {
215
10
        return make_return_type(remove_nullable(this->argument_types[0]));
216
10
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE15get_return_typeEv
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE15get_return_typeEv
Line
Count
Source
214
21
    DataTypePtr get_return_type() const override {
215
21
        return make_return_type(remove_nullable(this->argument_types[0]));
216
21
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE15get_return_typeEv
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE15get_return_typeEv
Line
Count
Source
214
5
    DataTypePtr get_return_type() const override {
215
5
        return make_return_type(remove_nullable(this->argument_types[0]));
216
5
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE15get_return_typeEv
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE15get_return_typeEv
Line
Count
Source
214
60
    DataTypePtr get_return_type() const override {
215
60
        return make_return_type(remove_nullable(this->argument_types[0]));
216
60
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE15get_return_typeEv
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE15get_return_typeEv
Line
Count
Source
214
5
    DataTypePtr get_return_type() const override {
215
5
        return make_return_type(remove_nullable(this->argument_types[0]));
216
5
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE15get_return_typeEv
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE15get_return_typeEv
Line
Count
Source
214
10
    DataTypePtr get_return_type() const override {
215
10
        return make_return_type(remove_nullable(this->argument_types[0]));
216
10
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE15get_return_typeEv
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE15get_return_typeEv
Line
Count
Source
214
11
    DataTypePtr get_return_type() const override {
215
11
        return make_return_type(remove_nullable(this->argument_types[0]));
216
11
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE15get_return_typeEv
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE15get_return_typeEv
Line
Count
Source
214
5
    DataTypePtr get_return_type() const override {
215
5
        return make_return_type(remove_nullable(this->argument_types[0]));
216
5
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE15get_return_typeEv
217
218
    void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num,
219
20.8k
             Arena& arena) const override {
220
20.8k
        auto& state = Base::data(place);
221
        // k is read for every row, including rows where x is NULL: an evaluated count that is
222
        // NULL or out of range must fail the query instead of being skipped like a NULL value.
223
20.8k
        check_k(state, *columns[1], row_num);
224
20.8k
        const IColumn* value_column = columns[0];
225
20.8k
        if (const auto* nullable = check_and_get_column<ColumnNullable>(value_column)) {
226
526
            if (nullable->is_null_at(row_num)) {
227
81
                return;
228
81
            }
229
445
            value_column = &nullable->get_nested_column();
230
445
        }
231
20.7k
        add_value(state, *value_column, row_num);
232
20.7k
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
219
1
             Arena& arena) const override {
220
1
        auto& state = Base::data(place);
221
        // k is read for every row, including rows where x is NULL: an evaluated count that is
222
        // NULL or out of range must fail the query instead of being skipped like a NULL value.
223
1
        check_k(state, *columns[1], row_num);
224
1
        const IColumn* value_column = columns[0];
225
1
        if (const auto* nullable = check_and_get_column<ColumnNullable>(value_column)) {
226
0
            if (nullable->is_null_at(row_num)) {
227
0
                return;
228
0
            }
229
0
            value_column = &nullable->get_nested_column();
230
0
        }
231
1
        add_value(state, *value_column, row_num);
232
1
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
219
10.4k
             Arena& arena) const override {
220
10.4k
        auto& state = Base::data(place);
221
        // k is read for every row, including rows where x is NULL: an evaluated count that is
222
        // NULL or out of range must fail the query instead of being skipped like a NULL value.
223
10.4k
        check_k(state, *columns[1], row_num);
224
10.4k
        const IColumn* value_column = columns[0];
225
10.4k
        if (const auto* nullable = check_and_get_column<ColumnNullable>(value_column)) {
226
159
            if (nullable->is_null_at(row_num)) {
227
25
                return;
228
25
            }
229
134
            value_column = &nullable->get_nested_column();
230
134
        }
231
10.3k
        add_value(state, *value_column, row_num);
232
10.3k
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
219
5
             Arena& arena) const override {
220
5
        auto& state = Base::data(place);
221
        // k is read for every row, including rows where x is NULL: an evaluated count that is
222
        // NULL or out of range must fail the query instead of being skipped like a NULL value.
223
5
        check_k(state, *columns[1], row_num);
224
5
        const IColumn* value_column = columns[0];
225
5
        if (const auto* nullable = check_and_get_column<ColumnNullable>(value_column)) {
226
5
            if (nullable->is_null_at(row_num)) {
227
0
                return;
228
0
            }
229
5
            value_column = &nullable->get_nested_column();
230
5
        }
231
5
        add_value(state, *value_column, row_num);
232
5
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
219
44
             Arena& arena) const override {
220
44
        auto& state = Base::data(place);
221
        // k is read for every row, including rows where x is NULL: an evaluated count that is
222
        // NULL or out of range must fail the query instead of being skipped like a NULL value.
223
44
        check_k(state, *columns[1], row_num);
224
44
        const IColumn* value_column = columns[0];
225
44
        if (const auto* nullable = check_and_get_column<ColumnNullable>(value_column)) {
226
44
            if (nullable->is_null_at(row_num)) {
227
6
                return;
228
6
            }
229
38
            value_column = &nullable->get_nested_column();
230
38
        }
231
38
        add_value(state, *value_column, row_num);
232
38
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
219
93
             Arena& arena) const override {
220
93
        auto& state = Base::data(place);
221
        // k is read for every row, including rows where x is NULL: an evaluated count that is
222
        // NULL or out of range must fail the query instead of being skipped like a NULL value.
223
93
        check_k(state, *columns[1], row_num);
224
93
        const IColumn* value_column = columns[0];
225
93
        if (const auto* nullable = check_and_get_column<ColumnNullable>(value_column)) {
226
44
            if (nullable->is_null_at(row_num)) {
227
4
                return;
228
4
            }
229
40
            value_column = &nullable->get_nested_column();
230
40
        }
231
89
        add_value(state, *value_column, row_num);
232
89
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
219
22
             Arena& arena) const override {
220
22
        auto& state = Base::data(place);
221
        // k is read for every row, including rows where x is NULL: an evaluated count that is
222
        // NULL or out of range must fail the query instead of being skipped like a NULL value.
223
22
        check_k(state, *columns[1], row_num);
224
22
        const IColumn* value_column = columns[0];
225
22
        if (const auto* nullable = check_and_get_column<ColumnNullable>(value_column)) {
226
22
            if (nullable->is_null_at(row_num)) {
227
8
                return;
228
8
            }
229
14
            value_column = &nullable->get_nested_column();
230
14
        }
231
14
        add_value(state, *value_column, row_num);
232
14
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
219
10.1k
             Arena& arena) const override {
220
10.1k
        auto& state = Base::data(place);
221
        // k is read for every row, including rows where x is NULL: an evaluated count that is
222
        // NULL or out of range must fail the query instead of being skipped like a NULL value.
223
10.1k
        check_k(state, *columns[1], row_num);
224
10.1k
        const IColumn* value_column = columns[0];
225
10.1k
        if (const auto* nullable = check_and_get_column<ColumnNullable>(value_column)) {
226
137
            if (nullable->is_null_at(row_num)) {
227
20
                return;
228
20
            }
229
117
            value_column = &nullable->get_nested_column();
230
117
        }
231
10.1k
        add_value(state, *value_column, row_num);
232
10.1k
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
219
5
             Arena& arena) const override {
220
5
        auto& state = Base::data(place);
221
        // k is read for every row, including rows where x is NULL: an evaluated count that is
222
        // NULL or out of range must fail the query instead of being skipped like a NULL value.
223
5
        check_k(state, *columns[1], row_num);
224
5
        const IColumn* value_column = columns[0];
225
5
        if (const auto* nullable = check_and_get_column<ColumnNullable>(value_column)) {
226
5
            if (nullable->is_null_at(row_num)) {
227
0
                return;
228
0
            }
229
5
            value_column = &nullable->get_nested_column();
230
5
        }
231
5
        add_value(state, *value_column, row_num);
232
5
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
219
44
             Arena& arena) const override {
220
44
        auto& state = Base::data(place);
221
        // k is read for every row, including rows where x is NULL: an evaluated count that is
222
        // NULL or out of range must fail the query instead of being skipped like a NULL value.
223
44
        check_k(state, *columns[1], row_num);
224
44
        const IColumn* value_column = columns[0];
225
44
        if (const auto* nullable = check_and_get_column<ColumnNullable>(value_column)) {
226
44
            if (nullable->is_null_at(row_num)) {
227
6
                return;
228
6
            }
229
38
            value_column = &nullable->get_nested_column();
230
38
        }
231
38
        add_value(state, *value_column, row_num);
232
38
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
219
48
             Arena& arena) const override {
220
48
        auto& state = Base::data(place);
221
        // k is read for every row, including rows where x is NULL: an evaluated count that is
222
        // NULL or out of range must fail the query instead of being skipped like a NULL value.
223
48
        check_k(state, *columns[1], row_num);
224
48
        const IColumn* value_column = columns[0];
225
48
        if (const auto* nullable = check_and_get_column<ColumnNullable>(value_column)) {
226
44
            if (nullable->is_null_at(row_num)) {
227
4
                return;
228
4
            }
229
40
            value_column = &nullable->get_nested_column();
230
40
        }
231
44
        add_value(state, *value_column, row_num);
232
44
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Line
Count
Source
219
22
             Arena& arena) const override {
220
22
        auto& state = Base::data(place);
221
        // k is read for every row, including rows where x is NULL: an evaluated count that is
222
        // NULL or out of range must fail the query instead of being skipped like a NULL value.
223
22
        check_k(state, *columns[1], row_num);
224
22
        const IColumn* value_column = columns[0];
225
22
        if (const auto* nullable = check_and_get_column<ColumnNullable>(value_column)) {
226
22
            if (nullable->is_null_at(row_num)) {
227
8
                return;
228
8
            }
229
14
            value_column = &nullable->get_nested_column();
230
14
        }
231
14
        add_value(state, *value_column, row_num);
232
14
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
233
234
    void merge(AggregateDataPtr __restrict place, ConstAggregateDataPtr rhs,
235
202
               Arena&) const override {
236
202
        auto& state = Base::data(place);
237
202
        const auto& other = Base::data(rhs);
238
        // A partial state without a k never saw any row, so it carries no information.
239
202
        if (other.k == State::NO_K) {
240
0
            return;
241
0
        }
242
202
        if (state.k == State::NO_K) {
243
106
            state.k = other.k;
244
106
        } else if (UNLIKELY(state.k != other.k)) {
245
            // Ordinary partial/final aggregation always shares the same constant k, but the
246
            // public _state/_merge/_union combinators do not encode k in the AggState type, so a
247
            // UNION ALL of states built with different literal k can reach this merge.
248
1
            throw Exception(ErrorCode::INVALID_ARGUMENT,
249
1
                            "{} states have incompatible counts: {} vs {}", get_name(), state.k,
250
1
                            other.k);
251
1
        }
252
201
        if (state.k == 0) {
253
18
            merge_extreme(state, other);
254
18
            return;
255
18
        }
256
183
        merge_values(state, other);
257
183
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE5mergeEPcPKcRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE5mergeEPcPKcRNS_5ArenaE
Line
Count
Source
235
76
               Arena&) const override {
236
76
        auto& state = Base::data(place);
237
76
        const auto& other = Base::data(rhs);
238
        // A partial state without a k never saw any row, so it carries no information.
239
76
        if (other.k == State::NO_K) {
240
0
            return;
241
0
        }
242
76
        if (state.k == State::NO_K) {
243
41
            state.k = other.k;
244
41
        } else if (UNLIKELY(state.k != other.k)) {
245
            // Ordinary partial/final aggregation always shares the same constant k, but the
246
            // public _state/_merge/_union combinators do not encode k in the AggState type, so a
247
            // UNION ALL of states built with different literal k can reach this merge.
248
1
            throw Exception(ErrorCode::INVALID_ARGUMENT,
249
1
                            "{} states have incompatible counts: {} vs {}", get_name(), state.k,
250
1
                            other.k);
251
1
        }
252
75
        if (state.k == 0) {
253
9
            merge_extreme(state, other);
254
9
            return;
255
9
        }
256
66
        merge_values(state, other);
257
66
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE5mergeEPcPKcRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE5mergeEPcPKcRNS_5ArenaE
Line
Count
Source
235
2
               Arena&) const override {
236
2
        auto& state = Base::data(place);
237
2
        const auto& other = Base::data(rhs);
238
        // A partial state without a k never saw any row, so it carries no information.
239
2
        if (other.k == State::NO_K) {
240
0
            return;
241
0
        }
242
2
        if (state.k == State::NO_K) {
243
1
            state.k = other.k;
244
1
        } else if (UNLIKELY(state.k != other.k)) {
245
            // Ordinary partial/final aggregation always shares the same constant k, but the
246
            // public _state/_merge/_union combinators do not encode k in the AggState type, so a
247
            // UNION ALL of states built with different literal k can reach this merge.
248
0
            throw Exception(ErrorCode::INVALID_ARGUMENT,
249
0
                            "{} states have incompatible counts: {} vs {}", get_name(), state.k,
250
0
                            other.k);
251
0
        }
252
2
        if (state.k == 0) {
253
0
            merge_extreme(state, other);
254
0
            return;
255
0
        }
256
2
        merge_values(state, other);
257
2
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE5mergeEPcPKcRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE5mergeEPcPKcRNS_5ArenaE
Line
Count
Source
235
11
               Arena&) const override {
236
11
        auto& state = Base::data(place);
237
11
        const auto& other = Base::data(rhs);
238
        // A partial state without a k never saw any row, so it carries no information.
239
11
        if (other.k == State::NO_K) {
240
0
            return;
241
0
        }
242
11
        if (state.k == State::NO_K) {
243
6
            state.k = other.k;
244
6
        } else if (UNLIKELY(state.k != other.k)) {
245
            // Ordinary partial/final aggregation always shares the same constant k, but the
246
            // public _state/_merge/_union combinators do not encode k in the AggState type, so a
247
            // UNION ALL of states built with different literal k can reach this merge.
248
0
            throw Exception(ErrorCode::INVALID_ARGUMENT,
249
0
                            "{} states have incompatible counts: {} vs {}", get_name(), state.k,
250
0
                            other.k);
251
0
        }
252
11
        if (state.k == 0) {
253
0
            merge_extreme(state, other);
254
0
            return;
255
0
        }
256
11
        merge_values(state, other);
257
11
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE5mergeEPcPKcRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE5mergeEPcPKcRNS_5ArenaE
Line
Count
Source
235
18
               Arena&) const override {
236
18
        auto& state = Base::data(place);
237
18
        const auto& other = Base::data(rhs);
238
        // A partial state without a k never saw any row, so it carries no information.
239
18
        if (other.k == State::NO_K) {
240
0
            return;
241
0
        }
242
18
        if (state.k == State::NO_K) {
243
6
            state.k = other.k;
244
12
        } else if (UNLIKELY(state.k != other.k)) {
245
            // Ordinary partial/final aggregation always shares the same constant k, but the
246
            // public _state/_merge/_union combinators do not encode k in the AggState type, so a
247
            // UNION ALL of states built with different literal k can reach this merge.
248
0
            throw Exception(ErrorCode::INVALID_ARGUMENT,
249
0
                            "{} states have incompatible counts: {} vs {}", get_name(), state.k,
250
0
                            other.k);
251
0
        }
252
18
        if (state.k == 0) {
253
0
            merge_extreme(state, other);
254
0
            return;
255
0
        }
256
18
        merge_values(state, other);
257
18
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE5mergeEPcPKcRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE5mergeEPcPKcRNS_5ArenaE
Line
Count
Source
235
9
               Arena&) const override {
236
9
        auto& state = Base::data(place);
237
9
        const auto& other = Base::data(rhs);
238
        // A partial state without a k never saw any row, so it carries no information.
239
9
        if (other.k == State::NO_K) {
240
0
            return;
241
0
        }
242
9
        if (state.k == State::NO_K) {
243
5
            state.k = other.k;
244
5
        } else if (UNLIKELY(state.k != other.k)) {
245
            // Ordinary partial/final aggregation always shares the same constant k, but the
246
            // public _state/_merge/_union combinators do not encode k in the AggState type, so a
247
            // UNION ALL of states built with different literal k can reach this merge.
248
0
            throw Exception(ErrorCode::INVALID_ARGUMENT,
249
0
                            "{} states have incompatible counts: {} vs {}", get_name(), state.k,
250
0
                            other.k);
251
0
        }
252
9
        if (state.k == 0) {
253
0
            merge_extreme(state, other);
254
0
            return;
255
0
        }
256
9
        merge_values(state, other);
257
9
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE5mergeEPcPKcRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE5mergeEPcPKcRNS_5ArenaE
Line
Count
Source
235
53
               Arena&) const override {
236
53
        auto& state = Base::data(place);
237
53
        const auto& other = Base::data(rhs);
238
        // A partial state without a k never saw any row, so it carries no information.
239
53
        if (other.k == State::NO_K) {
240
0
            return;
241
0
        }
242
53
        if (state.k == State::NO_K) {
243
29
            state.k = other.k;
244
29
        } else if (UNLIKELY(state.k != other.k)) {
245
            // Ordinary partial/final aggregation always shares the same constant k, but the
246
            // public _state/_merge/_union combinators do not encode k in the AggState type, so a
247
            // UNION ALL of states built with different literal k can reach this merge.
248
0
            throw Exception(ErrorCode::INVALID_ARGUMENT,
249
0
                            "{} states have incompatible counts: {} vs {}", get_name(), state.k,
250
0
                            other.k);
251
0
        }
252
53
        if (state.k == 0) {
253
9
            merge_extreme(state, other);
254
9
            return;
255
9
        }
256
44
        merge_values(state, other);
257
44
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE5mergeEPcPKcRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE5mergeEPcPKcRNS_5ArenaE
Line
Count
Source
235
2
               Arena&) const override {
236
2
        auto& state = Base::data(place);
237
2
        const auto& other = Base::data(rhs);
238
        // A partial state without a k never saw any row, so it carries no information.
239
2
        if (other.k == State::NO_K) {
240
0
            return;
241
0
        }
242
2
        if (state.k == State::NO_K) {
243
1
            state.k = other.k;
244
1
        } else if (UNLIKELY(state.k != other.k)) {
245
            // Ordinary partial/final aggregation always shares the same constant k, but the
246
            // public _state/_merge/_union combinators do not encode k in the AggState type, so a
247
            // UNION ALL of states built with different literal k can reach this merge.
248
0
            throw Exception(ErrorCode::INVALID_ARGUMENT,
249
0
                            "{} states have incompatible counts: {} vs {}", get_name(), state.k,
250
0
                            other.k);
251
0
        }
252
2
        if (state.k == 0) {
253
0
            merge_extreme(state, other);
254
0
            return;
255
0
        }
256
2
        merge_values(state, other);
257
2
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE5mergeEPcPKcRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE5mergeEPcPKcRNS_5ArenaE
Line
Count
Source
235
11
               Arena&) const override {
236
11
        auto& state = Base::data(place);
237
11
        const auto& other = Base::data(rhs);
238
        // A partial state without a k never saw any row, so it carries no information.
239
11
        if (other.k == State::NO_K) {
240
0
            return;
241
0
        }
242
11
        if (state.k == State::NO_K) {
243
6
            state.k = other.k;
244
6
        } else if (UNLIKELY(state.k != other.k)) {
245
            // Ordinary partial/final aggregation always shares the same constant k, but the
246
            // public _state/_merge/_union combinators do not encode k in the AggState type, so a
247
            // UNION ALL of states built with different literal k can reach this merge.
248
0
            throw Exception(ErrorCode::INVALID_ARGUMENT,
249
0
                            "{} states have incompatible counts: {} vs {}", get_name(), state.k,
250
0
                            other.k);
251
0
        }
252
11
        if (state.k == 0) {
253
0
            merge_extreme(state, other);
254
0
            return;
255
0
        }
256
11
        merge_values(state, other);
257
11
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE5mergeEPcPKcRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE5mergeEPcPKcRNS_5ArenaE
Line
Count
Source
235
11
               Arena&) const override {
236
11
        auto& state = Base::data(place);
237
11
        const auto& other = Base::data(rhs);
238
        // A partial state without a k never saw any row, so it carries no information.
239
11
        if (other.k == State::NO_K) {
240
0
            return;
241
0
        }
242
11
        if (state.k == State::NO_K) {
243
6
            state.k = other.k;
244
6
        } else if (UNLIKELY(state.k != other.k)) {
245
            // Ordinary partial/final aggregation always shares the same constant k, but the
246
            // public _state/_merge/_union combinators do not encode k in the AggState type, so a
247
            // UNION ALL of states built with different literal k can reach this merge.
248
0
            throw Exception(ErrorCode::INVALID_ARGUMENT,
249
0
                            "{} states have incompatible counts: {} vs {}", get_name(), state.k,
250
0
                            other.k);
251
0
        }
252
11
        if (state.k == 0) {
253
0
            merge_extreme(state, other);
254
0
            return;
255
0
        }
256
11
        merge_values(state, other);
257
11
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE5mergeEPcPKcRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE5mergeEPcPKcRNS_5ArenaE
Line
Count
Source
235
9
               Arena&) const override {
236
9
        auto& state = Base::data(place);
237
9
        const auto& other = Base::data(rhs);
238
        // A partial state without a k never saw any row, so it carries no information.
239
9
        if (other.k == State::NO_K) {
240
0
            return;
241
0
        }
242
9
        if (state.k == State::NO_K) {
243
5
            state.k = other.k;
244
5
        } else if (UNLIKELY(state.k != other.k)) {
245
            // Ordinary partial/final aggregation always shares the same constant k, but the
246
            // public _state/_merge/_union combinators do not encode k in the AggState type, so a
247
            // UNION ALL of states built with different literal k can reach this merge.
248
0
            throw Exception(ErrorCode::INVALID_ARGUMENT,
249
0
                            "{} states have incompatible counts: {} vs {}", get_name(), state.k,
250
0
                            other.k);
251
0
        }
252
9
        if (state.k == 0) {
253
0
            merge_extreme(state, other);
254
0
            return;
255
0
        }
256
9
        merge_values(state, other);
257
9
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE5mergeEPcPKcRNS_5ArenaE
258
259
194
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
260
194
        const auto& state = Base::data(place);
261
        // The serialized form keeps the historical flag byte: it is derived from k in the state.
262
194
        buf.write_binary(state.k != State::NO_K);
263
194
        buf.write_binary(state.k);
264
        // The slots are in arrival order and may include dead ones, while the serialized form is
265
        // the sorted (value, count) list the reader rebuilds the tree from.
266
194
        DorisVector<int32_t> order;
267
194
        collect_in_order(state, order);
268
194
        auto sorted_values = remove_nullable(this->argument_types[0])->create_column();
269
194
        sorted_values->reserve(order.size());
270
194
        DorisVector<int64_t> sorted_counts;
271
194
        sorted_counts.reserve(order.size());
272
344
        for (int32_t slot : order) {
273
344
            insert_value(*sorted_values, value_of(state, slot));
274
344
            sorted_counts.push_back(state.slots[slot].count);
275
344
        }
276
194
        auto size = static_cast<int64_t>(sorted_counts.size());
277
194
        buf.write_binary(size);
278
194
        write_column(buf, *sorted_values);
279
194
        if (size != 0) {
280
            // An empty list keeps an empty vector, whose data() is null; passing it to memcpy is
281
            // undefined even for a zero length.
282
152
            buf.write(reinterpret_cast<const char*>(sorted_counts.data()),
283
152
                      sorted_counts.size() * sizeof(int64_t));
284
152
        }
285
194
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
259
76
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
260
76
        const auto& state = Base::data(place);
261
        // The serialized form keeps the historical flag byte: it is derived from k in the state.
262
76
        buf.write_binary(state.k != State::NO_K);
263
76
        buf.write_binary(state.k);
264
        // The slots are in arrival order and may include dead ones, while the serialized form is
265
        // the sorted (value, count) list the reader rebuilds the tree from.
266
76
        DorisVector<int32_t> order;
267
76
        collect_in_order(state, order);
268
76
        auto sorted_values = remove_nullable(this->argument_types[0])->create_column();
269
76
        sorted_values->reserve(order.size());
270
76
        DorisVector<int64_t> sorted_counts;
271
76
        sorted_counts.reserve(order.size());
272
171
        for (int32_t slot : order) {
273
171
            insert_value(*sorted_values, value_of(state, slot));
274
171
            sorted_counts.push_back(state.slots[slot].count);
275
171
        }
276
76
        auto size = static_cast<int64_t>(sorted_counts.size());
277
76
        buf.write_binary(size);
278
76
        write_column(buf, *sorted_values);
279
76
        if (size != 0) {
280
            // An empty list keeps an empty vector, whose data() is null; passing it to memcpy is
281
            // undefined even for a zero length.
282
60
            buf.write(reinterpret_cast<const char*>(sorted_counts.data()),
283
60
                      sorted_counts.size() * sizeof(int64_t));
284
60
        }
285
76
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
259
2
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
260
2
        const auto& state = Base::data(place);
261
        // The serialized form keeps the historical flag byte: it is derived from k in the state.
262
2
        buf.write_binary(state.k != State::NO_K);
263
2
        buf.write_binary(state.k);
264
        // The slots are in arrival order and may include dead ones, while the serialized form is
265
        // the sorted (value, count) list the reader rebuilds the tree from.
266
2
        DorisVector<int32_t> order;
267
2
        collect_in_order(state, order);
268
2
        auto sorted_values = remove_nullable(this->argument_types[0])->create_column();
269
2
        sorted_values->reserve(order.size());
270
2
        DorisVector<int64_t> sorted_counts;
271
2
        sorted_counts.reserve(order.size());
272
5
        for (int32_t slot : order) {
273
5
            insert_value(*sorted_values, value_of(state, slot));
274
5
            sorted_counts.push_back(state.slots[slot].count);
275
5
        }
276
2
        auto size = static_cast<int64_t>(sorted_counts.size());
277
2
        buf.write_binary(size);
278
2
        write_column(buf, *sorted_values);
279
2
        if (size != 0) {
280
            // An empty list keeps an empty vector, whose data() is null; passing it to memcpy is
281
            // undefined even for a zero length.
282
2
            buf.write(reinterpret_cast<const char*>(sorted_counts.data()),
283
2
                      sorted_counts.size() * sizeof(int64_t));
284
2
        }
285
2
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
259
11
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
260
11
        const auto& state = Base::data(place);
261
        // The serialized form keeps the historical flag byte: it is derived from k in the state.
262
11
        buf.write_binary(state.k != State::NO_K);
263
11
        buf.write_binary(state.k);
264
        // The slots are in arrival order and may include dead ones, while the serialized form is
265
        // the sorted (value, count) list the reader rebuilds the tree from.
266
11
        DorisVector<int32_t> order;
267
11
        collect_in_order(state, order);
268
11
        auto sorted_values = remove_nullable(this->argument_types[0])->create_column();
269
11
        sorted_values->reserve(order.size());
270
11
        DorisVector<int64_t> sorted_counts;
271
11
        sorted_counts.reserve(order.size());
272
15
        for (int32_t slot : order) {
273
15
            insert_value(*sorted_values, value_of(state, slot));
274
15
            sorted_counts.push_back(state.slots[slot].count);
275
15
        }
276
11
        auto size = static_cast<int64_t>(sorted_counts.size());
277
11
        buf.write_binary(size);
278
11
        write_column(buf, *sorted_values);
279
11
        if (size != 0) {
280
            // An empty list keeps an empty vector, whose data() is null; passing it to memcpy is
281
            // undefined even for a zero length.
282
9
            buf.write(reinterpret_cast<const char*>(sorted_counts.data()),
283
9
                      sorted_counts.size() * sizeof(int64_t));
284
9
        }
285
11
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
259
12
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
260
12
        const auto& state = Base::data(place);
261
        // The serialized form keeps the historical flag byte: it is derived from k in the state.
262
12
        buf.write_binary(state.k != State::NO_K);
263
12
        buf.write_binary(state.k);
264
        // The slots are in arrival order and may include dead ones, while the serialized form is
265
        // the sorted (value, count) list the reader rebuilds the tree from.
266
12
        DorisVector<int32_t> order;
267
12
        collect_in_order(state, order);
268
12
        auto sorted_values = remove_nullable(this->argument_types[0])->create_column();
269
12
        sorted_values->reserve(order.size());
270
12
        DorisVector<int64_t> sorted_counts;
271
12
        sorted_counts.reserve(order.size());
272
23
        for (int32_t slot : order) {
273
23
            insert_value(*sorted_values, value_of(state, slot));
274
23
            sorted_counts.push_back(state.slots[slot].count);
275
23
        }
276
12
        auto size = static_cast<int64_t>(sorted_counts.size());
277
12
        buf.write_binary(size);
278
12
        write_column(buf, *sorted_values);
279
12
        if (size != 0) {
280
            // An empty list keeps an empty vector, whose data() is null; passing it to memcpy is
281
            // undefined even for a zero length.
282
10
            buf.write(reinterpret_cast<const char*>(sorted_counts.data()),
283
10
                      sorted_counts.size() * sizeof(int64_t));
284
10
        }
285
12
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
259
9
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
260
9
        const auto& state = Base::data(place);
261
        // The serialized form keeps the historical flag byte: it is derived from k in the state.
262
9
        buf.write_binary(state.k != State::NO_K);
263
9
        buf.write_binary(state.k);
264
        // The slots are in arrival order and may include dead ones, while the serialized form is
265
        // the sorted (value, count) list the reader rebuilds the tree from.
266
9
        DorisVector<int32_t> order;
267
9
        collect_in_order(state, order);
268
9
        auto sorted_values = remove_nullable(this->argument_types[0])->create_column();
269
9
        sorted_values->reserve(order.size());
270
9
        DorisVector<int64_t> sorted_counts;
271
9
        sorted_counts.reserve(order.size());
272
9
        for (int32_t slot : order) {
273
9
            insert_value(*sorted_values, value_of(state, slot));
274
9
            sorted_counts.push_back(state.slots[slot].count);
275
9
        }
276
9
        auto size = static_cast<int64_t>(sorted_counts.size());
277
9
        buf.write_binary(size);
278
9
        write_column(buf, *sorted_values);
279
9
        if (size != 0) {
280
            // An empty list keeps an empty vector, whose data() is null; passing it to memcpy is
281
            // undefined even for a zero length.
282
5
            buf.write(reinterpret_cast<const char*>(sorted_counts.data()),
283
5
                      sorted_counts.size() * sizeof(int64_t));
284
5
        }
285
9
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
259
51
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
260
51
        const auto& state = Base::data(place);
261
        // The serialized form keeps the historical flag byte: it is derived from k in the state.
262
51
        buf.write_binary(state.k != State::NO_K);
263
51
        buf.write_binary(state.k);
264
        // The slots are in arrival order and may include dead ones, while the serialized form is
265
        // the sorted (value, count) list the reader rebuilds the tree from.
266
51
        DorisVector<int32_t> order;
267
51
        collect_in_order(state, order);
268
51
        auto sorted_values = remove_nullable(this->argument_types[0])->create_column();
269
51
        sorted_values->reserve(order.size());
270
51
        DorisVector<int64_t> sorted_counts;
271
51
        sorted_counts.reserve(order.size());
272
77
        for (int32_t slot : order) {
273
77
            insert_value(*sorted_values, value_of(state, slot));
274
77
            sorted_counts.push_back(state.slots[slot].count);
275
77
        }
276
51
        auto size = static_cast<int64_t>(sorted_counts.size());
277
51
        buf.write_binary(size);
278
51
        write_column(buf, *sorted_values);
279
51
        if (size != 0) {
280
            // An empty list keeps an empty vector, whose data() is null; passing it to memcpy is
281
            // undefined even for a zero length.
282
41
            buf.write(reinterpret_cast<const char*>(sorted_counts.data()),
283
41
                      sorted_counts.size() * sizeof(int64_t));
284
41
        }
285
51
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
259
2
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
260
2
        const auto& state = Base::data(place);
261
        // The serialized form keeps the historical flag byte: it is derived from k in the state.
262
2
        buf.write_binary(state.k != State::NO_K);
263
2
        buf.write_binary(state.k);
264
        // The slots are in arrival order and may include dead ones, while the serialized form is
265
        // the sorted (value, count) list the reader rebuilds the tree from.
266
2
        DorisVector<int32_t> order;
267
2
        collect_in_order(state, order);
268
2
        auto sorted_values = remove_nullable(this->argument_types[0])->create_column();
269
2
        sorted_values->reserve(order.size());
270
2
        DorisVector<int64_t> sorted_counts;
271
2
        sorted_counts.reserve(order.size());
272
5
        for (int32_t slot : order) {
273
5
            insert_value(*sorted_values, value_of(state, slot));
274
5
            sorted_counts.push_back(state.slots[slot].count);
275
5
        }
276
2
        auto size = static_cast<int64_t>(sorted_counts.size());
277
2
        buf.write_binary(size);
278
2
        write_column(buf, *sorted_values);
279
2
        if (size != 0) {
280
            // An empty list keeps an empty vector, whose data() is null; passing it to memcpy is
281
            // undefined even for a zero length.
282
2
            buf.write(reinterpret_cast<const char*>(sorted_counts.data()),
283
2
                      sorted_counts.size() * sizeof(int64_t));
284
2
        }
285
2
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
259
11
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
260
11
        const auto& state = Base::data(place);
261
        // The serialized form keeps the historical flag byte: it is derived from k in the state.
262
11
        buf.write_binary(state.k != State::NO_K);
263
11
        buf.write_binary(state.k);
264
        // The slots are in arrival order and may include dead ones, while the serialized form is
265
        // the sorted (value, count) list the reader rebuilds the tree from.
266
11
        DorisVector<int32_t> order;
267
11
        collect_in_order(state, order);
268
11
        auto sorted_values = remove_nullable(this->argument_types[0])->create_column();
269
11
        sorted_values->reserve(order.size());
270
11
        DorisVector<int64_t> sorted_counts;
271
11
        sorted_counts.reserve(order.size());
272
15
        for (int32_t slot : order) {
273
15
            insert_value(*sorted_values, value_of(state, slot));
274
15
            sorted_counts.push_back(state.slots[slot].count);
275
15
        }
276
11
        auto size = static_cast<int64_t>(sorted_counts.size());
277
11
        buf.write_binary(size);
278
11
        write_column(buf, *sorted_values);
279
11
        if (size != 0) {
280
            // An empty list keeps an empty vector, whose data() is null; passing it to memcpy is
281
            // undefined even for a zero length.
282
9
            buf.write(reinterpret_cast<const char*>(sorted_counts.data()),
283
9
                      sorted_counts.size() * sizeof(int64_t));
284
9
        }
285
11
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
259
11
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
260
11
        const auto& state = Base::data(place);
261
        // The serialized form keeps the historical flag byte: it is derived from k in the state.
262
11
        buf.write_binary(state.k != State::NO_K);
263
11
        buf.write_binary(state.k);
264
        // The slots are in arrival order and may include dead ones, while the serialized form is
265
        // the sorted (value, count) list the reader rebuilds the tree from.
266
11
        DorisVector<int32_t> order;
267
11
        collect_in_order(state, order);
268
11
        auto sorted_values = remove_nullable(this->argument_types[0])->create_column();
269
11
        sorted_values->reserve(order.size());
270
11
        DorisVector<int64_t> sorted_counts;
271
11
        sorted_counts.reserve(order.size());
272
15
        for (int32_t slot : order) {
273
15
            insert_value(*sorted_values, value_of(state, slot));
274
15
            sorted_counts.push_back(state.slots[slot].count);
275
15
        }
276
11
        auto size = static_cast<int64_t>(sorted_counts.size());
277
11
        buf.write_binary(size);
278
11
        write_column(buf, *sorted_values);
279
11
        if (size != 0) {
280
            // An empty list keeps an empty vector, whose data() is null; passing it to memcpy is
281
            // undefined even for a zero length.
282
9
            buf.write(reinterpret_cast<const char*>(sorted_counts.data()),
283
9
                      sorted_counts.size() * sizeof(int64_t));
284
9
        }
285
11
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
259
9
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
260
9
        const auto& state = Base::data(place);
261
        // The serialized form keeps the historical flag byte: it is derived from k in the state.
262
9
        buf.write_binary(state.k != State::NO_K);
263
9
        buf.write_binary(state.k);
264
        // The slots are in arrival order and may include dead ones, while the serialized form is
265
        // the sorted (value, count) list the reader rebuilds the tree from.
266
9
        DorisVector<int32_t> order;
267
9
        collect_in_order(state, order);
268
9
        auto sorted_values = remove_nullable(this->argument_types[0])->create_column();
269
9
        sorted_values->reserve(order.size());
270
9
        DorisVector<int64_t> sorted_counts;
271
9
        sorted_counts.reserve(order.size());
272
9
        for (int32_t slot : order) {
273
9
            insert_value(*sorted_values, value_of(state, slot));
274
9
            sorted_counts.push_back(state.slots[slot].count);
275
9
        }
276
9
        auto size = static_cast<int64_t>(sorted_counts.size());
277
9
        buf.write_binary(size);
278
9
        write_column(buf, *sorted_values);
279
9
        if (size != 0) {
280
            // An empty list keeps an empty vector, whose data() is null; passing it to memcpy is
281
            // undefined even for a zero length.
282
5
            buf.write(reinterpret_cast<const char*>(sorted_counts.data()),
283
5
                      sorted_counts.size() * sizeof(int64_t));
284
5
        }
285
9
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE9serializeEPKcRNS_14BufferWritableE
286
287
    void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf,
288
197
                     Arena&) const override {
289
197
        auto& state = Base::data(place);
290
197
        bool has_k = false;
291
197
        buf.read_binary(has_k);
292
197
        buf.read_binary(state.k);
293
197
        if (!has_k) {
294
1
            state.k = State::NO_K;
295
1
        }
296
197
        int64_t size = 0;
297
197
        buf.read_binary(size);
298
197
        auto values = read_column(buf);
299
197
        DCHECK_EQ(static_cast<int64_t>(values->size()), size);
300
197
        DorisVector<int64_t> counts(static_cast<size_t>(size));
301
197
        if (size != 0) {
302
155
            buf.read(reinterpret_cast<char*>(counts.data()), size * sizeof(int64_t));
303
155
        }
304
197
        DorisVector<Entry> entries;
305
197
        entries.reserve(static_cast<size_t>(size));
306
546
        for (int64_t row = 0; row != size; ++row) {
307
349
            entries.push_back(Entry {value_at(*values, static_cast<size_t>(row)), counts[row]});
308
349
        }
309
197
        assign_sorted(state, std::move(entries));
310
197
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
288
78
                     Arena&) const override {
289
78
        auto& state = Base::data(place);
290
78
        bool has_k = false;
291
78
        buf.read_binary(has_k);
292
78
        buf.read_binary(state.k);
293
78
        if (!has_k) {
294
1
            state.k = State::NO_K;
295
1
        }
296
78
        int64_t size = 0;
297
78
        buf.read_binary(size);
298
78
        auto values = read_column(buf);
299
78
        DCHECK_EQ(static_cast<int64_t>(values->size()), size);
300
78
        DorisVector<int64_t> counts(static_cast<size_t>(size));
301
78
        if (size != 0) {
302
62
            buf.read(reinterpret_cast<char*>(counts.data()), size * sizeof(int64_t));
303
62
        }
304
78
        DorisVector<Entry> entries;
305
78
        entries.reserve(static_cast<size_t>(size));
306
252
        for (int64_t row = 0; row != size; ++row) {
307
174
            entries.push_back(Entry {value_at(*values, static_cast<size_t>(row)), counts[row]});
308
174
        }
309
78
        assign_sorted(state, std::move(entries));
310
78
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
288
2
                     Arena&) const override {
289
2
        auto& state = Base::data(place);
290
2
        bool has_k = false;
291
2
        buf.read_binary(has_k);
292
2
        buf.read_binary(state.k);
293
2
        if (!has_k) {
294
0
            state.k = State::NO_K;
295
0
        }
296
2
        int64_t size = 0;
297
2
        buf.read_binary(size);
298
2
        auto values = read_column(buf);
299
2
        DCHECK_EQ(static_cast<int64_t>(values->size()), size);
300
2
        DorisVector<int64_t> counts(static_cast<size_t>(size));
301
2
        if (size != 0) {
302
2
            buf.read(reinterpret_cast<char*>(counts.data()), size * sizeof(int64_t));
303
2
        }
304
2
        DorisVector<Entry> entries;
305
2
        entries.reserve(static_cast<size_t>(size));
306
7
        for (int64_t row = 0; row != size; ++row) {
307
5
            entries.push_back(Entry {value_at(*values, static_cast<size_t>(row)), counts[row]});
308
5
        }
309
2
        assign_sorted(state, std::move(entries));
310
2
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
288
11
                     Arena&) const override {
289
11
        auto& state = Base::data(place);
290
11
        bool has_k = false;
291
11
        buf.read_binary(has_k);
292
11
        buf.read_binary(state.k);
293
11
        if (!has_k) {
294
0
            state.k = State::NO_K;
295
0
        }
296
11
        int64_t size = 0;
297
11
        buf.read_binary(size);
298
11
        auto values = read_column(buf);
299
11
        DCHECK_EQ(static_cast<int64_t>(values->size()), size);
300
11
        DorisVector<int64_t> counts(static_cast<size_t>(size));
301
11
        if (size != 0) {
302
9
            buf.read(reinterpret_cast<char*>(counts.data()), size * sizeof(int64_t));
303
9
        }
304
11
        DorisVector<Entry> entries;
305
11
        entries.reserve(static_cast<size_t>(size));
306
26
        for (int64_t row = 0; row != size; ++row) {
307
15
            entries.push_back(Entry {value_at(*values, static_cast<size_t>(row)), counts[row]});
308
15
        }
309
11
        assign_sorted(state, std::move(entries));
310
11
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
288
12
                     Arena&) const override {
289
12
        auto& state = Base::data(place);
290
12
        bool has_k = false;
291
12
        buf.read_binary(has_k);
292
12
        buf.read_binary(state.k);
293
12
        if (!has_k) {
294
0
            state.k = State::NO_K;
295
0
        }
296
12
        int64_t size = 0;
297
12
        buf.read_binary(size);
298
12
        auto values = read_column(buf);
299
12
        DCHECK_EQ(static_cast<int64_t>(values->size()), size);
300
12
        DorisVector<int64_t> counts(static_cast<size_t>(size));
301
12
        if (size != 0) {
302
10
            buf.read(reinterpret_cast<char*>(counts.data()), size * sizeof(int64_t));
303
10
        }
304
12
        DorisVector<Entry> entries;
305
12
        entries.reserve(static_cast<size_t>(size));
306
35
        for (int64_t row = 0; row != size; ++row) {
307
23
            entries.push_back(Entry {value_at(*values, static_cast<size_t>(row)), counts[row]});
308
23
        }
309
12
        assign_sorted(state, std::move(entries));
310
12
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
288
9
                     Arena&) const override {
289
9
        auto& state = Base::data(place);
290
9
        bool has_k = false;
291
9
        buf.read_binary(has_k);
292
9
        buf.read_binary(state.k);
293
9
        if (!has_k) {
294
0
            state.k = State::NO_K;
295
0
        }
296
9
        int64_t size = 0;
297
9
        buf.read_binary(size);
298
9
        auto values = read_column(buf);
299
9
        DCHECK_EQ(static_cast<int64_t>(values->size()), size);
300
9
        DorisVector<int64_t> counts(static_cast<size_t>(size));
301
9
        if (size != 0) {
302
5
            buf.read(reinterpret_cast<char*>(counts.data()), size * sizeof(int64_t));
303
5
        }
304
9
        DorisVector<Entry> entries;
305
9
        entries.reserve(static_cast<size_t>(size));
306
18
        for (int64_t row = 0; row != size; ++row) {
307
9
            entries.push_back(Entry {value_at(*values, static_cast<size_t>(row)), counts[row]});
308
9
        }
309
9
        assign_sorted(state, std::move(entries));
310
9
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
288
52
                     Arena&) const override {
289
52
        auto& state = Base::data(place);
290
52
        bool has_k = false;
291
52
        buf.read_binary(has_k);
292
52
        buf.read_binary(state.k);
293
52
        if (!has_k) {
294
0
            state.k = State::NO_K;
295
0
        }
296
52
        int64_t size = 0;
297
52
        buf.read_binary(size);
298
52
        auto values = read_column(buf);
299
52
        DCHECK_EQ(static_cast<int64_t>(values->size()), size);
300
52
        DorisVector<int64_t> counts(static_cast<size_t>(size));
301
52
        if (size != 0) {
302
42
            buf.read(reinterpret_cast<char*>(counts.data()), size * sizeof(int64_t));
303
42
        }
304
52
        DorisVector<Entry> entries;
305
52
        entries.reserve(static_cast<size_t>(size));
306
131
        for (int64_t row = 0; row != size; ++row) {
307
79
            entries.push_back(Entry {value_at(*values, static_cast<size_t>(row)), counts[row]});
308
79
        }
309
52
        assign_sorted(state, std::move(entries));
310
52
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
288
2
                     Arena&) const override {
289
2
        auto& state = Base::data(place);
290
2
        bool has_k = false;
291
2
        buf.read_binary(has_k);
292
2
        buf.read_binary(state.k);
293
2
        if (!has_k) {
294
0
            state.k = State::NO_K;
295
0
        }
296
2
        int64_t size = 0;
297
2
        buf.read_binary(size);
298
2
        auto values = read_column(buf);
299
2
        DCHECK_EQ(static_cast<int64_t>(values->size()), size);
300
2
        DorisVector<int64_t> counts(static_cast<size_t>(size));
301
2
        if (size != 0) {
302
2
            buf.read(reinterpret_cast<char*>(counts.data()), size * sizeof(int64_t));
303
2
        }
304
2
        DorisVector<Entry> entries;
305
2
        entries.reserve(static_cast<size_t>(size));
306
7
        for (int64_t row = 0; row != size; ++row) {
307
5
            entries.push_back(Entry {value_at(*values, static_cast<size_t>(row)), counts[row]});
308
5
        }
309
2
        assign_sorted(state, std::move(entries));
310
2
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
288
11
                     Arena&) const override {
289
11
        auto& state = Base::data(place);
290
11
        bool has_k = false;
291
11
        buf.read_binary(has_k);
292
11
        buf.read_binary(state.k);
293
11
        if (!has_k) {
294
0
            state.k = State::NO_K;
295
0
        }
296
11
        int64_t size = 0;
297
11
        buf.read_binary(size);
298
11
        auto values = read_column(buf);
299
11
        DCHECK_EQ(static_cast<int64_t>(values->size()), size);
300
11
        DorisVector<int64_t> counts(static_cast<size_t>(size));
301
11
        if (size != 0) {
302
9
            buf.read(reinterpret_cast<char*>(counts.data()), size * sizeof(int64_t));
303
9
        }
304
11
        DorisVector<Entry> entries;
305
11
        entries.reserve(static_cast<size_t>(size));
306
26
        for (int64_t row = 0; row != size; ++row) {
307
15
            entries.push_back(Entry {value_at(*values, static_cast<size_t>(row)), counts[row]});
308
15
        }
309
11
        assign_sorted(state, std::move(entries));
310
11
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
288
11
                     Arena&) const override {
289
11
        auto& state = Base::data(place);
290
11
        bool has_k = false;
291
11
        buf.read_binary(has_k);
292
11
        buf.read_binary(state.k);
293
11
        if (!has_k) {
294
0
            state.k = State::NO_K;
295
0
        }
296
11
        int64_t size = 0;
297
11
        buf.read_binary(size);
298
11
        auto values = read_column(buf);
299
11
        DCHECK_EQ(static_cast<int64_t>(values->size()), size);
300
11
        DorisVector<int64_t> counts(static_cast<size_t>(size));
301
11
        if (size != 0) {
302
9
            buf.read(reinterpret_cast<char*>(counts.data()), size * sizeof(int64_t));
303
9
        }
304
11
        DorisVector<Entry> entries;
305
11
        entries.reserve(static_cast<size_t>(size));
306
26
        for (int64_t row = 0; row != size; ++row) {
307
15
            entries.push_back(Entry {value_at(*values, static_cast<size_t>(row)), counts[row]});
308
15
        }
309
11
        assign_sorted(state, std::move(entries));
310
11
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Line
Count
Source
288
9
                     Arena&) const override {
289
9
        auto& state = Base::data(place);
290
9
        bool has_k = false;
291
9
        buf.read_binary(has_k);
292
9
        buf.read_binary(state.k);
293
9
        if (!has_k) {
294
0
            state.k = State::NO_K;
295
0
        }
296
9
        int64_t size = 0;
297
9
        buf.read_binary(size);
298
9
        auto values = read_column(buf);
299
9
        DCHECK_EQ(static_cast<int64_t>(values->size()), size);
300
9
        DorisVector<int64_t> counts(static_cast<size_t>(size));
301
9
        if (size != 0) {
302
5
            buf.read(reinterpret_cast<char*>(counts.data()), size * sizeof(int64_t));
303
5
        }
304
9
        DorisVector<Entry> entries;
305
9
        entries.reserve(static_cast<size_t>(size));
306
18
        for (int64_t row = 0; row != size; ++row) {
307
9
            entries.push_back(Entry {value_at(*values, static_cast<size_t>(row)), counts[row]});
308
9
        }
309
9
        assign_sorted(state, std::move(entries));
310
9
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
311
312
153
    void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override {
313
153
        const auto& state = Base::data(place);
314
153
        auto& result_array = assert_cast<ColumnArray&>(to);
315
        // The array element and both fields are nullable in the planned type, but a produced entry
316
        // never is.
317
153
        auto& pair_nullable = assert_cast<ColumnNullable&>(result_array.get_data());
318
153
        auto& pair_column = assert_cast<ColumnStruct&>(pair_nullable.get_nested_column());
319
153
        auto& value_column = assert_cast<ColumnNullable&>(pair_column.get_column(0));
320
153
        auto& count_column = assert_cast<ColumnNullable&>(pair_column.get_column(1));
321
153
        DorisVector<int32_t> order;
322
153
        collect_in_order(state, order);
323
1.41k
        for (int32_t slot : order) {
324
1.41k
            insert_value(value_column.get_nested_column(), value_of(state, slot));
325
1.41k
            value_column.get_null_map_data().push_back(0);
326
1.41k
            assert_cast<ColumnInt64&>(count_column.get_nested_column())
327
1.41k
                    .get_data()
328
1.41k
                    .push_back(state.slots[slot].count);
329
1.41k
            count_column.get_null_map_data().push_back(0);
330
1.41k
            pair_nullable.get_null_map_data().push_back(0);
331
1.41k
        }
332
153
        result_array.get_offsets().push_back(pair_column.size());
333
153
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
312
1
    void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override {
313
1
        const auto& state = Base::data(place);
314
1
        auto& result_array = assert_cast<ColumnArray&>(to);
315
        // The array element and both fields are nullable in the planned type, but a produced entry
316
        // never is.
317
1
        auto& pair_nullable = assert_cast<ColumnNullable&>(result_array.get_data());
318
1
        auto& pair_column = assert_cast<ColumnStruct&>(pair_nullable.get_nested_column());
319
1
        auto& value_column = assert_cast<ColumnNullable&>(pair_column.get_column(0));
320
1
        auto& count_column = assert_cast<ColumnNullable&>(pair_column.get_column(1));
321
1
        DorisVector<int32_t> order;
322
1
        collect_in_order(state, order);
323
1
        for (int32_t slot : order) {
324
1
            insert_value(value_column.get_nested_column(), value_of(state, slot));
325
1
            value_column.get_null_map_data().push_back(0);
326
1
            assert_cast<ColumnInt64&>(count_column.get_nested_column())
327
1
                    .get_data()
328
1
                    .push_back(state.slots[slot].count);
329
1
            count_column.get_null_map_data().push_back(0);
330
1
            pair_nullable.get_null_map_data().push_back(0);
331
1
        }
332
1
        result_array.get_offsets().push_back(pair_column.size());
333
1
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
312
63
    void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override {
313
63
        const auto& state = Base::data(place);
314
63
        auto& result_array = assert_cast<ColumnArray&>(to);
315
        // The array element and both fields are nullable in the planned type, but a produced entry
316
        // never is.
317
63
        auto& pair_nullable = assert_cast<ColumnNullable&>(result_array.get_data());
318
63
        auto& pair_column = assert_cast<ColumnStruct&>(pair_nullable.get_nested_column());
319
63
        auto& value_column = assert_cast<ColumnNullable&>(pair_column.get_column(0));
320
63
        auto& count_column = assert_cast<ColumnNullable&>(pair_column.get_column(1));
321
63
        DorisVector<int32_t> order;
322
63
        collect_in_order(state, order);
323
739
        for (int32_t slot : order) {
324
739
            insert_value(value_column.get_nested_column(), value_of(state, slot));
325
739
            value_column.get_null_map_data().push_back(0);
326
739
            assert_cast<ColumnInt64&>(count_column.get_nested_column())
327
739
                    .get_data()
328
739
                    .push_back(state.slots[slot].count);
329
739
            count_column.get_null_map_data().push_back(0);
330
739
            pair_nullable.get_null_map_data().push_back(0);
331
739
        }
332
63
        result_array.get_offsets().push_back(pair_column.size());
333
63
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
312
1
    void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override {
313
1
        const auto& state = Base::data(place);
314
1
        auto& result_array = assert_cast<ColumnArray&>(to);
315
        // The array element and both fields are nullable in the planned type, but a produced entry
316
        // never is.
317
1
        auto& pair_nullable = assert_cast<ColumnNullable&>(result_array.get_data());
318
1
        auto& pair_column = assert_cast<ColumnStruct&>(pair_nullable.get_nested_column());
319
1
        auto& value_column = assert_cast<ColumnNullable&>(pair_column.get_column(0));
320
1
        auto& count_column = assert_cast<ColumnNullable&>(pair_column.get_column(1));
321
1
        DorisVector<int32_t> order;
322
1
        collect_in_order(state, order);
323
3
        for (int32_t slot : order) {
324
3
            insert_value(value_column.get_nested_column(), value_of(state, slot));
325
3
            value_column.get_null_map_data().push_back(0);
326
3
            assert_cast<ColumnInt64&>(count_column.get_nested_column())
327
3
                    .get_data()
328
3
                    .push_back(state.slots[slot].count);
329
3
            count_column.get_null_map_data().push_back(0);
330
3
            pair_nullable.get_null_map_data().push_back(0);
331
3
        }
332
1
        result_array.get_offsets().push_back(pair_column.size());
333
1
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
312
6
    void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override {
313
6
        const auto& state = Base::data(place);
314
6
        auto& result_array = assert_cast<ColumnArray&>(to);
315
        // The array element and both fields are nullable in the planned type, but a produced entry
316
        // never is.
317
6
        auto& pair_nullable = assert_cast<ColumnNullable&>(result_array.get_data());
318
6
        auto& pair_column = assert_cast<ColumnStruct&>(pair_nullable.get_nested_column());
319
6
        auto& value_column = assert_cast<ColumnNullable&>(pair_column.get_column(0));
320
6
        auto& count_column = assert_cast<ColumnNullable&>(pair_column.get_column(1));
321
6
        DorisVector<int32_t> order;
322
6
        collect_in_order(state, order);
323
8
        for (int32_t slot : order) {
324
8
            insert_value(value_column.get_nested_column(), value_of(state, slot));
325
8
            value_column.get_null_map_data().push_back(0);
326
8
            assert_cast<ColumnInt64&>(count_column.get_nested_column())
327
8
                    .get_data()
328
8
                    .push_back(state.slots[slot].count);
329
8
            count_column.get_null_map_data().push_back(0);
330
8
            pair_nullable.get_null_map_data().push_back(0);
331
8
        }
332
6
        result_array.get_offsets().push_back(pair_column.size());
333
6
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
312
17
    void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override {
313
17
        const auto& state = Base::data(place);
314
17
        auto& result_array = assert_cast<ColumnArray&>(to);
315
        // The array element and both fields are nullable in the planned type, but a produced entry
316
        // never is.
317
17
        auto& pair_nullable = assert_cast<ColumnNullable&>(result_array.get_data());
318
17
        auto& pair_column = assert_cast<ColumnStruct&>(pair_nullable.get_nested_column());
319
17
        auto& value_column = assert_cast<ColumnNullable&>(pair_column.get_column(0));
320
17
        auto& count_column = assert_cast<ColumnNullable&>(pair_column.get_column(1));
321
17
        DorisVector<int32_t> order;
322
17
        collect_in_order(state, order);
323
44
        for (int32_t slot : order) {
324
44
            insert_value(value_column.get_nested_column(), value_of(state, slot));
325
44
            value_column.get_null_map_data().push_back(0);
326
44
            assert_cast<ColumnInt64&>(count_column.get_nested_column())
327
44
                    .get_data()
328
44
                    .push_back(state.slots[slot].count);
329
44
            count_column.get_null_map_data().push_back(0);
330
44
            pair_nullable.get_null_map_data().push_back(0);
331
44
        }
332
17
        result_array.get_offsets().push_back(pair_column.size());
333
17
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
312
5
    void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override {
313
5
        const auto& state = Base::data(place);
314
5
        auto& result_array = assert_cast<ColumnArray&>(to);
315
        // The array element and both fields are nullable in the planned type, but a produced entry
316
        // never is.
317
5
        auto& pair_nullable = assert_cast<ColumnNullable&>(result_array.get_data());
318
5
        auto& pair_column = assert_cast<ColumnStruct&>(pair_nullable.get_nested_column());
319
5
        auto& value_column = assert_cast<ColumnNullable&>(pair_column.get_column(0));
320
5
        auto& count_column = assert_cast<ColumnNullable&>(pair_column.get_column(1));
321
5
        DorisVector<int32_t> order;
322
5
        collect_in_order(state, order);
323
5
        for (int32_t slot : order) {
324
5
            insert_value(value_column.get_nested_column(), value_of(state, slot));
325
5
            value_column.get_null_map_data().push_back(0);
326
5
            assert_cast<ColumnInt64&>(count_column.get_nested_column())
327
5
                    .get_data()
328
5
                    .push_back(state.slots[slot].count);
329
5
            count_column.get_null_map_data().push_back(0);
330
5
            pair_nullable.get_null_map_data().push_back(0);
331
5
        }
332
5
        result_array.get_offsets().push_back(pair_column.size());
333
5
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
312
41
    void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override {
313
41
        const auto& state = Base::data(place);
314
41
        auto& result_array = assert_cast<ColumnArray&>(to);
315
        // The array element and both fields are nullable in the planned type, but a produced entry
316
        // never is.
317
41
        auto& pair_nullable = assert_cast<ColumnNullable&>(result_array.get_data());
318
41
        auto& pair_column = assert_cast<ColumnStruct&>(pair_nullable.get_nested_column());
319
41
        auto& value_column = assert_cast<ColumnNullable&>(pair_column.get_column(0));
320
41
        auto& count_column = assert_cast<ColumnNullable&>(pair_column.get_column(1));
321
41
        DorisVector<int32_t> order;
322
41
        collect_in_order(state, order);
323
585
        for (int32_t slot : order) {
324
585
            insert_value(value_column.get_nested_column(), value_of(state, slot));
325
585
            value_column.get_null_map_data().push_back(0);
326
585
            assert_cast<ColumnInt64&>(count_column.get_nested_column())
327
585
                    .get_data()
328
585
                    .push_back(state.slots[slot].count);
329
585
            count_column.get_null_map_data().push_back(0);
330
585
            pair_nullable.get_null_map_data().push_back(0);
331
585
        }
332
41
        result_array.get_offsets().push_back(pair_column.size());
333
41
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
312
1
    void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override {
313
1
        const auto& state = Base::data(place);
314
1
        auto& result_array = assert_cast<ColumnArray&>(to);
315
        // The array element and both fields are nullable in the planned type, but a produced entry
316
        // never is.
317
1
        auto& pair_nullable = assert_cast<ColumnNullable&>(result_array.get_data());
318
1
        auto& pair_column = assert_cast<ColumnStruct&>(pair_nullable.get_nested_column());
319
1
        auto& value_column = assert_cast<ColumnNullable&>(pair_column.get_column(0));
320
1
        auto& count_column = assert_cast<ColumnNullable&>(pair_column.get_column(1));
321
1
        DorisVector<int32_t> order;
322
1
        collect_in_order(state, order);
323
3
        for (int32_t slot : order) {
324
3
            insert_value(value_column.get_nested_column(), value_of(state, slot));
325
3
            value_column.get_null_map_data().push_back(0);
326
3
            assert_cast<ColumnInt64&>(count_column.get_nested_column())
327
3
                    .get_data()
328
3
                    .push_back(state.slots[slot].count);
329
3
            count_column.get_null_map_data().push_back(0);
330
3
            pair_nullable.get_null_map_data().push_back(0);
331
3
        }
332
1
        result_array.get_offsets().push_back(pair_column.size());
333
1
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
312
6
    void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override {
313
6
        const auto& state = Base::data(place);
314
6
        auto& result_array = assert_cast<ColumnArray&>(to);
315
        // The array element and both fields are nullable in the planned type, but a produced entry
316
        // never is.
317
6
        auto& pair_nullable = assert_cast<ColumnNullable&>(result_array.get_data());
318
6
        auto& pair_column = assert_cast<ColumnStruct&>(pair_nullable.get_nested_column());
319
6
        auto& value_column = assert_cast<ColumnNullable&>(pair_column.get_column(0));
320
6
        auto& count_column = assert_cast<ColumnNullable&>(pair_column.get_column(1));
321
6
        DorisVector<int32_t> order;
322
6
        collect_in_order(state, order);
323
8
        for (int32_t slot : order) {
324
8
            insert_value(value_column.get_nested_column(), value_of(state, slot));
325
8
            value_column.get_null_map_data().push_back(0);
326
8
            assert_cast<ColumnInt64&>(count_column.get_nested_column())
327
8
                    .get_data()
328
8
                    .push_back(state.slots[slot].count);
329
8
            count_column.get_null_map_data().push_back(0);
330
8
            pair_nullable.get_null_map_data().push_back(0);
331
8
        }
332
6
        result_array.get_offsets().push_back(pair_column.size());
333
6
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
312
7
    void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override {
313
7
        const auto& state = Base::data(place);
314
7
        auto& result_array = assert_cast<ColumnArray&>(to);
315
        // The array element and both fields are nullable in the planned type, but a produced entry
316
        // never is.
317
7
        auto& pair_nullable = assert_cast<ColumnNullable&>(result_array.get_data());
318
7
        auto& pair_column = assert_cast<ColumnStruct&>(pair_nullable.get_nested_column());
319
7
        auto& value_column = assert_cast<ColumnNullable&>(pair_column.get_column(0));
320
7
        auto& count_column = assert_cast<ColumnNullable&>(pair_column.get_column(1));
321
7
        DorisVector<int32_t> order;
322
7
        collect_in_order(state, order);
323
10
        for (int32_t slot : order) {
324
10
            insert_value(value_column.get_nested_column(), value_of(state, slot));
325
10
            value_column.get_null_map_data().push_back(0);
326
10
            assert_cast<ColumnInt64&>(count_column.get_nested_column())
327
10
                    .get_data()
328
10
                    .push_back(state.slots[slot].count);
329
10
            count_column.get_null_map_data().push_back(0);
330
10
            pair_nullable.get_null_map_data().push_back(0);
331
10
        }
332
7
        result_array.get_offsets().push_back(pair_column.size());
333
7
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
312
5
    void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override {
313
5
        const auto& state = Base::data(place);
314
5
        auto& result_array = assert_cast<ColumnArray&>(to);
315
        // The array element and both fields are nullable in the planned type, but a produced entry
316
        // never is.
317
5
        auto& pair_nullable = assert_cast<ColumnNullable&>(result_array.get_data());
318
5
        auto& pair_column = assert_cast<ColumnStruct&>(pair_nullable.get_nested_column());
319
5
        auto& value_column = assert_cast<ColumnNullable&>(pair_column.get_column(0));
320
5
        auto& count_column = assert_cast<ColumnNullable&>(pair_column.get_column(1));
321
5
        DorisVector<int32_t> order;
322
5
        collect_in_order(state, order);
323
5
        for (int32_t slot : order) {
324
5
            insert_value(value_column.get_nested_column(), value_of(state, slot));
325
5
            value_column.get_null_map_data().push_back(0);
326
5
            assert_cast<ColumnInt64&>(count_column.get_nested_column())
327
5
                    .get_data()
328
5
                    .push_back(state.slots[slot].count);
329
5
            count_column.get_null_map_data().push_back(0);
330
5
            pair_nullable.get_null_map_data().push_back(0);
331
5
        }
332
5
        result_array.get_offsets().push_back(pair_column.size());
333
5
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE18insert_result_intoEPKcRNS_7IColumnE
334
335
234
    static DataTypePtr make_return_type(const DataTypePtr& value_type) {
336
        // Both fields are nullable in the planned type: a consumer reads a field through
337
        // element_at, which is always nullable, and named_struct then records nullable fields.
338
        // Produced entries never contain a NULL field.
339
234
        auto pair_type = std::make_shared<DataTypeStruct>(
340
234
                DataTypes {make_nullable(value_type),
341
234
                           make_nullable(std::make_shared<DataTypeInt64>())},
342
234
                Strings {"value", "count"});
343
        // ArrayType defaults contains_null to true on the FE side, so the pair element is nullable
344
        // in the planned type even though the aggregate never produces a NULL entry.
345
234
        return std::make_shared<DataTypeArray>(make_nullable(pair_type));
346
234
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Line
Count
Source
335
4
    static DataTypePtr make_return_type(const DataTypePtr& value_type) {
336
        // Both fields are nullable in the planned type: a consumer reads a field through
337
        // element_at, which is always nullable, and named_struct then records nullable fields.
338
        // Produced entries never contain a NULL field.
339
4
        auto pair_type = std::make_shared<DataTypeStruct>(
340
4
                DataTypes {make_nullable(value_type),
341
4
                           make_nullable(std::make_shared<DataTypeInt64>())},
342
4
                Strings {"value", "count"});
343
        // ArrayType defaults contains_null to true on the FE side, so the pair element is nullable
344
        // in the planned type even though the aggregate never produces a NULL entry.
345
4
        return std::make_shared<DataTypeArray>(make_nullable(pair_type));
346
4
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Line
Count
Source
335
98
    static DataTypePtr make_return_type(const DataTypePtr& value_type) {
336
        // Both fields are nullable in the planned type: a consumer reads a field through
337
        // element_at, which is always nullable, and named_struct then records nullable fields.
338
        // Produced entries never contain a NULL field.
339
98
        auto pair_type = std::make_shared<DataTypeStruct>(
340
98
                DataTypes {make_nullable(value_type),
341
98
                           make_nullable(std::make_shared<DataTypeInt64>())},
342
98
                Strings {"value", "count"});
343
        // ArrayType defaults contains_null to true on the FE side, so the pair element is nullable
344
        // in the planned type even though the aggregate never produces a NULL entry.
345
98
        return std::make_shared<DataTypeArray>(make_nullable(pair_type));
346
98
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Line
Count
Source
335
5
    static DataTypePtr make_return_type(const DataTypePtr& value_type) {
336
        // Both fields are nullable in the planned type: a consumer reads a field through
337
        // element_at, which is always nullable, and named_struct then records nullable fields.
338
        // Produced entries never contain a NULL field.
339
5
        auto pair_type = std::make_shared<DataTypeStruct>(
340
5
                DataTypes {make_nullable(value_type),
341
5
                           make_nullable(std::make_shared<DataTypeInt64>())},
342
5
                Strings {"value", "count"});
343
        // ArrayType defaults contains_null to true on the FE side, so the pair element is nullable
344
        // in the planned type even though the aggregate never produces a NULL entry.
345
5
        return std::make_shared<DataTypeArray>(make_nullable(pair_type));
346
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Line
Count
Source
335
10
    static DataTypePtr make_return_type(const DataTypePtr& value_type) {
336
        // Both fields are nullable in the planned type: a consumer reads a field through
337
        // element_at, which is always nullable, and named_struct then records nullable fields.
338
        // Produced entries never contain a NULL field.
339
10
        auto pair_type = std::make_shared<DataTypeStruct>(
340
10
                DataTypes {make_nullable(value_type),
341
10
                           make_nullable(std::make_shared<DataTypeInt64>())},
342
10
                Strings {"value", "count"});
343
        // ArrayType defaults contains_null to true on the FE side, so the pair element is nullable
344
        // in the planned type even though the aggregate never produces a NULL entry.
345
10
        return std::make_shared<DataTypeArray>(make_nullable(pair_type));
346
10
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Line
Count
Source
335
21
    static DataTypePtr make_return_type(const DataTypePtr& value_type) {
336
        // Both fields are nullable in the planned type: a consumer reads a field through
337
        // element_at, which is always nullable, and named_struct then records nullable fields.
338
        // Produced entries never contain a NULL field.
339
21
        auto pair_type = std::make_shared<DataTypeStruct>(
340
21
                DataTypes {make_nullable(value_type),
341
21
                           make_nullable(std::make_shared<DataTypeInt64>())},
342
21
                Strings {"value", "count"});
343
        // ArrayType defaults contains_null to true on the FE side, so the pair element is nullable
344
        // in the planned type even though the aggregate never produces a NULL entry.
345
21
        return std::make_shared<DataTypeArray>(make_nullable(pair_type));
346
21
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Line
Count
Source
335
5
    static DataTypePtr make_return_type(const DataTypePtr& value_type) {
336
        // Both fields are nullable in the planned type: a consumer reads a field through
337
        // element_at, which is always nullable, and named_struct then records nullable fields.
338
        // Produced entries never contain a NULL field.
339
5
        auto pair_type = std::make_shared<DataTypeStruct>(
340
5
                DataTypes {make_nullable(value_type),
341
5
                           make_nullable(std::make_shared<DataTypeInt64>())},
342
5
                Strings {"value", "count"});
343
        // ArrayType defaults contains_null to true on the FE side, so the pair element is nullable
344
        // in the planned type even though the aggregate never produces a NULL entry.
345
5
        return std::make_shared<DataTypeArray>(make_nullable(pair_type));
346
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Line
Count
Source
335
60
    static DataTypePtr make_return_type(const DataTypePtr& value_type) {
336
        // Both fields are nullable in the planned type: a consumer reads a field through
337
        // element_at, which is always nullable, and named_struct then records nullable fields.
338
        // Produced entries never contain a NULL field.
339
60
        auto pair_type = std::make_shared<DataTypeStruct>(
340
60
                DataTypes {make_nullable(value_type),
341
60
                           make_nullable(std::make_shared<DataTypeInt64>())},
342
60
                Strings {"value", "count"});
343
        // ArrayType defaults contains_null to true on the FE side, so the pair element is nullable
344
        // in the planned type even though the aggregate never produces a NULL entry.
345
60
        return std::make_shared<DataTypeArray>(make_nullable(pair_type));
346
60
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Line
Count
Source
335
5
    static DataTypePtr make_return_type(const DataTypePtr& value_type) {
336
        // Both fields are nullable in the planned type: a consumer reads a field through
337
        // element_at, which is always nullable, and named_struct then records nullable fields.
338
        // Produced entries never contain a NULL field.
339
5
        auto pair_type = std::make_shared<DataTypeStruct>(
340
5
                DataTypes {make_nullable(value_type),
341
5
                           make_nullable(std::make_shared<DataTypeInt64>())},
342
5
                Strings {"value", "count"});
343
        // ArrayType defaults contains_null to true on the FE side, so the pair element is nullable
344
        // in the planned type even though the aggregate never produces a NULL entry.
345
5
        return std::make_shared<DataTypeArray>(make_nullable(pair_type));
346
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Line
Count
Source
335
10
    static DataTypePtr make_return_type(const DataTypePtr& value_type) {
336
        // Both fields are nullable in the planned type: a consumer reads a field through
337
        // element_at, which is always nullable, and named_struct then records nullable fields.
338
        // Produced entries never contain a NULL field.
339
10
        auto pair_type = std::make_shared<DataTypeStruct>(
340
10
                DataTypes {make_nullable(value_type),
341
10
                           make_nullable(std::make_shared<DataTypeInt64>())},
342
10
                Strings {"value", "count"});
343
        // ArrayType defaults contains_null to true on the FE side, so the pair element is nullable
344
        // in the planned type even though the aggregate never produces a NULL entry.
345
10
        return std::make_shared<DataTypeArray>(make_nullable(pair_type));
346
10
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Line
Count
Source
335
11
    static DataTypePtr make_return_type(const DataTypePtr& value_type) {
336
        // Both fields are nullable in the planned type: a consumer reads a field through
337
        // element_at, which is always nullable, and named_struct then records nullable fields.
338
        // Produced entries never contain a NULL field.
339
11
        auto pair_type = std::make_shared<DataTypeStruct>(
340
11
                DataTypes {make_nullable(value_type),
341
11
                           make_nullable(std::make_shared<DataTypeInt64>())},
342
11
                Strings {"value", "count"});
343
        // ArrayType defaults contains_null to true on the FE side, so the pair element is nullable
344
        // in the planned type even though the aggregate never produces a NULL entry.
345
11
        return std::make_shared<DataTypeArray>(make_nullable(pair_type));
346
11
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Line
Count
Source
335
5
    static DataTypePtr make_return_type(const DataTypePtr& value_type) {
336
        // Both fields are nullable in the planned type: a consumer reads a field through
337
        // element_at, which is always nullable, and named_struct then records nullable fields.
338
        // Produced entries never contain a NULL field.
339
5
        auto pair_type = std::make_shared<DataTypeStruct>(
340
5
                DataTypes {make_nullable(value_type),
341
5
                           make_nullable(std::make_shared<DataTypeInt64>())},
342
5
                Strings {"value", "count"});
343
        // ArrayType defaults contains_null to true on the FE side, so the pair element is nullable
344
        // in the planned type even though the aggregate never produces a NULL entry.
345
5
        return std::make_shared<DataTypeArray>(make_nullable(pair_type));
346
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
347
348
private:
349
    /// The value of the row in `column`. The returned view is valid while the column is alive.
350
23.0k
    static ValueRef value_at(const IColumn& column, size_t row_num) {
351
23.0k
        if constexpr (IS_STRING) {
352
201
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column).get_data_at(
353
201
                    row_num);
354
22.8k
        } else {
355
22.8k
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column)
356
22.8k
                    .get_data()[row_num];
357
22.8k
        }
358
23.0k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE8value_atERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE8value_atERKNS_7IColumnEm
Line
Count
Source
350
1
    static ValueRef value_at(const IColumn& column, size_t row_num) {
351
        if constexpr (IS_STRING) {
352
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column).get_data_at(
353
                    row_num);
354
1
        } else {
355
1
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column)
356
1
                    .get_data()[row_num];
357
1
        }
358
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE8value_atERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE8value_atERKNS_7IColumnEm
Line
Count
Source
350
12.2k
    static ValueRef value_at(const IColumn& column, size_t row_num) {
351
        if constexpr (IS_STRING) {
352
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column).get_data_at(
353
                    row_num);
354
12.2k
        } else {
355
12.2k
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column)
356
12.2k
                    .get_data()[row_num];
357
12.2k
        }
358
12.2k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE8value_atERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE8value_atERKNS_7IColumnEm
Line
Count
Source
350
10
    static ValueRef value_at(const IColumn& column, size_t row_num) {
351
        if constexpr (IS_STRING) {
352
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column).get_data_at(
353
                    row_num);
354
10
        } else {
355
10
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column)
356
10
                    .get_data()[row_num];
357
10
        }
358
10
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE8value_atERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE8value_atERKNS_7IColumnEm
Line
Count
Source
350
58
    static ValueRef value_at(const IColumn& column, size_t row_num) {
351
        if constexpr (IS_STRING) {
352
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column).get_data_at(
353
                    row_num);
354
58
        } else {
355
58
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column)
356
58
                    .get_data()[row_num];
357
58
        }
358
58
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE8value_atERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE8value_atERKNS_7IColumnEm
Line
Count
Source
350
124
    static ValueRef value_at(const IColumn& column, size_t row_num) {
351
124
        if constexpr (IS_STRING) {
352
124
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column).get_data_at(
353
124
                    row_num);
354
        } else {
355
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column)
356
                    .get_data()[row_num];
357
        }
358
124
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE8value_atERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE8value_atERKNS_7IColumnEm
Line
Count
Source
350
23
    static ValueRef value_at(const IColumn& column, size_t row_num) {
351
        if constexpr (IS_STRING) {
352
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column).get_data_at(
353
                    row_num);
354
23
        } else {
355
23
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column)
356
23
                    .get_data()[row_num];
357
23
        }
358
23
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE8value_atERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE8value_atERKNS_7IColumnEm
Line
Count
Source
350
10.4k
    static ValueRef value_at(const IColumn& column, size_t row_num) {
351
        if constexpr (IS_STRING) {
352
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column).get_data_at(
353
                    row_num);
354
10.4k
        } else {
355
10.4k
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column)
356
10.4k
                    .get_data()[row_num];
357
10.4k
        }
358
10.4k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE8value_atERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE8value_atERKNS_7IColumnEm
Line
Count
Source
350
10
    static ValueRef value_at(const IColumn& column, size_t row_num) {
351
        if constexpr (IS_STRING) {
352
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column).get_data_at(
353
                    row_num);
354
10
        } else {
355
10
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column)
356
10
                    .get_data()[row_num];
357
10
        }
358
10
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE8value_atERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE8value_atERKNS_7IColumnEm
Line
Count
Source
350
66
    static ValueRef value_at(const IColumn& column, size_t row_num) {
351
        if constexpr (IS_STRING) {
352
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column).get_data_at(
353
                    row_num);
354
66
        } else {
355
66
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column)
356
66
                    .get_data()[row_num];
357
66
        }
358
66
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE8value_atERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE8value_atERKNS_7IColumnEm
Line
Count
Source
350
77
    static ValueRef value_at(const IColumn& column, size_t row_num) {
351
77
        if constexpr (IS_STRING) {
352
77
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column).get_data_at(
353
77
                    row_num);
354
        } else {
355
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column)
356
                    .get_data()[row_num];
357
        }
358
77
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE8value_atERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE8value_atERKNS_7IColumnEm
Line
Count
Source
350
28
    static ValueRef value_at(const IColumn& column, size_t row_num) {
351
        if constexpr (IS_STRING) {
352
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column).get_data_at(
353
                    row_num);
354
28
        } else {
355
28
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column)
356
28
                    .get_data()[row_num];
357
28
        }
358
28
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE8value_atERKNS_7IColumnEm
359
360
    /// Exactly the comparison the value column would apply: CompareFloat for FLOAT/DOUBLE through
361
    /// Compare::compare (the column uses the same helper), the same memcmp helper ColumnString
362
    /// uses for strings, and the column's scale-independent ordering for every other type.
363
38.7k
    static int compare_values(ValueRef lhs, ValueRef rhs) {
364
38.7k
        if constexpr (IS_STRING) {
365
236
            return memcmp_small_allow_overflow15(
366
236
                    reinterpret_cast<const uint8_t*>(lhs.data), lhs.size,
367
236
                    reinterpret_cast<const uint8_t*>(rhs.data), rhs.size);
368
38.4k
        } else {
369
38.4k
            return Compare::compare(lhs, rhs);
370
38.4k
        }
371
38.7k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE14compare_valuesERKhS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE14compare_valuesERKaS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE14compare_valuesERKsS4_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE14compare_valuesERKiS4_
Line
Count
Source
363
24.1k
    static int compare_values(ValueRef lhs, ValueRef rhs) {
364
        if constexpr (IS_STRING) {
365
            return memcmp_small_allow_overflow15(
366
                    reinterpret_cast<const uint8_t*>(lhs.data), lhs.size,
367
                    reinterpret_cast<const uint8_t*>(rhs.data), rhs.size);
368
24.1k
        } else {
369
24.1k
            return Compare::compare(lhs, rhs);
370
24.1k
        }
371
24.1k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE14compare_valuesERKlS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE14compare_valuesERKnS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE14compare_valuesERKfS4_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE14compare_valuesERKdS4_
Line
Count
Source
363
9
    static int compare_values(ValueRef lhs, ValueRef rhs) {
364
        if constexpr (IS_STRING) {
365
            return memcmp_small_allow_overflow15(
366
                    reinterpret_cast<const uint8_t*>(lhs.data), lhs.size,
367
                    reinterpret_cast<const uint8_t*>(rhs.data), rhs.size);
368
9
        } else {
369
9
            return Compare::compare(lhs, rhs);
370
9
        }
371
9
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE14compare_valuesERKNS_7DecimalIiEES6_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE14compare_valuesERKNS_7DecimalIlEES6_
Line
Count
Source
363
53
    static int compare_values(ValueRef lhs, ValueRef rhs) {
364
        if constexpr (IS_STRING) {
365
            return memcmp_small_allow_overflow15(
366
                    reinterpret_cast<const uint8_t*>(lhs.data), lhs.size,
367
                    reinterpret_cast<const uint8_t*>(rhs.data), rhs.size);
368
53
        } else {
369
53
            return Compare::compare(lhs, rhs);
370
53
        }
371
53
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE14compare_valuesERKNS_14DecimalV2ValueES5_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE14compare_valuesERKNS_12Decimal128V3ES5_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE14compare_valuesERKNS_7DecimalIN4wide7integerILm256EiEEEES9_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE14compare_valuesENS_9StringRefES3_
Line
Count
Source
363
155
    static int compare_values(ValueRef lhs, ValueRef rhs) {
364
155
        if constexpr (IS_STRING) {
365
155
            return memcmp_small_allow_overflow15(
366
155
                    reinterpret_cast<const uint8_t*>(lhs.data), lhs.size,
367
155
                    reinterpret_cast<const uint8_t*>(rhs.data), rhs.size);
368
        } else {
369
            return Compare::compare(lhs, rhs);
370
        }
371
155
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE14compare_valuesERKNS_16VecDateTimeValueES5_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE14compare_valuesERKNS_16VecDateTimeValueES5_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE14compare_valuesERKNS_11DateV2ValueINS_15DateV2ValueTypeEEES7_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE14compare_valuesERKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEES7_
Line
Count
Source
363
19
    static int compare_values(ValueRef lhs, ValueRef rhs) {
364
        if constexpr (IS_STRING) {
365
            return memcmp_small_allow_overflow15(
366
                    reinterpret_cast<const uint8_t*>(lhs.data), lhs.size,
367
                    reinterpret_cast<const uint8_t*>(rhs.data), rhs.size);
368
19
        } else {
369
19
            return Compare::compare(lhs, rhs);
370
19
        }
371
19
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE14compare_valuesERKdS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE14compare_valuesERKNS_16TimeStampNsValueES5_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE14compare_valuesERKNS_16TimestampTzValueES5_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE14compare_valuesERKjS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE14compare_valuesERKoS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE14compare_valuesERKoS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE14compare_valuesERKhS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE14compare_valuesERKaS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE14compare_valuesERKsS4_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE14compare_valuesERKiS4_
Line
Count
Source
363
14.1k
    static int compare_values(ValueRef lhs, ValueRef rhs) {
364
        if constexpr (IS_STRING) {
365
            return memcmp_small_allow_overflow15(
366
                    reinterpret_cast<const uint8_t*>(lhs.data), lhs.size,
367
                    reinterpret_cast<const uint8_t*>(rhs.data), rhs.size);
368
14.1k
        } else {
369
14.1k
            return Compare::compare(lhs, rhs);
370
14.1k
        }
371
14.1k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE14compare_valuesERKlS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE14compare_valuesERKnS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE14compare_valuesERKfS4_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE14compare_valuesERKdS4_
Line
Count
Source
363
9
    static int compare_values(ValueRef lhs, ValueRef rhs) {
364
        if constexpr (IS_STRING) {
365
            return memcmp_small_allow_overflow15(
366
                    reinterpret_cast<const uint8_t*>(lhs.data), lhs.size,
367
                    reinterpret_cast<const uint8_t*>(rhs.data), rhs.size);
368
9
        } else {
369
9
            return Compare::compare(lhs, rhs);
370
9
        }
371
9
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE14compare_valuesERKNS_7DecimalIiEES6_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE14compare_valuesERKNS_7DecimalIlEES6_
Line
Count
Source
363
63
    static int compare_values(ValueRef lhs, ValueRef rhs) {
364
        if constexpr (IS_STRING) {
365
            return memcmp_small_allow_overflow15(
366
                    reinterpret_cast<const uint8_t*>(lhs.data), lhs.size,
367
                    reinterpret_cast<const uint8_t*>(rhs.data), rhs.size);
368
63
        } else {
369
63
            return Compare::compare(lhs, rhs);
370
63
        }
371
63
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE14compare_valuesERKNS_14DecimalV2ValueES5_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE14compare_valuesERKNS_12Decimal128V3ES5_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE14compare_valuesERKNS_7DecimalIN4wide7integerILm256EiEEEES9_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE14compare_valuesENS_9StringRefES3_
Line
Count
Source
363
81
    static int compare_values(ValueRef lhs, ValueRef rhs) {
364
81
        if constexpr (IS_STRING) {
365
81
            return memcmp_small_allow_overflow15(
366
81
                    reinterpret_cast<const uint8_t*>(lhs.data), lhs.size,
367
81
                    reinterpret_cast<const uint8_t*>(rhs.data), rhs.size);
368
        } else {
369
            return Compare::compare(lhs, rhs);
370
        }
371
81
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE14compare_valuesERKNS_16VecDateTimeValueES5_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE14compare_valuesERKNS_16VecDateTimeValueES5_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE14compare_valuesERKNS_11DateV2ValueINS_15DateV2ValueTypeEEES7_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE14compare_valuesERKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEES7_
Line
Count
Source
363
25
    static int compare_values(ValueRef lhs, ValueRef rhs) {
364
        if constexpr (IS_STRING) {
365
            return memcmp_small_allow_overflow15(
366
                    reinterpret_cast<const uint8_t*>(lhs.data), lhs.size,
367
                    reinterpret_cast<const uint8_t*>(rhs.data), rhs.size);
368
25
        } else {
369
25
            return Compare::compare(lhs, rhs);
370
25
        }
371
25
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE14compare_valuesERKdS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE14compare_valuesERKNS_16TimeStampNsValueES5_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE14compare_valuesERKNS_16TimestampTzValueES5_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE14compare_valuesERKjS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE14compare_valuesERKoS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE14compare_valuesERKoS4_
372
373
    /// The value stored in `slot`.
374
43.3k
    static ValueRef value_of(const State& state, int32_t slot) {
375
43.3k
        const Payload& payload = state.slots[slot].payload;
376
43.3k
        if constexpr (IS_STRING) {
377
432
            return StringRef(state.bytes.data() + payload.offset, payload.length);
378
42.9k
        } else {
379
42.9k
            return payload;
380
42.9k
        }
381
43.3k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_2EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_3EEEi
Line
Count
Source
374
1
    static ValueRef value_of(const State& state, int32_t slot) {
375
1
        const Payload& payload = state.slots[slot].payload;
376
        if constexpr (IS_STRING) {
377
            return StringRef(state.bytes.data() + payload.offset, payload.length);
378
1
        } else {
379
1
            return payload;
380
1
        }
381
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_4EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_5EEEi
Line
Count
Source
374
26.9k
    static ValueRef value_of(const State& state, int32_t slot) {
375
26.9k
        const Payload& payload = state.slots[slot].payload;
376
        if constexpr (IS_STRING) {
377
            return StringRef(state.bytes.data() + payload.offset, payload.length);
378
26.9k
        } else {
379
26.9k
            return payload;
380
26.9k
        }
381
26.9k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_6EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_7EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_8EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_9EEEi
Line
Count
Source
374
25
    static ValueRef value_of(const State& state, int32_t slot) {
375
25
        const Payload& payload = state.slots[slot].payload;
376
        if constexpr (IS_STRING) {
377
            return StringRef(state.bytes.data() + payload.offset, payload.length);
378
25
        } else {
379
25
            return payload;
380
25
        }
381
25
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_28EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_29EEEi
Line
Count
Source
374
100
    static ValueRef value_of(const State& state, int32_t slot) {
375
100
        const Payload& payload = state.slots[slot].payload;
376
        if constexpr (IS_STRING) {
377
            return StringRef(state.bytes.data() + payload.offset, payload.length);
378
100
        } else {
379
100
            return payload;
380
100
        }
381
100
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_20EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_30EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_35EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_10EEEi
Line
Count
Source
374
297
    static ValueRef value_of(const State& state, int32_t slot) {
375
297
        const Payload& payload = state.slots[slot].payload;
376
297
        if constexpr (IS_STRING) {
377
297
            return StringRef(state.bytes.data() + payload.offset, payload.length);
378
        } else {
379
            return payload;
380
        }
381
297
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_11EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_12EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_25EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_26EEEi
Line
Count
Source
374
48
    static ValueRef value_of(const State& state, int32_t slot) {
375
48
        const Payload& payload = state.slots[slot].payload;
376
        if constexpr (IS_STRING) {
377
            return StringRef(state.bytes.data() + payload.offset, payload.length);
378
48
        } else {
379
48
            return payload;
380
48
        }
381
48
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_27EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_43EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_42EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_36EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_37EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_44EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_2EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_3EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_4EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_5EEEi
Line
Count
Source
374
15.6k
    static ValueRef value_of(const State& state, int32_t slot) {
375
15.6k
        const Payload& payload = state.slots[slot].payload;
376
        if constexpr (IS_STRING) {
377
            return StringRef(state.bytes.data() + payload.offset, payload.length);
378
15.6k
        } else {
379
15.6k
            return payload;
380
15.6k
        }
381
15.6k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_6EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_7EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_8EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_9EEEi
Line
Count
Source
374
25
    static ValueRef value_of(const State& state, int32_t slot) {
375
25
        const Payload& payload = state.slots[slot].payload;
376
        if constexpr (IS_STRING) {
377
            return StringRef(state.bytes.data() + payload.offset, payload.length);
378
25
        } else {
379
25
            return payload;
380
25
        }
381
25
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_28EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_29EEEi
Line
Count
Source
374
114
    static ValueRef value_of(const State& state, int32_t slot) {
375
114
        const Payload& payload = state.slots[slot].payload;
376
        if constexpr (IS_STRING) {
377
            return StringRef(state.bytes.data() + payload.offset, payload.length);
378
114
        } else {
379
114
            return payload;
380
114
        }
381
114
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_20EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_30EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_35EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_10EEEi
Line
Count
Source
374
135
    static ValueRef value_of(const State& state, int32_t slot) {
375
135
        const Payload& payload = state.slots[slot].payload;
376
135
        if constexpr (IS_STRING) {
377
135
            return StringRef(state.bytes.data() + payload.offset, payload.length);
378
        } else {
379
            return payload;
380
        }
381
135
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_11EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_12EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_25EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_26EEEi
Line
Count
Source
374
54
    static ValueRef value_of(const State& state, int32_t slot) {
375
54
        const Payload& payload = state.slots[slot].payload;
376
        if constexpr (IS_STRING) {
377
            return StringRef(state.bytes.data() + payload.offset, payload.length);
378
54
        } else {
379
54
            return payload;
380
54
        }
381
54
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_27EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_43EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_42EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_36EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_37EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_44EEEi
382
383
    /// Copies `value` into `slot`'s payload, appending its bytes to the arena for strings.
384
3.45k
    static void set_value(State& state, int32_t slot, ValueRef value) {
385
3.45k
        if constexpr (IS_STRING) {
386
103
            Payload& payload = state.slots[slot].payload;
387
103
            payload.offset = state.bytes.size();
388
103
            payload.length = value.size;
389
103
            if (value.size != 0) {
390
103
                state.bytes.insert(value.data, value.data + value.size);
391
103
            }
392
103
            state.live_payload_bytes += value.size;
393
3.35k
        } else {
394
3.35k
            state.slots[slot].payload = value;
395
3.35k
        }
396
3.45k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_2EEEiRKh
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_3EEEiRKa
Line
Count
Source
384
1
    static void set_value(State& state, int32_t slot, ValueRef value) {
385
        if constexpr (IS_STRING) {
386
            Payload& payload = state.slots[slot].payload;
387
            payload.offset = state.bytes.size();
388
            payload.length = value.size;
389
            if (value.size != 0) {
390
                state.bytes.insert(value.data, value.data + value.size);
391
            }
392
            state.live_payload_bytes += value.size;
393
1
        } else {
394
1
            state.slots[slot].payload = value;
395
1
        }
396
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_4EEEiRKs
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_5EEEiRKi
Line
Count
Source
384
2.46k
    static void set_value(State& state, int32_t slot, ValueRef value) {
385
        if constexpr (IS_STRING) {
386
            Payload& payload = state.slots[slot].payload;
387
            payload.offset = state.bytes.size();
388
            payload.length = value.size;
389
            if (value.size != 0) {
390
                state.bytes.insert(value.data, value.data + value.size);
391
            }
392
            state.live_payload_bytes += value.size;
393
2.46k
        } else {
394
2.46k
            state.slots[slot].payload = value;
395
2.46k
        }
396
2.46k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_6EEEiRKl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_7EEEiRKn
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_8EEEiRKf
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_9EEEiRKd
Line
Count
Source
384
5
    static void set_value(State& state, int32_t slot, ValueRef value) {
385
        if constexpr (IS_STRING) {
386
            Payload& payload = state.slots[slot].payload;
387
            payload.offset = state.bytes.size();
388
            payload.length = value.size;
389
            if (value.size != 0) {
390
                state.bytes.insert(value.data, value.data + value.size);
391
            }
392
            state.live_payload_bytes += value.size;
393
5
        } else {
394
5
            state.slots[slot].payload = value;
395
5
        }
396
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_28EEEiRKNS_7DecimalIiEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_29EEEiRKNS_7DecimalIlEE
Line
Count
Source
384
19
    static void set_value(State& state, int32_t slot, ValueRef value) {
385
        if constexpr (IS_STRING) {
386
            Payload& payload = state.slots[slot].payload;
387
            payload.offset = state.bytes.size();
388
            payload.length = value.size;
389
            if (value.size != 0) {
390
                state.bytes.insert(value.data, value.data + value.size);
391
            }
392
            state.live_payload_bytes += value.size;
393
19
        } else {
394
19
            state.slots[slot].payload = value;
395
19
        }
396
19
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_20EEEiRKNS_14DecimalV2ValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_30EEEiRKNS_12Decimal128V3E
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_35EEEiRKNS_7DecimalIN4wide7integerILm256EiEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_10EEEiNS_9StringRefE
Line
Count
Source
384
66
    static void set_value(State& state, int32_t slot, ValueRef value) {
385
66
        if constexpr (IS_STRING) {
386
66
            Payload& payload = state.slots[slot].payload;
387
66
            payload.offset = state.bytes.size();
388
66
            payload.length = value.size;
389
66
            if (value.size != 0) {
390
66
                state.bytes.insert(value.data, value.data + value.size);
391
66
            }
392
66
            state.live_payload_bytes += value.size;
393
        } else {
394
            state.slots[slot].payload = value;
395
        }
396
66
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_11EEEiRKNS_16VecDateTimeValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_12EEEiRKNS_16VecDateTimeValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_25EEEiRKNS_11DateV2ValueINS_15DateV2ValueTypeEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_26EEEiRKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEE
Line
Count
Source
384
10
    static void set_value(State& state, int32_t slot, ValueRef value) {
385
        if constexpr (IS_STRING) {
386
            Payload& payload = state.slots[slot].payload;
387
            payload.offset = state.bytes.size();
388
            payload.length = value.size;
389
            if (value.size != 0) {
390
                state.bytes.insert(value.data, value.data + value.size);
391
            }
392
            state.live_payload_bytes += value.size;
393
10
        } else {
394
10
            state.slots[slot].payload = value;
395
10
        }
396
10
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_27EEEiRKd
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_43EEEiRKNS_16TimeStampNsValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_42EEEiRKNS_16TimestampTzValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_36EEEiRKj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_37EEEiRKo
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_44EEEiRKo
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_2EEEiRKh
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_3EEEiRKa
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_4EEEiRKs
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_5EEEiRKi
Line
Count
Source
384
800
    static void set_value(State& state, int32_t slot, ValueRef value) {
385
        if constexpr (IS_STRING) {
386
            Payload& payload = state.slots[slot].payload;
387
            payload.offset = state.bytes.size();
388
            payload.length = value.size;
389
            if (value.size != 0) {
390
                state.bytes.insert(value.data, value.data + value.size);
391
            }
392
            state.live_payload_bytes += value.size;
393
800
        } else {
394
800
            state.slots[slot].payload = value;
395
800
        }
396
800
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_6EEEiRKl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_7EEEiRKn
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_8EEEiRKf
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_9EEEiRKd
Line
Count
Source
384
5
    static void set_value(State& state, int32_t slot, ValueRef value) {
385
        if constexpr (IS_STRING) {
386
            Payload& payload = state.slots[slot].payload;
387
            payload.offset = state.bytes.size();
388
            payload.length = value.size;
389
            if (value.size != 0) {
390
                state.bytes.insert(value.data, value.data + value.size);
391
            }
392
            state.live_payload_bytes += value.size;
393
5
        } else {
394
5
            state.slots[slot].payload = value;
395
5
        }
396
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_28EEEiRKNS_7DecimalIiEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_29EEEiRKNS_7DecimalIlEE
Line
Count
Source
384
30
    static void set_value(State& state, int32_t slot, ValueRef value) {
385
        if constexpr (IS_STRING) {
386
            Payload& payload = state.slots[slot].payload;
387
            payload.offset = state.bytes.size();
388
            payload.length = value.size;
389
            if (value.size != 0) {
390
                state.bytes.insert(value.data, value.data + value.size);
391
            }
392
            state.live_payload_bytes += value.size;
393
30
        } else {
394
30
            state.slots[slot].payload = value;
395
30
        }
396
30
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_20EEEiRKNS_14DecimalV2ValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_30EEEiRKNS_12Decimal128V3E
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_35EEEiRKNS_7DecimalIN4wide7integerILm256EiEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_10EEEiNS_9StringRefE
Line
Count
Source
384
37
    static void set_value(State& state, int32_t slot, ValueRef value) {
385
37
        if constexpr (IS_STRING) {
386
37
            Payload& payload = state.slots[slot].payload;
387
37
            payload.offset = state.bytes.size();
388
37
            payload.length = value.size;
389
37
            if (value.size != 0) {
390
37
                state.bytes.insert(value.data, value.data + value.size);
391
37
            }
392
37
            state.live_payload_bytes += value.size;
393
        } else {
394
            state.slots[slot].payload = value;
395
        }
396
37
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_11EEEiRKNS_16VecDateTimeValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_12EEEiRKNS_16VecDateTimeValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_25EEEiRKNS_11DateV2ValueINS_15DateV2ValueTypeEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_26EEEiRKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEE
Line
Count
Source
384
15
    static void set_value(State& state, int32_t slot, ValueRef value) {
385
        if constexpr (IS_STRING) {
386
            Payload& payload = state.slots[slot].payload;
387
            payload.offset = state.bytes.size();
388
            payload.length = value.size;
389
            if (value.size != 0) {
390
                state.bytes.insert(value.data, value.data + value.size);
391
            }
392
            state.live_payload_bytes += value.size;
393
15
        } else {
394
15
            state.slots[slot].payload = value;
395
15
        }
396
15
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_27EEEiRKd
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_43EEEiRKNS_16TimeStampNsValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_42EEEiRKNS_16TimestampTzValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_36EEEiRKj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_37EEEiRKo
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_44EEEiRKo
397
398
    /// Replaces the state's only stored value (the k == 0 replace path). A string's arena is reset
399
    /// with it, so the discarded bytes do not accumulate across replacements.
400
11
    static void replace_value(State& state, int32_t slot, ValueRef value) {
401
11
        if constexpr (IS_STRING) {
402
0
            state.bytes.clear();
403
0
            state.live_payload_bytes = 0;
404
0
            state.dead_payload_bytes = 0;
405
0
        }
406
11
        set_value(state, slot, value);
407
11
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_2EEEiRKh
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_3EEEiRKa
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_4EEEiRKs
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_5EEEiRKi
Line
Count
Source
400
2
    static void replace_value(State& state, int32_t slot, ValueRef value) {
401
        if constexpr (IS_STRING) {
402
            state.bytes.clear();
403
            state.live_payload_bytes = 0;
404
            state.dead_payload_bytes = 0;
405
        }
406
2
        set_value(state, slot, value);
407
2
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_6EEEiRKl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_7EEEiRKn
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_8EEEiRKf
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_9EEEiRKd
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_28EEEiRKNS_7DecimalIiEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_29EEEiRKNS_7DecimalIlEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_20EEEiRKNS_14DecimalV2ValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_30EEEiRKNS_12Decimal128V3E
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_35EEEiRKNS_7DecimalIN4wide7integerILm256EiEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_10EEEiNS_9StringRefE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_11EEEiRKNS_16VecDateTimeValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_12EEEiRKNS_16VecDateTimeValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_25EEEiRKNS_11DateV2ValueINS_15DateV2ValueTypeEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_26EEEiRKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_27EEEiRKd
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_43EEEiRKNS_16TimeStampNsValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_42EEEiRKNS_16TimestampTzValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_36EEEiRKj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_37EEEiRKo
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE13replace_valueERNS_22AggregateTopKCountDataILS1_44EEEiRKo
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_2EEEiRKh
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_3EEEiRKa
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_4EEEiRKs
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_5EEEiRKi
Line
Count
Source
400
9
    static void replace_value(State& state, int32_t slot, ValueRef value) {
401
        if constexpr (IS_STRING) {
402
            state.bytes.clear();
403
            state.live_payload_bytes = 0;
404
            state.dead_payload_bytes = 0;
405
        }
406
9
        set_value(state, slot, value);
407
9
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_6EEEiRKl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_7EEEiRKn
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_8EEEiRKf
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_9EEEiRKd
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_28EEEiRKNS_7DecimalIiEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_29EEEiRKNS_7DecimalIlEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_20EEEiRKNS_14DecimalV2ValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_30EEEiRKNS_12Decimal128V3E
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_35EEEiRKNS_7DecimalIN4wide7integerILm256EiEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_10EEEiNS_9StringRefE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_11EEEiRKNS_16VecDateTimeValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_12EEEiRKNS_16VecDateTimeValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_25EEEiRKNS_11DateV2ValueINS_15DateV2ValueTypeEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_26EEEiRKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_27EEEiRKd
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_43EEEiRKNS_16TimeStampNsValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_42EEEiRKNS_16TimestampTzValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_36EEEiRKj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_37EEEiRKo
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE13replace_valueERNS_22AggregateTopKCountDataILS1_44EEEiRKo
408
409
    /// Called when `slot` is evicted: a string's bytes stay in the arena until the next compaction.
410
1.94k
    static void evict_value(State& state, int32_t slot) {
411
1.94k
        if constexpr (IS_STRING) {
412
30
            const size_t length = state.slots[slot].payload.length;
413
30
            state.live_payload_bytes -= length;
414
30
            state.dead_payload_bytes += length;
415
30
        }
416
1.94k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_2EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_3EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_4EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_5EEEi
Line
Count
Source
410
1.73k
    static void evict_value(State& state, int32_t slot) {
411
        if constexpr (IS_STRING) {
412
            const size_t length = state.slots[slot].payload.length;
413
            state.live_payload_bytes -= length;
414
            state.dead_payload_bytes += length;
415
        }
416
1.73k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_6EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_7EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_8EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_9EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_28EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_29EEEi
Line
Count
Source
410
2
    static void evict_value(State& state, int32_t slot) {
411
        if constexpr (IS_STRING) {
412
            const size_t length = state.slots[slot].payload.length;
413
            state.live_payload_bytes -= length;
414
            state.dead_payload_bytes += length;
415
        }
416
2
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_20EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_30EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_35EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_10EEEi
Line
Count
Source
410
12
    static void evict_value(State& state, int32_t slot) {
411
12
        if constexpr (IS_STRING) {
412
12
            const size_t length = state.slots[slot].payload.length;
413
12
            state.live_payload_bytes -= length;
414
12
            state.dead_payload_bytes += length;
415
12
        }
416
12
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_11EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_12EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_25EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_26EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_27EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_43EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_42EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_36EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_37EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_44EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_2EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_3EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_4EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_5EEEi
Line
Count
Source
410
163
    static void evict_value(State& state, int32_t slot) {
411
        if constexpr (IS_STRING) {
412
            const size_t length = state.slots[slot].payload.length;
413
            state.live_payload_bytes -= length;
414
            state.dead_payload_bytes += length;
415
        }
416
163
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_6EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_7EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_8EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_9EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_28EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_29EEEi
Line
Count
Source
410
13
    static void evict_value(State& state, int32_t slot) {
411
        if constexpr (IS_STRING) {
412
            const size_t length = state.slots[slot].payload.length;
413
            state.live_payload_bytes -= length;
414
            state.dead_payload_bytes += length;
415
        }
416
13
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_20EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_30EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_35EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_10EEEi
Line
Count
Source
410
18
    static void evict_value(State& state, int32_t slot) {
411
18
        if constexpr (IS_STRING) {
412
18
            const size_t length = state.slots[slot].payload.length;
413
18
            state.live_payload_bytes -= length;
414
18
            state.dead_payload_bytes += length;
415
18
        }
416
18
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_11EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_12EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_25EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_26EEEi
Line
Count
Source
410
5
    static void evict_value(State& state, int32_t slot) {
411
        if constexpr (IS_STRING) {
412
            const size_t length = state.slots[slot].payload.length;
413
            state.live_payload_bytes -= length;
414
            state.dead_payload_bytes += length;
415
        }
416
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_27EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_43EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_42EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_36EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_37EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_44EEEi
417
418
    /// Whether the discarded string payload outgrew the live one and a compaction should reclaim it.
419
22.6k
    static bool evicted_payload_exceeds_live(const State& state) {
420
22.6k
        if constexpr (IS_STRING) {
421
159
            return state.dead_payload_bytes > state.live_payload_bytes;
422
159
        }
423
0
        return false;
424
22.6k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_2EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_3EEE
Line
Count
Source
419
1
    static bool evicted_payload_exceeds_live(const State& state) {
420
        if constexpr (IS_STRING) {
421
            return state.dead_payload_bytes > state.live_payload_bytes;
422
        }
423
1
        return false;
424
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_4EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_5EEE
Line
Count
Source
419
12.0k
    static bool evicted_payload_exceeds_live(const State& state) {
420
        if constexpr (IS_STRING) {
421
            return state.dead_payload_bytes > state.live_payload_bytes;
422
        }
423
12.0k
        return false;
424
12.0k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_6EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_7EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_8EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_9EEE
Line
Count
Source
419
5
    static bool evicted_payload_exceeds_live(const State& state) {
420
        if constexpr (IS_STRING) {
421
            return state.dead_payload_bytes > state.live_payload_bytes;
422
        }
423
5
        return false;
424
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_28EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_29EEE
Line
Count
Source
419
40
    static bool evicted_payload_exceeds_live(const State& state) {
420
        if constexpr (IS_STRING) {
421
            return state.dead_payload_bytes > state.live_payload_bytes;
422
        }
423
40
        return false;
424
40
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_20EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_30EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_35EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_10EEE
Line
Count
Source
419
101
    static bool evicted_payload_exceeds_live(const State& state) {
420
101
        if constexpr (IS_STRING) {
421
101
            return state.dead_payload_bytes > state.live_payload_bytes;
422
101
        }
423
0
        return false;
424
101
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_11EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_12EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_25EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_26EEE
Line
Count
Source
419
14
    static bool evicted_payload_exceeds_live(const State& state) {
420
        if constexpr (IS_STRING) {
421
            return state.dead_payload_bytes > state.live_payload_bytes;
422
        }
423
14
        return false;
424
14
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_27EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_43EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_42EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_36EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_37EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_44EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_2EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_3EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_4EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_5EEE
Line
Count
Source
419
10.2k
    static bool evicted_payload_exceeds_live(const State& state) {
420
        if constexpr (IS_STRING) {
421
            return state.dead_payload_bytes > state.live_payload_bytes;
422
        }
423
10.2k
        return false;
424
10.2k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_6EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_7EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_8EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_9EEE
Line
Count
Source
419
5
    static bool evicted_payload_exceeds_live(const State& state) {
420
        if constexpr (IS_STRING) {
421
            return state.dead_payload_bytes > state.live_payload_bytes;
422
        }
423
5
        return false;
424
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_28EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_29EEE
Line
Count
Source
419
49
    static bool evicted_payload_exceeds_live(const State& state) {
420
        if constexpr (IS_STRING) {
421
            return state.dead_payload_bytes > state.live_payload_bytes;
422
        }
423
49
        return false;
424
49
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_20EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_30EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_35EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_10EEE
Line
Count
Source
419
58
    static bool evicted_payload_exceeds_live(const State& state) {
420
58
        if constexpr (IS_STRING) {
421
58
            return state.dead_payload_bytes > state.live_payload_bytes;
422
58
        }
423
0
        return false;
424
58
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_11EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_12EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_25EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_26EEE
Line
Count
Source
419
19
    static bool evicted_payload_exceeds_live(const State& state) {
420
        if constexpr (IS_STRING) {
421
            return state.dead_payload_bytes > state.live_payload_bytes;
422
        }
423
19
        return false;
424
19
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_27EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_43EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_42EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_36EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_37EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_44EEE
425
426
3.44k
    static Slot make_slot(int64_t count, uint32_t priority) {
427
3.44k
        Slot slot;
428
3.44k
        slot.count = count;
429
3.44k
        slot.priority = priority;
430
3.44k
        return slot;
431
3.44k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE9make_slotElj
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE9make_slotElj
Line
Count
Source
426
1
    static Slot make_slot(int64_t count, uint32_t priority) {
427
1
        Slot slot;
428
1
        slot.count = count;
429
1
        slot.priority = priority;
430
1
        return slot;
431
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE9make_slotElj
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE9make_slotElj
Line
Count
Source
426
2.46k
    static Slot make_slot(int64_t count, uint32_t priority) {
427
2.46k
        Slot slot;
428
2.46k
        slot.count = count;
429
2.46k
        slot.priority = priority;
430
2.46k
        return slot;
431
2.46k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE9make_slotElj
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE9make_slotElj
Line
Count
Source
426
5
    static Slot make_slot(int64_t count, uint32_t priority) {
427
5
        Slot slot;
428
5
        slot.count = count;
429
5
        slot.priority = priority;
430
5
        return slot;
431
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE9make_slotElj
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE9make_slotElj
Line
Count
Source
426
19
    static Slot make_slot(int64_t count, uint32_t priority) {
427
19
        Slot slot;
428
19
        slot.count = count;
429
19
        slot.priority = priority;
430
19
        return slot;
431
19
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE9make_slotElj
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE9make_slotElj
Line
Count
Source
426
66
    static Slot make_slot(int64_t count, uint32_t priority) {
427
66
        Slot slot;
428
66
        slot.count = count;
429
66
        slot.priority = priority;
430
66
        return slot;
431
66
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE9make_slotElj
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE9make_slotElj
Line
Count
Source
426
10
    static Slot make_slot(int64_t count, uint32_t priority) {
427
10
        Slot slot;
428
10
        slot.count = count;
429
10
        slot.priority = priority;
430
10
        return slot;
431
10
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE9make_slotElj
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE9make_slotElj
Line
Count
Source
426
790
    static Slot make_slot(int64_t count, uint32_t priority) {
427
790
        Slot slot;
428
790
        slot.count = count;
429
790
        slot.priority = priority;
430
790
        return slot;
431
790
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE9make_slotElj
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE9make_slotElj
Line
Count
Source
426
5
    static Slot make_slot(int64_t count, uint32_t priority) {
427
5
        Slot slot;
428
5
        slot.count = count;
429
5
        slot.priority = priority;
430
5
        return slot;
431
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE9make_slotElj
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE9make_slotElj
Line
Count
Source
426
30
    static Slot make_slot(int64_t count, uint32_t priority) {
427
30
        Slot slot;
428
30
        slot.count = count;
429
30
        slot.priority = priority;
430
30
        return slot;
431
30
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE9make_slotElj
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE9make_slotElj
Line
Count
Source
426
37
    static Slot make_slot(int64_t count, uint32_t priority) {
427
37
        Slot slot;
428
37
        slot.count = count;
429
37
        slot.priority = priority;
430
37
        return slot;
431
37
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE9make_slotElj
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE9make_slotElj
Line
Count
Source
426
15
    static Slot make_slot(int64_t count, uint32_t priority) {
427
15
        Slot slot;
428
15
        slot.count = count;
429
15
        slot.priority = priority;
430
15
        return slot;
431
15
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE9make_slotElj
432
433
1.75k
    static void insert_value(IColumn& column, ValueRef value) {
434
1.75k
        if constexpr (IS_STRING) {
435
92
            assert_cast<ColumnString&>(column).insert_data(value.data, value.size);
436
1.66k
        } else {
437
1.66k
            assert_cast<ColumnType&>(column).get_data().push_back(value);
438
1.66k
        }
439
1.75k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE12insert_valueERNS_7IColumnERKh
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE12insert_valueERNS_7IColumnERKa
Line
Count
Source
433
1
    static void insert_value(IColumn& column, ValueRef value) {
434
        if constexpr (IS_STRING) {
435
            assert_cast<ColumnString&>(column).insert_data(value.data, value.size);
436
1
        } else {
437
1
            assert_cast<ColumnType&>(column).get_data().push_back(value);
438
1
        }
439
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE12insert_valueERNS_7IColumnERKs
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE12insert_valueERNS_7IColumnERKi
Line
Count
Source
433
910
    static void insert_value(IColumn& column, ValueRef value) {
434
        if constexpr (IS_STRING) {
435
            assert_cast<ColumnString&>(column).insert_data(value.data, value.size);
436
910
        } else {
437
910
            assert_cast<ColumnType&>(column).get_data().push_back(value);
438
910
        }
439
910
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE12insert_valueERNS_7IColumnERKl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE12insert_valueERNS_7IColumnERKn
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE12insert_valueERNS_7IColumnERKf
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE12insert_valueERNS_7IColumnERKd
Line
Count
Source
433
8
    static void insert_value(IColumn& column, ValueRef value) {
434
        if constexpr (IS_STRING) {
435
            assert_cast<ColumnString&>(column).insert_data(value.data, value.size);
436
8
        } else {
437
8
            assert_cast<ColumnType&>(column).get_data().push_back(value);
438
8
        }
439
8
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE12insert_valueERNS_7IColumnERKNS_7DecimalIiEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE12insert_valueERNS_7IColumnERKNS_7DecimalIlEE
Line
Count
Source
433
23
    static void insert_value(IColumn& column, ValueRef value) {
434
        if constexpr (IS_STRING) {
435
            assert_cast<ColumnString&>(column).insert_data(value.data, value.size);
436
23
        } else {
437
23
            assert_cast<ColumnType&>(column).get_data().push_back(value);
438
23
        }
439
23
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE12insert_valueERNS_7IColumnERKNS_14DecimalV2ValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE12insert_valueERNS_7IColumnERKNS_12Decimal128V3E
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE12insert_valueERNS_7IColumnERKNS_7DecimalIN4wide7integerILm256EiEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE12insert_valueERNS_7IColumnENS_9StringRefE
Line
Count
Source
433
67
    static void insert_value(IColumn& column, ValueRef value) {
434
67
        if constexpr (IS_STRING) {
435
67
            assert_cast<ColumnString&>(column).insert_data(value.data, value.size);
436
        } else {
437
            assert_cast<ColumnType&>(column).get_data().push_back(value);
438
        }
439
67
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE12insert_valueERNS_7IColumnERKNS_16VecDateTimeValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE12insert_valueERNS_7IColumnERKNS_16VecDateTimeValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE12insert_valueERNS_7IColumnERKNS_11DateV2ValueINS_15DateV2ValueTypeEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE12insert_valueERNS_7IColumnERKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEE
Line
Count
Source
433
14
    static void insert_value(IColumn& column, ValueRef value) {
434
        if constexpr (IS_STRING) {
435
            assert_cast<ColumnString&>(column).insert_data(value.data, value.size);
436
14
        } else {
437
14
            assert_cast<ColumnType&>(column).get_data().push_back(value);
438
14
        }
439
14
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE12insert_valueERNS_7IColumnERKd
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE12insert_valueERNS_7IColumnERKNS_16TimeStampNsValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE12insert_valueERNS_7IColumnERKNS_16TimestampTzValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE12insert_valueERNS_7IColumnERKj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE12insert_valueERNS_7IColumnERKo
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE12insert_valueERNS_7IColumnERKo
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE12insert_valueERNS_7IColumnERKh
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE12insert_valueERNS_7IColumnERKa
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE12insert_valueERNS_7IColumnERKs
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE12insert_valueERNS_7IColumnERKi
Line
Count
Source
433
662
    static void insert_value(IColumn& column, ValueRef value) {
434
        if constexpr (IS_STRING) {
435
            assert_cast<ColumnString&>(column).insert_data(value.data, value.size);
436
662
        } else {
437
662
            assert_cast<ColumnType&>(column).get_data().push_back(value);
438
662
        }
439
662
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE12insert_valueERNS_7IColumnERKl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE12insert_valueERNS_7IColumnERKn
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE12insert_valueERNS_7IColumnERKf
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE12insert_valueERNS_7IColumnERKd
Line
Count
Source
433
8
    static void insert_value(IColumn& column, ValueRef value) {
434
        if constexpr (IS_STRING) {
435
            assert_cast<ColumnString&>(column).insert_data(value.data, value.size);
436
8
        } else {
437
8
            assert_cast<ColumnType&>(column).get_data().push_back(value);
438
8
        }
439
8
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE12insert_valueERNS_7IColumnERKNS_7DecimalIiEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE12insert_valueERNS_7IColumnERKNS_7DecimalIlEE
Line
Count
Source
433
23
    static void insert_value(IColumn& column, ValueRef value) {
434
        if constexpr (IS_STRING) {
435
            assert_cast<ColumnString&>(column).insert_data(value.data, value.size);
436
23
        } else {
437
23
            assert_cast<ColumnType&>(column).get_data().push_back(value);
438
23
        }
439
23
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE12insert_valueERNS_7IColumnERKNS_14DecimalV2ValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE12insert_valueERNS_7IColumnERKNS_12Decimal128V3E
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE12insert_valueERNS_7IColumnERKNS_7DecimalIN4wide7integerILm256EiEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE12insert_valueERNS_7IColumnENS_9StringRefE
Line
Count
Source
433
25
    static void insert_value(IColumn& column, ValueRef value) {
434
25
        if constexpr (IS_STRING) {
435
25
            assert_cast<ColumnString&>(column).insert_data(value.data, value.size);
436
        } else {
437
            assert_cast<ColumnType&>(column).get_data().push_back(value);
438
        }
439
25
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE12insert_valueERNS_7IColumnERKNS_16VecDateTimeValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE12insert_valueERNS_7IColumnERKNS_16VecDateTimeValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE12insert_valueERNS_7IColumnERKNS_11DateV2ValueINS_15DateV2ValueTypeEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE12insert_valueERNS_7IColumnERKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEE
Line
Count
Source
433
14
    static void insert_value(IColumn& column, ValueRef value) {
434
        if constexpr (IS_STRING) {
435
            assert_cast<ColumnString&>(column).insert_data(value.data, value.size);
436
14
        } else {
437
14
            assert_cast<ColumnType&>(column).get_data().push_back(value);
438
14
        }
439
14
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE12insert_valueERNS_7IColumnERKd
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE12insert_valueERNS_7IColumnERKNS_16TimeStampNsValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE12insert_valueERNS_7IColumnERKNS_16TimestampTzValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE12insert_valueERNS_7IColumnERKj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE12insert_valueERNS_7IColumnERKo
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE12insert_valueERNS_7IColumnERKo
440
441
    /// True when `cmp` puts the left operand before the right one in the aggregate's order.
442
18.0k
    static bool comes_before(int cmp) { return IsMin ? cmp < 0 : cmp > 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE12comes_beforeEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE12comes_beforeEi
Line
Count
Source
442
13.7k
    static bool comes_before(int cmp) { return IsMin ? cmp < 0 : cmp > 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE12comes_beforeEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE12comes_beforeEi
Line
Count
Source
442
6
    static bool comes_before(int cmp) { return IsMin ? cmp < 0 : cmp > 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE12comes_beforeEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE12comes_beforeEi
Line
Count
Source
442
17
    static bool comes_before(int cmp) { return IsMin ? cmp < 0 : cmp > 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE12comes_beforeEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE12comes_beforeEi
Line
Count
Source
442
79
    static bool comes_before(int cmp) { return IsMin ? cmp < 0 : cmp > 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE12comes_beforeEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE12comes_beforeEi
Line
Count
Source
442
8
    static bool comes_before(int cmp) { return IsMin ? cmp < 0 : cmp > 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE12comes_beforeEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE12comes_beforeEi
Line
Count
Source
442
4.05k
    static bool comes_before(int cmp) { return IsMin ? cmp < 0 : cmp > 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE12comes_beforeEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE12comes_beforeEi
Line
Count
Source
442
6
    static bool comes_before(int cmp) { return IsMin ? cmp < 0 : cmp > 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE12comes_beforeEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE12comes_beforeEi
Line
Count
Source
442
30
    static bool comes_before(int cmp) { return IsMin ? cmp < 0 : cmp > 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE12comes_beforeEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE12comes_beforeEi
Line
Count
Source
442
43
    static bool comes_before(int cmp) { return IsMin ? cmp < 0 : cmp > 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE12comes_beforeEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE12comes_beforeEi
Line
Count
Source
442
14
    static bool comes_before(int cmp) { return IsMin ? cmp < 0 : cmp > 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE12comes_beforeEi
443
444
    /// True when `cmp`, which compares a value with the worst retained one, puts it after it: the
445
    /// value is worse and cannot enter the list.
446
20.5k
    static bool is_worse(int cmp) { return IsMin ? cmp > 0 : cmp < 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE8is_worseEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE8is_worseEi
Line
Count
Source
446
10.2k
    static bool is_worse(int cmp) { return IsMin ? cmp > 0 : cmp < 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE8is_worseEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE8is_worseEi
Line
Count
Source
446
3
    static bool is_worse(int cmp) { return IsMin ? cmp > 0 : cmp < 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE8is_worseEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE8is_worseEi
Line
Count
Source
446
27
    static bool is_worse(int cmp) { return IsMin ? cmp > 0 : cmp < 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE8is_worseEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE8is_worseEi
Line
Count
Source
446
66
    static bool is_worse(int cmp) { return IsMin ? cmp > 0 : cmp < 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE8is_worseEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE8is_worseEi
Line
Count
Source
446
11
    static bool is_worse(int cmp) { return IsMin ? cmp > 0 : cmp < 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE8is_worseEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE8is_worseEi
Line
Count
Source
446
10.0k
    static bool is_worse(int cmp) { return IsMin ? cmp > 0 : cmp < 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE8is_worseEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE8is_worseEi
Line
Count
Source
446
3
    static bool is_worse(int cmp) { return IsMin ? cmp > 0 : cmp < 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE8is_worseEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE8is_worseEi
Line
Count
Source
446
27
    static bool is_worse(int cmp) { return IsMin ? cmp > 0 : cmp < 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE8is_worseEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE8is_worseEi
Line
Count
Source
446
29
    static bool is_worse(int cmp) { return IsMin ? cmp > 0 : cmp < 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE8is_worseEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE8is_worseEi
Line
Count
Source
446
11
    static bool is_worse(int cmp) { return IsMin ? cmp > 0 : cmp < 0; }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE8is_worseEi
447
448
    /// splitmix32. The priorities only have to be independent enough to keep the treap balanced;
449
    /// a per-state sequence keeps the shape reproducible for the same insertion order.
450
5.32k
    static uint32_t next_priority(State& state) {
451
5.32k
        uint32_t z = (state.rng += 0x9E3779B9U);
452
5.32k
        z = (z ^ (z >> 16)) * 0x21F0AAADU;
453
5.32k
        z = (z ^ (z >> 15)) * 0x735A2D97U;
454
5.32k
        return z ^ (z >> 15);
455
5.32k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_2EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_3EEE
Line
Count
Source
450
1
    static uint32_t next_priority(State& state) {
451
1
        uint32_t z = (state.rng += 0x9E3779B9U);
452
1
        z = (z ^ (z >> 16)) * 0x21F0AAADU;
453
1
        z = (z ^ (z >> 15)) * 0x735A2D97U;
454
1
        return z ^ (z >> 15);
455
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_4EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_5EEE
Line
Count
Source
450
3.89k
    static uint32_t next_priority(State& state) {
451
3.89k
        uint32_t z = (state.rng += 0x9E3779B9U);
452
3.89k
        z = (z ^ (z >> 16)) * 0x21F0AAADU;
453
3.89k
        z = (z ^ (z >> 15)) * 0x735A2D97U;
454
3.89k
        return z ^ (z >> 15);
455
3.89k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_6EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_7EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_8EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_9EEE
Line
Count
Source
450
15
    static uint32_t next_priority(State& state) {
451
15
        uint32_t z = (state.rng += 0x9E3779B9U);
452
15
        z = (z ^ (z >> 16)) * 0x21F0AAADU;
453
15
        z = (z ^ (z >> 15)) * 0x735A2D97U;
454
15
        return z ^ (z >> 15);
455
15
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_28EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_29EEE
Line
Count
Source
450
46
    static uint32_t next_priority(State& state) {
451
46
        uint32_t z = (state.rng += 0x9E3779B9U);
452
46
        z = (z ^ (z >> 16)) * 0x21F0AAADU;
453
46
        z = (z ^ (z >> 15)) * 0x735A2D97U;
454
46
        return z ^ (z >> 15);
455
46
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_20EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_30EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_35EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_10EEE
Line
Count
Source
450
125
    static uint32_t next_priority(State& state) {
451
125
        uint32_t z = (state.rng += 0x9E3779B9U);
452
125
        z = (z ^ (z >> 16)) * 0x21F0AAADU;
453
125
        z = (z ^ (z >> 15)) * 0x735A2D97U;
454
125
        return z ^ (z >> 15);
455
125
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_11EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_12EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_25EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_26EEE
Line
Count
Source
450
27
    static uint32_t next_priority(State& state) {
451
27
        uint32_t z = (state.rng += 0x9E3779B9U);
452
27
        z = (z ^ (z >> 16)) * 0x21F0AAADU;
453
27
        z = (z ^ (z >> 15)) * 0x735A2D97U;
454
27
        return z ^ (z >> 15);
455
27
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_27EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_43EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_42EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_36EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_37EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_44EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_2EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_3EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_4EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_5EEE
Line
Count
Source
450
1.04k
    static uint32_t next_priority(State& state) {
451
1.04k
        uint32_t z = (state.rng += 0x9E3779B9U);
452
1.04k
        z = (z ^ (z >> 16)) * 0x21F0AAADU;
453
1.04k
        z = (z ^ (z >> 15)) * 0x735A2D97U;
454
1.04k
        return z ^ (z >> 15);
455
1.04k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_6EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_7EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_8EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_9EEE
Line
Count
Source
450
15
    static uint32_t next_priority(State& state) {
451
15
        uint32_t z = (state.rng += 0x9E3779B9U);
452
15
        z = (z ^ (z >> 16)) * 0x21F0AAADU;
453
15
        z = (z ^ (z >> 15)) * 0x735A2D97U;
454
15
        return z ^ (z >> 15);
455
15
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_28EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_29EEE
Line
Count
Source
450
61
    static uint32_t next_priority(State& state) {
451
61
        uint32_t z = (state.rng += 0x9E3779B9U);
452
61
        z = (z ^ (z >> 16)) * 0x21F0AAADU;
453
61
        z = (z ^ (z >> 15)) * 0x735A2D97U;
454
61
        return z ^ (z >> 15);
455
61
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_20EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_30EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_35EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_10EEE
Line
Count
Source
450
68
    static uint32_t next_priority(State& state) {
451
68
        uint32_t z = (state.rng += 0x9E3779B9U);
452
68
        z = (z ^ (z >> 16)) * 0x21F0AAADU;
453
68
        z = (z ^ (z >> 15)) * 0x735A2D97U;
454
68
        return z ^ (z >> 15);
455
68
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_11EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_12EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_25EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_26EEE
Line
Count
Source
450
32
    static uint32_t next_priority(State& state) {
451
32
        uint32_t z = (state.rng += 0x9E3779B9U);
452
32
        z = (z ^ (z >> 16)) * 0x21F0AAADU;
453
32
        z = (z ^ (z >> 15)) * 0x735A2D97U;
454
32
        return z ^ (z >> 15);
455
32
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_27EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_43EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_42EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_36EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_37EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_44EEE
456
457
1.25k
    static int compare_slots(const State& state, int32_t lhs, int32_t rhs) {
458
1.25k
        return compare_values(value_of(state, lhs), value_of(state, rhs));
459
1.25k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_2EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_3EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_4EEEii
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_5EEEii
Line
Count
Source
457
636
    static int compare_slots(const State& state, int32_t lhs, int32_t rhs) {
458
636
        return compare_values(value_of(state, lhs), value_of(state, rhs));
459
636
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_6EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_7EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_8EEEii
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_9EEEii
Line
Count
Source
457
3
    static int compare_slots(const State& state, int32_t lhs, int32_t rhs) {
458
3
        return compare_values(value_of(state, lhs), value_of(state, rhs));
459
3
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_28EEEii
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_29EEEii
Line
Count
Source
457
6
    static int compare_slots(const State& state, int32_t lhs, int32_t rhs) {
458
6
        return compare_values(value_of(state, lhs), value_of(state, rhs));
459
6
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_20EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_30EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_35EEEii
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_10EEEii
Line
Count
Source
457
26
    static int compare_slots(const State& state, int32_t lhs, int32_t rhs) {
458
26
        return compare_values(value_of(state, lhs), value_of(state, rhs));
459
26
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_11EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_12EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_25EEEii
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_26EEEii
Line
Count
Source
457
4
    static int compare_slots(const State& state, int32_t lhs, int32_t rhs) {
458
4
        return compare_values(value_of(state, lhs), value_of(state, rhs));
459
4
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_27EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_43EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_42EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_36EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_37EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_44EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_2EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_3EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_4EEEii
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_5EEEii
Line
Count
Source
457
560
    static int compare_slots(const State& state, int32_t lhs, int32_t rhs) {
458
560
        return compare_values(value_of(state, lhs), value_of(state, rhs));
459
560
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_6EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_7EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_8EEEii
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_9EEEii
Line
Count
Source
457
3
    static int compare_slots(const State& state, int32_t lhs, int32_t rhs) {
458
3
        return compare_values(value_of(state, lhs), value_of(state, rhs));
459
3
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_28EEEii
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_29EEEii
Line
Count
Source
457
6
    static int compare_slots(const State& state, int32_t lhs, int32_t rhs) {
458
6
        return compare_values(value_of(state, lhs), value_of(state, rhs));
459
6
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_20EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_30EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_35EEEii
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_10EEEii
Line
Count
Source
457
7
    static int compare_slots(const State& state, int32_t lhs, int32_t rhs) {
458
7
        return compare_values(value_of(state, lhs), value_of(state, rhs));
459
7
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_11EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_12EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_25EEEii
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_26EEEii
Line
Count
Source
457
4
    static int compare_slots(const State& state, int32_t lhs, int32_t rhs) {
458
4
        return compare_values(value_of(state, lhs), value_of(state, rhs));
459
4
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_27EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_43EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_42EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_36EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_37EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_44EEEii
460
461
    /// The treap links are int32_t, so a state can index at most INT32_MAX + 1 slots.
462
    static constexpr size_t MAX_SLOTS =
463
            static_cast<size_t>(std::numeric_limits<int32_t>::max()) + 1;
464
465
    /// k has no upper bound and the FE cannot see the state size, so the representational limit is
466
    /// enforced where a state actually grows. A merge can exceed it as well: two states each
467
    /// within the limit can hold more distinct values together than one can index.
468
3.86k
    static void check_slot_capacity(size_t size) {
469
3.86k
        if (UNLIKELY(size > MAX_SLOTS)) {
470
0
            throw Exception(ErrorCode::INVALID_ARGUMENT,
471
0
                            "min_topk/max_topk cannot keep more than {} distinct values",
472
0
                            static_cast<int64_t>(MAX_SLOTS));
473
0
        }
474
3.86k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE19check_slot_capacityEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE19check_slot_capacityEm
Line
Count
Source
468
1
    static void check_slot_capacity(size_t size) {
469
1
        if (UNLIKELY(size > MAX_SLOTS)) {
470
0
            throw Exception(ErrorCode::INVALID_ARGUMENT,
471
0
                            "min_topk/max_topk cannot keep more than {} distinct values",
472
0
                            static_cast<int64_t>(MAX_SLOTS));
473
0
        }
474
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE19check_slot_capacityEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE19check_slot_capacityEm
Line
Count
Source
468
2.63k
    static void check_slot_capacity(size_t size) {
469
2.63k
        if (UNLIKELY(size > MAX_SLOTS)) {
470
0
            throw Exception(ErrorCode::INVALID_ARGUMENT,
471
0
                            "min_topk/max_topk cannot keep more than {} distinct values",
472
0
                            static_cast<int64_t>(MAX_SLOTS));
473
0
        }
474
2.63k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE19check_slot_capacityEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE19check_slot_capacityEm
Line
Count
Source
468
11
    static void check_slot_capacity(size_t size) {
469
11
        if (UNLIKELY(size > MAX_SLOTS)) {
470
0
            throw Exception(ErrorCode::INVALID_ARGUMENT,
471
0
                            "min_topk/max_topk cannot keep more than {} distinct values",
472
0
                            static_cast<int64_t>(MAX_SLOTS));
473
0
        }
474
11
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE19check_slot_capacityEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE19check_slot_capacityEm
Line
Count
Source
468
42
    static void check_slot_capacity(size_t size) {
469
42
        if (UNLIKELY(size > MAX_SLOTS)) {
470
0
            throw Exception(ErrorCode::INVALID_ARGUMENT,
471
0
                            "min_topk/max_topk cannot keep more than {} distinct values",
472
0
                            static_cast<int64_t>(MAX_SLOTS));
473
0
        }
474
42
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE19check_slot_capacityEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE19check_slot_capacityEm
Line
Count
Source
468
93
    static void check_slot_capacity(size_t size) {
469
93
        if (UNLIKELY(size > MAX_SLOTS)) {
470
0
            throw Exception(ErrorCode::INVALID_ARGUMENT,
471
0
                            "min_topk/max_topk cannot keep more than {} distinct values",
472
0
                            static_cast<int64_t>(MAX_SLOTS));
473
0
        }
474
93
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE19check_slot_capacityEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE19check_slot_capacityEm
Line
Count
Source
468
27
    static void check_slot_capacity(size_t size) {
469
27
        if (UNLIKELY(size > MAX_SLOTS)) {
470
0
            throw Exception(ErrorCode::INVALID_ARGUMENT,
471
0
                            "min_topk/max_topk cannot keep more than {} distinct values",
472
0
                            static_cast<int64_t>(MAX_SLOTS));
473
0
        }
474
27
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE19check_slot_capacityEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE19check_slot_capacityEm
Line
Count
Source
468
899
    static void check_slot_capacity(size_t size) {
469
899
        if (UNLIKELY(size > MAX_SLOTS)) {
470
0
            throw Exception(ErrorCode::INVALID_ARGUMENT,
471
0
                            "min_topk/max_topk cannot keep more than {} distinct values",
472
0
                            static_cast<int64_t>(MAX_SLOTS));
473
0
        }
474
899
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE19check_slot_capacityEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE19check_slot_capacityEm
Line
Count
Source
468
11
    static void check_slot_capacity(size_t size) {
469
11
        if (UNLIKELY(size > MAX_SLOTS)) {
470
0
            throw Exception(ErrorCode::INVALID_ARGUMENT,
471
0
                            "min_topk/max_topk cannot keep more than {} distinct values",
472
0
                            static_cast<int64_t>(MAX_SLOTS));
473
0
        }
474
11
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE19check_slot_capacityEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE19check_slot_capacityEm
Line
Count
Source
468
55
    static void check_slot_capacity(size_t size) {
469
55
        if (UNLIKELY(size > MAX_SLOTS)) {
470
0
            throw Exception(ErrorCode::INVALID_ARGUMENT,
471
0
                            "min_topk/max_topk cannot keep more than {} distinct values",
472
0
                            static_cast<int64_t>(MAX_SLOTS));
473
0
        }
474
55
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE19check_slot_capacityEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE19check_slot_capacityEm
Line
Count
Source
468
61
    static void check_slot_capacity(size_t size) {
469
61
        if (UNLIKELY(size > MAX_SLOTS)) {
470
0
            throw Exception(ErrorCode::INVALID_ARGUMENT,
471
0
                            "min_topk/max_topk cannot keep more than {} distinct values",
472
0
                            static_cast<int64_t>(MAX_SLOTS));
473
0
        }
474
61
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE19check_slot_capacityEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE19check_slot_capacityEm
Line
Count
Source
468
32
    static void check_slot_capacity(size_t size) {
469
32
        if (UNLIKELY(size > MAX_SLOTS)) {
470
0
            throw Exception(ErrorCode::INVALID_ARGUMENT,
471
0
                            "min_topk/max_topk cannot keep more than {} distinct values",
472
0
                            static_cast<int64_t>(MAX_SLOTS));
473
0
        }
474
32
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE19check_slot_capacityEm
475
476
    /// Appends (value, count) as the next slot.
477
3.44k
    static int32_t append_slot(State& state, ValueRef value, int64_t count) {
478
3.44k
        check_slot_capacity(state.slots.size() + 1);
479
3.44k
        auto slot = static_cast<int32_t>(state.slots.size());
480
3.44k
        state.slots.push_back(make_slot(count, next_priority(state)));
481
3.44k
        set_value(state, slot, value);
482
3.44k
        ++state.live;
483
3.44k
        return slot;
484
3.44k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_2EEERKhl
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_3EEERKal
Line
Count
Source
477
1
    static int32_t append_slot(State& state, ValueRef value, int64_t count) {
478
1
        check_slot_capacity(state.slots.size() + 1);
479
1
        auto slot = static_cast<int32_t>(state.slots.size());
480
1
        state.slots.push_back(make_slot(count, next_priority(state)));
481
1
        set_value(state, slot, value);
482
1
        ++state.live;
483
1
        return slot;
484
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_4EEERKsl
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_5EEERKil
Line
Count
Source
477
2.46k
    static int32_t append_slot(State& state, ValueRef value, int64_t count) {
478
2.46k
        check_slot_capacity(state.slots.size() + 1);
479
2.46k
        auto slot = static_cast<int32_t>(state.slots.size());
480
2.46k
        state.slots.push_back(make_slot(count, next_priority(state)));
481
2.46k
        set_value(state, slot, value);
482
2.46k
        ++state.live;
483
2.46k
        return slot;
484
2.46k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_6EEERKll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_7EEERKnl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_8EEERKfl
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_9EEERKdl
Line
Count
Source
477
5
    static int32_t append_slot(State& state, ValueRef value, int64_t count) {
478
5
        check_slot_capacity(state.slots.size() + 1);
479
5
        auto slot = static_cast<int32_t>(state.slots.size());
480
5
        state.slots.push_back(make_slot(count, next_priority(state)));
481
5
        set_value(state, slot, value);
482
5
        ++state.live;
483
5
        return slot;
484
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_28EEERKNS_7DecimalIiEEl
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_29EEERKNS_7DecimalIlEEl
Line
Count
Source
477
19
    static int32_t append_slot(State& state, ValueRef value, int64_t count) {
478
19
        check_slot_capacity(state.slots.size() + 1);
479
19
        auto slot = static_cast<int32_t>(state.slots.size());
480
19
        state.slots.push_back(make_slot(count, next_priority(state)));
481
19
        set_value(state, slot, value);
482
19
        ++state.live;
483
19
        return slot;
484
19
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_20EEERKNS_14DecimalV2ValueEl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_30EEERKNS_12Decimal128V3El
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_35EEERKNS_7DecimalIN4wide7integerILm256EiEEEEl
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_10EEENS_9StringRefEl
Line
Count
Source
477
66
    static int32_t append_slot(State& state, ValueRef value, int64_t count) {
478
66
        check_slot_capacity(state.slots.size() + 1);
479
66
        auto slot = static_cast<int32_t>(state.slots.size());
480
66
        state.slots.push_back(make_slot(count, next_priority(state)));
481
66
        set_value(state, slot, value);
482
66
        ++state.live;
483
66
        return slot;
484
66
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_11EEERKNS_16VecDateTimeValueEl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_12EEERKNS_16VecDateTimeValueEl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_25EEERKNS_11DateV2ValueINS_15DateV2ValueTypeEEEl
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_26EEERKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEEl
Line
Count
Source
477
10
    static int32_t append_slot(State& state, ValueRef value, int64_t count) {
478
10
        check_slot_capacity(state.slots.size() + 1);
479
10
        auto slot = static_cast<int32_t>(state.slots.size());
480
10
        state.slots.push_back(make_slot(count, next_priority(state)));
481
10
        set_value(state, slot, value);
482
10
        ++state.live;
483
10
        return slot;
484
10
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_27EEERKdl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_43EEERKNS_16TimeStampNsValueEl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_42EEERKNS_16TimestampTzValueEl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_36EEERKjl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_37EEERKol
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_44EEERKol
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_2EEERKhl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_3EEERKal
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_4EEERKsl
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_5EEERKil
Line
Count
Source
477
789
    static int32_t append_slot(State& state, ValueRef value, int64_t count) {
478
789
        check_slot_capacity(state.slots.size() + 1);
479
789
        auto slot = static_cast<int32_t>(state.slots.size());
480
789
        state.slots.push_back(make_slot(count, next_priority(state)));
481
789
        set_value(state, slot, value);
482
789
        ++state.live;
483
789
        return slot;
484
789
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_6EEERKll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_7EEERKnl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_8EEERKfl
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_9EEERKdl
Line
Count
Source
477
5
    static int32_t append_slot(State& state, ValueRef value, int64_t count) {
478
5
        check_slot_capacity(state.slots.size() + 1);
479
5
        auto slot = static_cast<int32_t>(state.slots.size());
480
5
        state.slots.push_back(make_slot(count, next_priority(state)));
481
5
        set_value(state, slot, value);
482
5
        ++state.live;
483
5
        return slot;
484
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_28EEERKNS_7DecimalIiEEl
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_29EEERKNS_7DecimalIlEEl
Line
Count
Source
477
30
    static int32_t append_slot(State& state, ValueRef value, int64_t count) {
478
30
        check_slot_capacity(state.slots.size() + 1);
479
30
        auto slot = static_cast<int32_t>(state.slots.size());
480
30
        state.slots.push_back(make_slot(count, next_priority(state)));
481
30
        set_value(state, slot, value);
482
30
        ++state.live;
483
30
        return slot;
484
30
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_20EEERKNS_14DecimalV2ValueEl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_30EEERKNS_12Decimal128V3El
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_35EEERKNS_7DecimalIN4wide7integerILm256EiEEEEl
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_10EEENS_9StringRefEl
Line
Count
Source
477
37
    static int32_t append_slot(State& state, ValueRef value, int64_t count) {
478
37
        check_slot_capacity(state.slots.size() + 1);
479
37
        auto slot = static_cast<int32_t>(state.slots.size());
480
37
        state.slots.push_back(make_slot(count, next_priority(state)));
481
37
        set_value(state, slot, value);
482
37
        ++state.live;
483
37
        return slot;
484
37
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_11EEERKNS_16VecDateTimeValueEl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_12EEERKNS_16VecDateTimeValueEl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_25EEERKNS_11DateV2ValueINS_15DateV2ValueTypeEEEl
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_26EEERKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEEl
Line
Count
Source
477
15
    static int32_t append_slot(State& state, ValueRef value, int64_t count) {
478
15
        check_slot_capacity(state.slots.size() + 1);
479
15
        auto slot = static_cast<int32_t>(state.slots.size());
480
15
        state.slots.push_back(make_slot(count, next_priority(state)));
481
15
        set_value(state, slot, value);
482
15
        ++state.live;
483
15
        return slot;
484
15
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_27EEERKdl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_43EEERKNS_16TimeStampNsValueEl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_42EEERKNS_16TimestampTzValueEl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_36EEERKjl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_37EEERKol
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_44EEERKol
485
486
17
    static int32_t append_slot(State& state, const IColumn& column, size_t row_num, int64_t count) {
487
17
        return append_slot(state, value_at(column, row_num), count);
488
17
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_2EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_3EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_4EEERKNS_7IColumnEml
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_5EEERKNS_7IColumnEml
Line
Count
Source
486
9
    static int32_t append_slot(State& state, const IColumn& column, size_t row_num, int64_t count) {
487
9
        return append_slot(state, value_at(column, row_num), count);
488
9
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_6EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_7EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_8EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_9EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_28EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_29EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_20EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_30EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_35EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_10EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_11EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_12EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_25EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_26EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_27EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_43EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_42EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_36EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_37EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_44EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_2EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_3EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_4EEERKNS_7IColumnEml
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_5EEERKNS_7IColumnEml
Line
Count
Source
486
8
    static int32_t append_slot(State& state, const IColumn& column, size_t row_num, int64_t count) {
487
8
        return append_slot(state, value_at(column, row_num), count);
488
8
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_6EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_7EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_8EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_9EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_28EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_29EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_20EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_30EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_35EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_10EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_11EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_12EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_25EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_26EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_27EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_43EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_42EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_36EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_37EEERKNS_7IColumnEml
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_44EEERKNS_7IColumnEml
489
490
    /// Rotates the subtree rooted at `node` right: the left child becomes the root and `node` its
491
    /// right child. The in-order sequence is unchanged, so the treap stays ordered.
492
2.38k
    static int32_t rotate_right(State& state, int32_t node) {
493
2.38k
        int32_t pivot = state.slots[node].left;
494
2.38k
        state.slots[node].left = state.slots[pivot].right;
495
2.38k
        state.slots[pivot].right = node;
496
2.38k
        return pivot;
497
2.38k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_2EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_3EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_4EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_5EEEi
Line
Count
Source
492
2.17k
    static int32_t rotate_right(State& state, int32_t node) {
493
2.17k
        int32_t pivot = state.slots[node].left;
494
2.17k
        state.slots[node].left = state.slots[pivot].right;
495
2.17k
        state.slots[pivot].right = node;
496
2.17k
        return pivot;
497
2.17k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_6EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_7EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_8EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_9EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_28EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_29EEEi
Line
Count
Source
492
2
    static int32_t rotate_right(State& state, int32_t node) {
493
2
        int32_t pivot = state.slots[node].left;
494
2
        state.slots[node].left = state.slots[pivot].right;
495
2
        state.slots[pivot].right = node;
496
2
        return pivot;
497
2
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_20EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_30EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_35EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_10EEEi
Line
Count
Source
492
9
    static int32_t rotate_right(State& state, int32_t node) {
493
9
        int32_t pivot = state.slots[node].left;
494
9
        state.slots[node].left = state.slots[pivot].right;
495
9
        state.slots[pivot].right = node;
496
9
        return pivot;
497
9
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_11EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_12EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_25EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_26EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_27EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_43EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_42EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_36EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_37EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_44EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_2EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_3EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_4EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_5EEEi
Line
Count
Source
492
167
    static int32_t rotate_right(State& state, int32_t node) {
493
167
        int32_t pivot = state.slots[node].left;
494
167
        state.slots[node].left = state.slots[pivot].right;
495
167
        state.slots[pivot].right = node;
496
167
        return pivot;
497
167
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_6EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_7EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_8EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_9EEEi
Line
Count
Source
492
2
    static int32_t rotate_right(State& state, int32_t node) {
493
2
        int32_t pivot = state.slots[node].left;
494
2
        state.slots[node].left = state.slots[pivot].right;
495
2
        state.slots[pivot].right = node;
496
2
        return pivot;
497
2
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_28EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_29EEEi
Line
Count
Source
492
11
    static int32_t rotate_right(State& state, int32_t node) {
493
11
        int32_t pivot = state.slots[node].left;
494
11
        state.slots[node].left = state.slots[pivot].right;
495
11
        state.slots[pivot].right = node;
496
11
        return pivot;
497
11
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_20EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_30EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_35EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_10EEEi
Line
Count
Source
492
14
    static int32_t rotate_right(State& state, int32_t node) {
493
14
        int32_t pivot = state.slots[node].left;
494
14
        state.slots[node].left = state.slots[pivot].right;
495
14
        state.slots[pivot].right = node;
496
14
        return pivot;
497
14
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_11EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_12EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_25EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_26EEEi
Line
Count
Source
492
4
    static int32_t rotate_right(State& state, int32_t node) {
493
4
        int32_t pivot = state.slots[node].left;
494
4
        state.slots[node].left = state.slots[pivot].right;
495
4
        state.slots[pivot].right = node;
496
4
        return pivot;
497
4
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_27EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_43EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_42EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_36EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_37EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_44EEEi
498
499
809
    static int32_t rotate_left(State& state, int32_t node) {
500
809
        int32_t pivot = state.slots[node].right;
501
809
        state.slots[node].right = state.slots[pivot].left;
502
809
        state.slots[pivot].left = node;
503
809
        return pivot;
504
809
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_2EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_3EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_4EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_5EEEi
Line
Count
Source
499
182
    static int32_t rotate_left(State& state, int32_t node) {
500
182
        int32_t pivot = state.slots[node].right;
501
182
        state.slots[node].right = state.slots[pivot].left;
502
182
        state.slots[pivot].left = node;
503
182
        return pivot;
504
182
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_6EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_7EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_8EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_9EEEi
Line
Count
Source
499
2
    static int32_t rotate_left(State& state, int32_t node) {
500
2
        int32_t pivot = state.slots[node].right;
501
2
        state.slots[node].right = state.slots[pivot].left;
502
2
        state.slots[pivot].left = node;
503
2
        return pivot;
504
2
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_28EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_29EEEi
Line
Count
Source
499
4
    static int32_t rotate_left(State& state, int32_t node) {
500
4
        int32_t pivot = state.slots[node].right;
501
4
        state.slots[node].right = state.slots[pivot].left;
502
4
        state.slots[pivot].left = node;
503
4
        return pivot;
504
4
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_20EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_30EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_35EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_10EEEi
Line
Count
Source
499
20
    static int32_t rotate_left(State& state, int32_t node) {
500
20
        int32_t pivot = state.slots[node].right;
501
20
        state.slots[node].right = state.slots[pivot].left;
502
20
        state.slots[pivot].left = node;
503
20
        return pivot;
504
20
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_11EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_12EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_25EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_26EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_27EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_43EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_42EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_36EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_37EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_44EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_2EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_3EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_4EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_5EEEi
Line
Count
Source
499
593
    static int32_t rotate_left(State& state, int32_t node) {
500
593
        int32_t pivot = state.slots[node].right;
501
593
        state.slots[node].right = state.slots[pivot].left;
502
593
        state.slots[pivot].left = node;
503
593
        return pivot;
504
593
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_6EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_7EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_8EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_9EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_28EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_29EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_20EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_30EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_35EEEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_10EEEi
Line
Count
Source
499
8
    static int32_t rotate_left(State& state, int32_t node) {
500
8
        int32_t pivot = state.slots[node].right;
501
8
        state.slots[node].right = state.slots[pivot].left;
502
8
        state.slots[pivot].left = node;
503
8
        return pivot;
504
8
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_11EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_12EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_25EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_26EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_27EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_43EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_42EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_36EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_37EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE11rotate_leftERNS_22AggregateTopKCountDataILS1_44EEEi
505
506
    /// One descent that performs the whole per-row update: an equal value bumps its count and
507
    /// reports no insertion; a missing value is linked as a new slot at the leaf and rotated up
508
    /// while the recursion unwinds. `inserted_slot` receives the new slot, NO_SLOT on a hit.
509
    /// The count is the number of rows the caller adds (1 for add, the singleton's count for a
510
    /// merge).
511
    static int32_t add_or_increment(State& state, int32_t node, ValueRef value, int64_t count,
512
21.4k
                                    int32_t* inserted_slot) {
513
21.4k
        if (node == State::NO_SLOT) {
514
3.41k
            *inserted_slot = append_slot(state, value, count);
515
3.41k
            return *inserted_slot;
516
3.41k
        }
517
18.0k
        int cmp = compare_values(value_of(state, node), value);
518
18.0k
        if (cmp == 0) {
519
94
            state.slots[node].count = checked_add(state.slots[node].count, count);
520
94
            return node;
521
94
        }
522
17.9k
        if (comes_before(cmp)) {
523
            // The stored value is the better one, so the input belongs in the right subtree.
524
4.24k
            state.slots[node].right =
525
4.24k
                    add_or_increment(state, state.slots[node].right, value, count, inserted_slot);
526
4.24k
            if (state.slots[state.slots[node].right].priority > state.slots[node].priority) {
527
809
                return rotate_left(state, node);
528
809
            }
529
13.6k
        } else {
530
13.6k
            state.slots[node].left =
531
13.6k
                    add_or_increment(state, state.slots[node].left, value, count, inserted_slot);
532
13.6k
            if (state.slots[state.slots[node].left].priority > state.slots[node].priority) {
533
2.38k
                return rotate_right(state, node);
534
2.38k
            }
535
13.6k
        }
536
14.7k
        return node;
537
17.9k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_2EEEiRKhlPi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_3EEEiRKalPi
Line
Count
Source
512
1
                                    int32_t* inserted_slot) {
513
1
        if (node == State::NO_SLOT) {
514
1
            *inserted_slot = append_slot(state, value, count);
515
1
            return *inserted_slot;
516
1
        }
517
0
        int cmp = compare_values(value_of(state, node), value);
518
0
        if (cmp == 0) {
519
0
            state.slots[node].count = checked_add(state.slots[node].count, count);
520
0
            return node;
521
0
        }
522
0
        if (comes_before(cmp)) {
523
            // The stored value is the better one, so the input belongs in the right subtree.
524
0
            state.slots[node].right =
525
0
                    add_or_increment(state, state.slots[node].right, value, count, inserted_slot);
526
0
            if (state.slots[state.slots[node].right].priority > state.slots[node].priority) {
527
0
                return rotate_left(state, node);
528
0
            }
529
0
        } else {
530
0
            state.slots[node].left =
531
0
                    add_or_increment(state, state.slots[node].left, value, count, inserted_slot);
532
0
            if (state.slots[state.slots[node].left].priority > state.slots[node].priority) {
533
0
                return rotate_right(state, node);
534
0
            }
535
0
        }
536
0
        return node;
537
0
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_4EEEiRKslPi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_5EEEiRKilPi
Line
Count
Source
512
16.2k
                                    int32_t* inserted_slot) {
513
16.2k
        if (node == State::NO_SLOT) {
514
2.45k
            *inserted_slot = append_slot(state, value, count);
515
2.45k
            return *inserted_slot;
516
2.45k
        }
517
13.7k
        int cmp = compare_values(value_of(state, node), value);
518
13.7k
        if (cmp == 0) {
519
42
            state.slots[node].count = checked_add(state.slots[node].count, count);
520
42
            return node;
521
42
        }
522
13.7k
        if (comes_before(cmp)) {
523
            // The stored value is the better one, so the input belongs in the right subtree.
524
558
            state.slots[node].right =
525
558
                    add_or_increment(state, state.slots[node].right, value, count, inserted_slot);
526
558
            if (state.slots[state.slots[node].right].priority > state.slots[node].priority) {
527
182
                return rotate_left(state, node);
528
182
            }
529
13.1k
        } else {
530
13.1k
            state.slots[node].left =
531
13.1k
                    add_or_increment(state, state.slots[node].left, value, count, inserted_slot);
532
13.1k
            if (state.slots[state.slots[node].left].priority > state.slots[node].priority) {
533
2.17k
                return rotate_right(state, node);
534
2.17k
            }
535
13.1k
        }
536
11.3k
        return node;
537
13.7k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_6EEEiRKllPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_7EEEiRKnlPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_8EEEiRKflPi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_9EEEiRKdlPi
Line
Count
Source
512
8
                                    int32_t* inserted_slot) {
513
8
        if (node == State::NO_SLOT) {
514
5
            *inserted_slot = append_slot(state, value, count);
515
5
            return *inserted_slot;
516
5
        }
517
3
        int cmp = compare_values(value_of(state, node), value);
518
3
        if (cmp == 0) {
519
0
            state.slots[node].count = checked_add(state.slots[node].count, count);
520
0
            return node;
521
0
        }
522
3
        if (comes_before(cmp)) {
523
            // The stored value is the better one, so the input belongs in the right subtree.
524
3
            state.slots[node].right =
525
3
                    add_or_increment(state, state.slots[node].right, value, count, inserted_slot);
526
3
            if (state.slots[state.slots[node].right].priority > state.slots[node].priority) {
527
2
                return rotate_left(state, node);
528
2
            }
529
3
        } else {
530
0
            state.slots[node].left =
531
0
                    add_or_increment(state, state.slots[node].left, value, count, inserted_slot);
532
0
            if (state.slots[state.slots[node].left].priority > state.slots[node].priority) {
533
0
                return rotate_right(state, node);
534
0
            }
535
0
        }
536
1
        return node;
537
3
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_28EEEiRKNS_7DecimalIiEElPi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_29EEEiRKNS_7DecimalIlEElPi
Line
Count
Source
512
39
                                    int32_t* inserted_slot) {
513
39
        if (node == State::NO_SLOT) {
514
19
            *inserted_slot = append_slot(state, value, count);
515
19
            return *inserted_slot;
516
19
        }
517
20
        int cmp = compare_values(value_of(state, node), value);
518
20
        if (cmp == 0) {
519
9
            state.slots[node].count = checked_add(state.slots[node].count, count);
520
9
            return node;
521
9
        }
522
11
        if (comes_before(cmp)) {
523
            // The stored value is the better one, so the input belongs in the right subtree.
524
6
            state.slots[node].right =
525
6
                    add_or_increment(state, state.slots[node].right, value, count, inserted_slot);
526
6
            if (state.slots[state.slots[node].right].priority > state.slots[node].priority) {
527
4
                return rotate_left(state, node);
528
4
            }
529
6
        } else {
530
5
            state.slots[node].left =
531
5
                    add_or_increment(state, state.slots[node].left, value, count, inserted_slot);
532
5
            if (state.slots[state.slots[node].left].priority > state.slots[node].priority) {
533
2
                return rotate_right(state, node);
534
2
            }
535
5
        }
536
5
        return node;
537
11
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_20EEEiRKNS_14DecimalV2ValueElPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_30EEEiRKNS_12Decimal128V3ElPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_35EEEiRKNS_7DecimalIN4wide7integerILm256EiEEEElPi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_10EEEiNS_9StringRefElPi
Line
Count
Source
512
148
                                    int32_t* inserted_slot) {
513
148
        if (node == State::NO_SLOT) {
514
66
            *inserted_slot = append_slot(state, value, count);
515
66
            return *inserted_slot;
516
66
        }
517
82
        int cmp = compare_values(value_of(state, node), value);
518
82
        if (cmp == 0) {
519
9
            state.slots[node].count = checked_add(state.slots[node].count, count);
520
9
            return node;
521
9
        }
522
73
        if (comes_before(cmp)) {
523
            // The stored value is the better one, so the input belongs in the right subtree.
524
54
            state.slots[node].right =
525
54
                    add_or_increment(state, state.slots[node].right, value, count, inserted_slot);
526
54
            if (state.slots[state.slots[node].right].priority > state.slots[node].priority) {
527
20
                return rotate_left(state, node);
528
20
            }
529
54
        } else {
530
19
            state.slots[node].left =
531
19
                    add_or_increment(state, state.slots[node].left, value, count, inserted_slot);
532
19
            if (state.slots[state.slots[node].left].priority > state.slots[node].priority) {
533
9
                return rotate_right(state, node);
534
9
            }
535
19
        }
536
44
        return node;
537
73
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_11EEEiRKNS_16VecDateTimeValueElPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_12EEEiRKNS_16VecDateTimeValueElPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_25EEEiRKNS_11DateV2ValueINS_15DateV2ValueTypeEEElPi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_26EEEiRKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEElPi
Line
Count
Source
512
14
                                    int32_t* inserted_slot) {
513
14
        if (node == State::NO_SLOT) {
514
10
            *inserted_slot = append_slot(state, value, count);
515
10
            return *inserted_slot;
516
10
        }
517
4
        int cmp = compare_values(value_of(state, node), value);
518
4
        if (cmp == 0) {
519
0
            state.slots[node].count = checked_add(state.slots[node].count, count);
520
0
            return node;
521
0
        }
522
4
        if (comes_before(cmp)) {
523
            // The stored value is the better one, so the input belongs in the right subtree.
524
3
            state.slots[node].right =
525
3
                    add_or_increment(state, state.slots[node].right, value, count, inserted_slot);
526
3
            if (state.slots[state.slots[node].right].priority > state.slots[node].priority) {
527
0
                return rotate_left(state, node);
528
0
            }
529
3
        } else {
530
1
            state.slots[node].left =
531
1
                    add_or_increment(state, state.slots[node].left, value, count, inserted_slot);
532
1
            if (state.slots[state.slots[node].left].priority > state.slots[node].priority) {
533
0
                return rotate_right(state, node);
534
0
            }
535
1
        }
536
4
        return node;
537
4
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_27EEEiRKdlPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_43EEEiRKNS_16TimeStampNsValueElPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_42EEEiRKNS_16TimestampTzValueElPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_36EEEiRKjlPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_37EEEiRKolPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_44EEEiRKolPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_2EEEiRKhlPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_3EEEiRKalPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_4EEEiRKslPi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_5EEEiRKilPi
Line
Count
Source
512
4.81k
                                    int32_t* inserted_slot) {
513
4.81k
        if (node == State::NO_SLOT) {
514
778
            *inserted_slot = append_slot(state, value, count);
515
778
            return *inserted_slot;
516
778
        }
517
4.03k
        int cmp = compare_values(value_of(state, node), value);
518
4.03k
        if (cmp == 0) {
519
22
            state.slots[node].count = checked_add(state.slots[node].count, count);
520
22
            return node;
521
22
        }
522
4.01k
        if (comes_before(cmp)) {
523
            // The stored value is the better one, so the input belongs in the right subtree.
524
3.60k
            state.slots[node].right =
525
3.60k
                    add_or_increment(state, state.slots[node].right, value, count, inserted_slot);
526
3.60k
            if (state.slots[state.slots[node].right].priority > state.slots[node].priority) {
527
593
                return rotate_left(state, node);
528
593
            }
529
3.60k
        } else {
530
409
            state.slots[node].left =
531
409
                    add_or_increment(state, state.slots[node].left, value, count, inserted_slot);
532
409
            if (state.slots[state.slots[node].left].priority > state.slots[node].priority) {
533
167
                return rotate_right(state, node);
534
167
            }
535
409
        }
536
3.25k
        return node;
537
4.01k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_6EEEiRKllPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_7EEEiRKnlPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_8EEEiRKflPi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_9EEEiRKdlPi
Line
Count
Source
512
8
                                    int32_t* inserted_slot) {
513
8
        if (node == State::NO_SLOT) {
514
5
            *inserted_slot = append_slot(state, value, count);
515
5
            return *inserted_slot;
516
5
        }
517
3
        int cmp = compare_values(value_of(state, node), value);
518
3
        if (cmp == 0) {
519
0
            state.slots[node].count = checked_add(state.slots[node].count, count);
520
0
            return node;
521
0
        }
522
3
        if (comes_before(cmp)) {
523
            // The stored value is the better one, so the input belongs in the right subtree.
524
0
            state.slots[node].right =
525
0
                    add_or_increment(state, state.slots[node].right, value, count, inserted_slot);
526
0
            if (state.slots[state.slots[node].right].priority > state.slots[node].priority) {
527
0
                return rotate_left(state, node);
528
0
            }
529
3
        } else {
530
3
            state.slots[node].left =
531
3
                    add_or_increment(state, state.slots[node].left, value, count, inserted_slot);
532
3
            if (state.slots[state.slots[node].left].priority > state.slots[node].priority) {
533
2
                return rotate_right(state, node);
534
2
            }
535
3
        }
536
1
        return node;
537
3
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_28EEEiRKNS_7DecimalIiEElPi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_29EEEiRKNS_7DecimalIlEElPi
Line
Count
Source
512
60
                                    int32_t* inserted_slot) {
513
60
        if (node == State::NO_SLOT) {
514
30
            *inserted_slot = append_slot(state, value, count);
515
30
            return *inserted_slot;
516
30
        }
517
30
        int cmp = compare_values(value_of(state, node), value);
518
30
        if (cmp == 0) {
519
6
            state.slots[node].count = checked_add(state.slots[node].count, count);
520
6
            return node;
521
6
        }
522
24
        if (comes_before(cmp)) {
523
            // The stored value is the better one, so the input belongs in the right subtree.
524
0
            state.slots[node].right =
525
0
                    add_or_increment(state, state.slots[node].right, value, count, inserted_slot);
526
0
            if (state.slots[state.slots[node].right].priority > state.slots[node].priority) {
527
0
                return rotate_left(state, node);
528
0
            }
529
24
        } else {
530
24
            state.slots[node].left =
531
24
                    add_or_increment(state, state.slots[node].left, value, count, inserted_slot);
532
24
            if (state.slots[state.slots[node].left].priority > state.slots[node].priority) {
533
11
                return rotate_right(state, node);
534
11
            }
535
24
        }
536
13
        return node;
537
24
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_20EEEiRKNS_14DecimalV2ValueElPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_30EEEiRKNS_12Decimal128V3ElPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_35EEEiRKNS_7DecimalIN4wide7integerILm256EiEEEElPi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_10EEEiNS_9StringRefElPi
Line
Count
Source
512
82
                                    int32_t* inserted_slot) {
513
82
        if (node == State::NO_SLOT) {
514
37
            *inserted_slot = append_slot(state, value, count);
515
37
            return *inserted_slot;
516
37
        }
517
45
        int cmp = compare_values(value_of(state, node), value);
518
45
        if (cmp == 0) {
519
6
            state.slots[node].count = checked_add(state.slots[node].count, count);
520
6
            return node;
521
6
        }
522
39
        if (comes_before(cmp)) {
523
            // The stored value is the better one, so the input belongs in the right subtree.
524
14
            state.slots[node].right =
525
14
                    add_or_increment(state, state.slots[node].right, value, count, inserted_slot);
526
14
            if (state.slots[state.slots[node].right].priority > state.slots[node].priority) {
527
8
                return rotate_left(state, node);
528
8
            }
529
25
        } else {
530
25
            state.slots[node].left =
531
25
                    add_or_increment(state, state.slots[node].left, value, count, inserted_slot);
532
25
            if (state.slots[state.slots[node].left].priority > state.slots[node].priority) {
533
14
                return rotate_right(state, node);
534
14
            }
535
25
        }
536
17
        return node;
537
39
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_11EEEiRKNS_16VecDateTimeValueElPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_12EEEiRKNS_16VecDateTimeValueElPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_25EEEiRKNS_11DateV2ValueINS_15DateV2ValueTypeEEElPi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_26EEEiRKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEElPi
Line
Count
Source
512
25
                                    int32_t* inserted_slot) {
513
25
        if (node == State::NO_SLOT) {
514
15
            *inserted_slot = append_slot(state, value, count);
515
15
            return *inserted_slot;
516
15
        }
517
10
        int cmp = compare_values(value_of(state, node), value);
518
10
        if (cmp == 0) {
519
0
            state.slots[node].count = checked_add(state.slots[node].count, count);
520
0
            return node;
521
0
        }
522
10
        if (comes_before(cmp)) {
523
            // The stored value is the better one, so the input belongs in the right subtree.
524
1
            state.slots[node].right =
525
1
                    add_or_increment(state, state.slots[node].right, value, count, inserted_slot);
526
1
            if (state.slots[state.slots[node].right].priority > state.slots[node].priority) {
527
0
                return rotate_left(state, node);
528
0
            }
529
9
        } else {
530
9
            state.slots[node].left =
531
9
                    add_or_increment(state, state.slots[node].left, value, count, inserted_slot);
532
9
            if (state.slots[state.slots[node].left].priority > state.slots[node].priority) {
533
4
                return rotate_right(state, node);
534
4
            }
535
9
        }
536
6
        return node;
537
10
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_27EEEiRKdlPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_43EEEiRKNS_16TimeStampNsValueElPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_42EEEiRKNS_16TimestampTzValueElPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_36EEEiRKjlPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_37EEEiRKolPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_44EEEiRKolPi
538
539
    /// Removes the last entry in the aggregate's order (the largest value for MIN) and returns the
540
    /// new subtree root. That entry has no right child, so its left subtree takes its place; the
541
    /// child's priority is below the parent's, so no rotation is needed.
542
11.5k
    static int32_t erase_worst(State& state, int32_t node, int32_t* removed) {
543
11.5k
        if (state.slots[node].right == State::NO_SLOT) {
544
1.94k
            *removed = node;
545
1.94k
            return state.slots[node].left;
546
1.94k
        }
547
9.57k
        state.slots[node].right = erase_worst(state, state.slots[node].right, removed);
548
9.57k
        return node;
549
11.5k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_2EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_3EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_4EEEiPi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_5EEEiPi
Line
Count
Source
542
10.9k
    static int32_t erase_worst(State& state, int32_t node, int32_t* removed) {
543
10.9k
        if (state.slots[node].right == State::NO_SLOT) {
544
1.73k
            *removed = node;
545
1.73k
            return state.slots[node].left;
546
1.73k
        }
547
9.26k
        state.slots[node].right = erase_worst(state, state.slots[node].right, removed);
548
9.26k
        return node;
549
10.9k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_6EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_7EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_8EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_9EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_28EEEiPi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_29EEEiPi
Line
Count
Source
542
3
    static int32_t erase_worst(State& state, int32_t node, int32_t* removed) {
543
3
        if (state.slots[node].right == State::NO_SLOT) {
544
2
            *removed = node;
545
2
            return state.slots[node].left;
546
2
        }
547
1
        state.slots[node].right = erase_worst(state, state.slots[node].right, removed);
548
1
        return node;
549
3
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_20EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_30EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_35EEEiPi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_10EEEiPi
Line
Count
Source
542
32
    static int32_t erase_worst(State& state, int32_t node, int32_t* removed) {
543
32
        if (state.slots[node].right == State::NO_SLOT) {
544
12
            *removed = node;
545
12
            return state.slots[node].left;
546
12
        }
547
20
        state.slots[node].right = erase_worst(state, state.slots[node].right, removed);
548
20
        return node;
549
32
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_11EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_12EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_25EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_26EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_27EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_43EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_42EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_36EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_37EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_44EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_2EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_3EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_4EEEiPi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_5EEEiPi
Line
Count
Source
542
419
    static int32_t erase_worst(State& state, int32_t node, int32_t* removed) {
543
419
        if (state.slots[node].right == State::NO_SLOT) {
544
163
            *removed = node;
545
163
            return state.slots[node].left;
546
163
        }
547
256
        state.slots[node].right = erase_worst(state, state.slots[node].right, removed);
548
256
        return node;
549
419
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_6EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_7EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_8EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_9EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_28EEEiPi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_29EEEiPi
Line
Count
Source
542
24
    static int32_t erase_worst(State& state, int32_t node, int32_t* removed) {
543
24
        if (state.slots[node].right == State::NO_SLOT) {
544
13
            *removed = node;
545
13
            return state.slots[node].left;
546
13
        }
547
11
        state.slots[node].right = erase_worst(state, state.slots[node].right, removed);
548
11
        return node;
549
24
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_20EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_30EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_35EEEiPi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_10EEEiPi
Line
Count
Source
542
34
    static int32_t erase_worst(State& state, int32_t node, int32_t* removed) {
543
34
        if (state.slots[node].right == State::NO_SLOT) {
544
18
            *removed = node;
545
18
            return state.slots[node].left;
546
18
        }
547
16
        state.slots[node].right = erase_worst(state, state.slots[node].right, removed);
548
16
        return node;
549
34
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_11EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_12EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_25EEEiPi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_26EEEiPi
Line
Count
Source
542
11
    static int32_t erase_worst(State& state, int32_t node, int32_t* removed) {
543
11
        if (state.slots[node].right == State::NO_SLOT) {
544
5
            *removed = node;
545
5
            return state.slots[node].left;
546
5
        }
547
6
        state.slots[node].right = erase_worst(state, state.slots[node].right, removed);
548
6
        return node;
549
11
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_27EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_43EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_42EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_36EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_37EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_44EEEiPi
550
551
2.29k
    static void refresh_worst(State& state) {
552
2.29k
        int32_t node = state.root;
553
11.9k
        while (node != State::NO_SLOT && state.slots[node].right != State::NO_SLOT) {
554
9.68k
            node = state.slots[node].right;
555
9.68k
        }
556
2.29k
        state.worst = node;
557
2.29k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_2EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_3EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_4EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_5EEE
Line
Count
Source
551
1.87k
    static void refresh_worst(State& state) {
552
1.87k
        int32_t node = state.root;
553
11.1k
        while (node != State::NO_SLOT && state.slots[node].right != State::NO_SLOT) {
554
9.31k
            node = state.slots[node].right;
555
9.31k
        }
556
1.87k
        state.worst = node;
557
1.87k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_6EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_7EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_8EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_9EEE
Line
Count
Source
551
4
    static void refresh_worst(State& state) {
552
4
        int32_t node = state.root;
553
5
        while (node != State::NO_SLOT && state.slots[node].right != State::NO_SLOT) {
554
1
            node = state.slots[node].right;
555
1
        }
556
4
        state.worst = node;
557
4
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_28EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_29EEE
Line
Count
Source
551
19
    static void refresh_worst(State& state) {
552
19
        int32_t node = state.root;
553
27
        while (node != State::NO_SLOT && state.slots[node].right != State::NO_SLOT) {
554
8
            node = state.slots[node].right;
555
8
        }
556
19
        state.worst = node;
557
19
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_20EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_30EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_35EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_10EEE
Line
Count
Source
551
33
    static void refresh_worst(State& state) {
552
33
        int32_t node = state.root;
553
63
        while (node != State::NO_SLOT && state.slots[node].right != State::NO_SLOT) {
554
30
            node = state.slots[node].right;
555
30
        }
556
33
        state.worst = node;
557
33
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_11EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_12EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_25EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_26EEE
Line
Count
Source
551
13
    static void refresh_worst(State& state) {
552
13
        int32_t node = state.root;
553
17
        while (node != State::NO_SLOT && state.slots[node].right != State::NO_SLOT) {
554
4
            node = state.slots[node].right;
555
4
        }
556
13
        state.worst = node;
557
13
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_27EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_43EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_42EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_36EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_37EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_44EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_2EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_3EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_4EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_5EEE
Line
Count
Source
551
254
    static void refresh_worst(State& state) {
552
254
        int32_t node = state.root;
553
539
        while (node != State::NO_SLOT && state.slots[node].right != State::NO_SLOT) {
554
285
            node = state.slots[node].right;
555
285
        }
556
254
        state.worst = node;
557
254
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_6EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_7EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_8EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_9EEE
Line
Count
Source
551
4
    static void refresh_worst(State& state) {
552
4
        int32_t node = state.root;
553
5
        while (node != State::NO_SLOT && state.slots[node].right != State::NO_SLOT) {
554
1
            node = state.slots[node].right;
555
1
        }
556
4
        state.worst = node;
557
4
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_28EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_29EEE
Line
Count
Source
551
32
    static void refresh_worst(State& state) {
552
32
        int32_t node = state.root;
553
47
        while (node != State::NO_SLOT && state.slots[node].right != State::NO_SLOT) {
554
15
            node = state.slots[node].right;
555
15
        }
556
32
        state.worst = node;
557
32
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_20EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_30EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_35EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_10EEE
Line
Count
Source
551
37
    static void refresh_worst(State& state) {
552
37
        int32_t node = state.root;
553
55
        while (node != State::NO_SLOT && state.slots[node].right != State::NO_SLOT) {
554
18
            node = state.slots[node].right;
555
18
        }
556
37
        state.worst = node;
557
37
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_11EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_12EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_25EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_26EEE
Line
Count
Source
551
18
    static void refresh_worst(State& state) {
552
18
        int32_t node = state.root;
553
25
        while (node != State::NO_SLOT && state.slots[node].right != State::NO_SLOT) {
554
7
            node = state.slots[node].right;
555
7
        }
556
18
        state.worst = node;
557
18
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_27EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_43EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_42EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_36EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_37EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_44EEE
558
559
    /// The first live slot in the aggregate's order, i.e. the best value the state holds.
560
34
    static int32_t best_slot(const State& state) {
561
34
        int32_t node = state.root;
562
53
        while (node != State::NO_SLOT && state.slots[node].left != State::NO_SLOT) {
563
19
            node = state.slots[node].left;
564
19
        }
565
34
        return node;
566
34
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_2EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_3EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_4EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_5EEE
Line
Count
Source
560
10
    static int32_t best_slot(const State& state) {
561
10
        int32_t node = state.root;
562
17
        while (node != State::NO_SLOT && state.slots[node].left != State::NO_SLOT) {
563
7
            node = state.slots[node].left;
564
7
        }
565
10
        return node;
566
10
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_6EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_7EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_8EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_9EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_28EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_29EEE
Line
Count
Source
560
3
    static int32_t best_slot(const State& state) {
561
3
        int32_t node = state.root;
562
3
        while (node != State::NO_SLOT && state.slots[node].left != State::NO_SLOT) {
563
0
            node = state.slots[node].left;
564
0
        }
565
3
        return node;
566
3
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_20EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_30EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_35EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_10EEE
Line
Count
Source
560
5
    static int32_t best_slot(const State& state) {
561
5
        int32_t node = state.root;
562
8
        while (node != State::NO_SLOT && state.slots[node].left != State::NO_SLOT) {
563
3
            node = state.slots[node].left;
564
3
        }
565
5
        return node;
566
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_11EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_12EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_25EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_26EEE
Line
Count
Source
560
2
    static int32_t best_slot(const State& state) {
561
2
        int32_t node = state.root;
562
3
        while (node != State::NO_SLOT && state.slots[node].left != State::NO_SLOT) {
563
1
            node = state.slots[node].left;
564
1
        }
565
2
        return node;
566
2
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_27EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_43EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_42EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_36EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_37EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_44EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_2EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_3EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_4EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_5EEE
Line
Count
Source
560
6
    static int32_t best_slot(const State& state) {
561
6
        int32_t node = state.root;
562
8
        while (node != State::NO_SLOT && state.slots[node].left != State::NO_SLOT) {
563
2
            node = state.slots[node].left;
564
2
        }
565
6
        return node;
566
6
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_6EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_7EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_8EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_9EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_28EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_29EEE
Line
Count
Source
560
3
    static int32_t best_slot(const State& state) {
561
3
        int32_t node = state.root;
562
5
        while (node != State::NO_SLOT && state.slots[node].left != State::NO_SLOT) {
563
2
            node = state.slots[node].left;
564
2
        }
565
3
        return node;
566
3
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_20EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_30EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_35EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_10EEE
Line
Count
Source
560
3
    static int32_t best_slot(const State& state) {
561
3
        int32_t node = state.root;
562
5
        while (node != State::NO_SLOT && state.slots[node].left != State::NO_SLOT) {
563
2
            node = state.slots[node].left;
564
2
        }
565
3
        return node;
566
3
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_11EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_12EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_25EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_26EEE
Line
Count
Source
560
2
    static int32_t best_slot(const State& state) {
561
2
        int32_t node = state.root;
562
4
        while (node != State::NO_SLOT && state.slots[node].left != State::NO_SLOT) {
563
2
            node = state.slots[node].left;
564
2
        }
565
2
        return node;
566
2
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_27EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_43EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_42EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_36EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_37EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_44EEE
567
568
    /// Slots in the aggregate's order, i.e. the order of the result array.
569
576
    static void collect_in_order(const State& state, DorisVector<int32_t>& slots) {
570
576
        slots.reserve(static_cast<size_t>(state.live));
571
576
        DorisVector<int32_t> stack;
572
576
        stack.reserve(64);
573
576
        int32_t node = state.root;
574
3.95k
        while (node != State::NO_SLOT || !stack.empty()) {
575
6.74k
            while (node != State::NO_SLOT) {
576
3.37k
                stack.push_back(node);
577
3.37k
                node = state.slots[node].left;
578
3.37k
            }
579
3.37k
            node = stack.back();
580
3.37k
            stack.pop_back();
581
            // Only live slots are reachable from the root; an evicted slot has no row count.
582
3.37k
            DCHECK_GE(state.slots[node].count, 0);
583
3.37k
            slots.push_back(node);
584
3.37k
            node = state.slots[node].right;
585
3.37k
        }
586
576
        DCHECK_EQ(static_cast<int64_t>(slots.size()), state.live);
587
576
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_2EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_3EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
569
1
    static void collect_in_order(const State& state, DorisVector<int32_t>& slots) {
570
1
        slots.reserve(static_cast<size_t>(state.live));
571
1
        DorisVector<int32_t> stack;
572
1
        stack.reserve(64);
573
1
        int32_t node = state.root;
574
2
        while (node != State::NO_SLOT || !stack.empty()) {
575
2
            while (node != State::NO_SLOT) {
576
1
                stack.push_back(node);
577
1
                node = state.slots[node].left;
578
1
            }
579
1
            node = stack.back();
580
1
            stack.pop_back();
581
            // Only live slots are reachable from the root; an evicted slot has no row count.
582
1
            DCHECK_GE(state.slots[node].count, 0);
583
1
            slots.push_back(node);
584
1
            node = state.slots[node].right;
585
1
        }
586
        DCHECK_EQ(static_cast<int64_t>(slots.size()), state.live);
587
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_4EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_5EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
569
233
    static void collect_in_order(const State& state, DorisVector<int32_t>& slots) {
570
233
        slots.reserve(static_cast<size_t>(state.live));
571
233
        DorisVector<int32_t> stack;
572
233
        stack.reserve(64);
573
233
        int32_t node = state.root;
574
2.42k
        while (node != State::NO_SLOT || !stack.empty()) {
575
4.38k
            while (node != State::NO_SLOT) {
576
2.19k
                stack.push_back(node);
577
2.19k
                node = state.slots[node].left;
578
2.19k
            }
579
2.19k
            node = stack.back();
580
2.19k
            stack.pop_back();
581
            // Only live slots are reachable from the root; an evicted slot has no row count.
582
2.19k
            DCHECK_GE(state.slots[node].count, 0);
583
2.19k
            slots.push_back(node);
584
2.19k
            node = state.slots[node].right;
585
2.19k
        }
586
        DCHECK_EQ(static_cast<int64_t>(slots.size()), state.live);
587
233
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_6EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_7EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_8EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_9EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
569
7
    static void collect_in_order(const State& state, DorisVector<int32_t>& slots) {
570
7
        slots.reserve(static_cast<size_t>(state.live));
571
7
        DorisVector<int32_t> stack;
572
7
        stack.reserve(64);
573
7
        int32_t node = state.root;
574
22
        while (node != State::NO_SLOT || !stack.empty()) {
575
30
            while (node != State::NO_SLOT) {
576
15
                stack.push_back(node);
577
15
                node = state.slots[node].left;
578
15
            }
579
15
            node = stack.back();
580
15
            stack.pop_back();
581
            // Only live slots are reachable from the root; an evicted slot has no row count.
582
15
            DCHECK_GE(state.slots[node].count, 0);
583
15
            slots.push_back(node);
584
15
            node = state.slots[node].right;
585
15
        }
586
        DCHECK_EQ(static_cast<int64_t>(slots.size()), state.live);
587
7
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_28EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_29EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
569
29
    static void collect_in_order(const State& state, DorisVector<int32_t>& slots) {
570
29
        slots.reserve(static_cast<size_t>(state.live));
571
29
        DorisVector<int32_t> stack;
572
29
        stack.reserve(64);
573
29
        int32_t node = state.root;
574
70
        while (node != State::NO_SLOT || !stack.empty()) {
575
82
            while (node != State::NO_SLOT) {
576
41
                stack.push_back(node);
577
41
                node = state.slots[node].left;
578
41
            }
579
41
            node = stack.back();
580
41
            stack.pop_back();
581
            // Only live slots are reachable from the root; an evicted slot has no row count.
582
41
            DCHECK_GE(state.slots[node].count, 0);
583
41
            slots.push_back(node);
584
41
            node = state.slots[node].right;
585
41
        }
586
        DCHECK_EQ(static_cast<int64_t>(slots.size()), state.live);
587
29
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_20EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_30EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_35EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_10EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
569
44
    static void collect_in_order(const State& state, DorisVector<int32_t>& slots) {
570
44
        slots.reserve(static_cast<size_t>(state.live));
571
44
        DorisVector<int32_t> stack;
572
44
        stack.reserve(64);
573
44
        int32_t node = state.root;
574
153
        while (node != State::NO_SLOT || !stack.empty()) {
575
218
            while (node != State::NO_SLOT) {
576
109
                stack.push_back(node);
577
109
                node = state.slots[node].left;
578
109
            }
579
109
            node = stack.back();
580
109
            stack.pop_back();
581
            // Only live slots are reachable from the root; an evicted slot has no row count.
582
109
            DCHECK_GE(state.slots[node].count, 0);
583
109
            slots.push_back(node);
584
109
            node = state.slots[node].right;
585
109
        }
586
        DCHECK_EQ(static_cast<int64_t>(slots.size()), state.live);
587
44
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_11EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_12EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_25EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_26EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
569
22
    static void collect_in_order(const State& state, DorisVector<int32_t>& slots) {
570
22
        slots.reserve(static_cast<size_t>(state.live));
571
22
        DorisVector<int32_t> stack;
572
22
        stack.reserve(64);
573
22
        int32_t node = state.root;
574
48
        while (node != State::NO_SLOT || !stack.empty()) {
575
52
            while (node != State::NO_SLOT) {
576
26
                stack.push_back(node);
577
26
                node = state.slots[node].left;
578
26
            }
579
26
            node = stack.back();
580
26
            stack.pop_back();
581
            // Only live slots are reachable from the root; an evicted slot has no row count.
582
26
            DCHECK_GE(state.slots[node].count, 0);
583
26
            slots.push_back(node);
584
26
            node = state.slots[node].right;
585
26
        }
586
        DCHECK_EQ(static_cast<int64_t>(slots.size()), state.live);
587
22
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_27EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_43EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_42EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_36EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_37EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_44EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_2EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_3EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_4EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_5EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
569
149
    static void collect_in_order(const State& state, DorisVector<int32_t>& slots) {
570
149
        slots.reserve(static_cast<size_t>(state.live));
571
149
        DorisVector<int32_t> stack;
572
149
        stack.reserve(64);
573
149
        int32_t node = state.root;
574
1.00k
        while (node != State::NO_SLOT || !stack.empty()) {
575
1.71k
            while (node != State::NO_SLOT) {
576
857
                stack.push_back(node);
577
857
                node = state.slots[node].left;
578
857
            }
579
857
            node = stack.back();
580
857
            stack.pop_back();
581
            // Only live slots are reachable from the root; an evicted slot has no row count.
582
857
            DCHECK_GE(state.slots[node].count, 0);
583
857
            slots.push_back(node);
584
857
            node = state.slots[node].right;
585
857
        }
586
        DCHECK_EQ(static_cast<int64_t>(slots.size()), state.live);
587
149
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_6EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_7EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_8EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_9EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
569
7
    static void collect_in_order(const State& state, DorisVector<int32_t>& slots) {
570
7
        slots.reserve(static_cast<size_t>(state.live));
571
7
        DorisVector<int32_t> stack;
572
7
        stack.reserve(64);
573
7
        int32_t node = state.root;
574
22
        while (node != State::NO_SLOT || !stack.empty()) {
575
30
            while (node != State::NO_SLOT) {
576
15
                stack.push_back(node);
577
15
                node = state.slots[node].left;
578
15
            }
579
15
            node = stack.back();
580
15
            stack.pop_back();
581
            // Only live slots are reachable from the root; an evicted slot has no row count.
582
15
            DCHECK_GE(state.slots[node].count, 0);
583
15
            slots.push_back(node);
584
15
            node = state.slots[node].right;
585
15
        }
586
        DCHECK_EQ(static_cast<int64_t>(slots.size()), state.live);
587
7
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_28EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_29EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
569
31
    static void collect_in_order(const State& state, DorisVector<int32_t>& slots) {
570
31
        slots.reserve(static_cast<size_t>(state.live));
571
31
        DorisVector<int32_t> stack;
572
31
        stack.reserve(64);
573
31
        int32_t node = state.root;
574
76
        while (node != State::NO_SLOT || !stack.empty()) {
575
90
            while (node != State::NO_SLOT) {
576
45
                stack.push_back(node);
577
45
                node = state.slots[node].left;
578
45
            }
579
45
            node = stack.back();
580
45
            stack.pop_back();
581
            // Only live slots are reachable from the root; an evicted slot has no row count.
582
45
            DCHECK_GE(state.slots[node].count, 0);
583
45
            slots.push_back(node);
584
45
            node = state.slots[node].right;
585
45
        }
586
        DCHECK_EQ(static_cast<int64_t>(slots.size()), state.live);
587
31
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_20EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_30EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_35EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_10EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
569
31
    static void collect_in_order(const State& state, DorisVector<int32_t>& slots) {
570
31
        slots.reserve(static_cast<size_t>(state.live));
571
31
        DorisVector<int32_t> stack;
572
31
        stack.reserve(64);
573
31
        int32_t node = state.root;
574
76
        while (node != State::NO_SLOT || !stack.empty()) {
575
90
            while (node != State::NO_SLOT) {
576
45
                stack.push_back(node);
577
45
                node = state.slots[node].left;
578
45
            }
579
45
            node = stack.back();
580
45
            stack.pop_back();
581
            // Only live slots are reachable from the root; an evicted slot has no row count.
582
45
            DCHECK_GE(state.slots[node].count, 0);
583
45
            slots.push_back(node);
584
45
            node = state.slots[node].right;
585
45
        }
586
        DCHECK_EQ(static_cast<int64_t>(slots.size()), state.live);
587
31
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_11EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_12EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_25EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_26EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
569
22
    static void collect_in_order(const State& state, DorisVector<int32_t>& slots) {
570
22
        slots.reserve(static_cast<size_t>(state.live));
571
22
        DorisVector<int32_t> stack;
572
22
        stack.reserve(64);
573
22
        int32_t node = state.root;
574
48
        while (node != State::NO_SLOT || !stack.empty()) {
575
52
            while (node != State::NO_SLOT) {
576
26
                stack.push_back(node);
577
26
                node = state.slots[node].left;
578
26
            }
579
26
            node = stack.back();
580
26
            stack.pop_back();
581
            // Only live slots are reachable from the root; an evicted slot has no row count.
582
26
            DCHECK_GE(state.slots[node].count, 0);
583
26
            slots.push_back(node);
584
26
            node = state.slots[node].right;
585
26
        }
586
        DCHECK_EQ(static_cast<int64_t>(slots.size()), state.live);
587
22
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_27EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_43EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_42EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_36EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_37EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_44EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
588
589
    /// Rebuilds the tree from `values`, already in the aggregate's order.
590
    /// The treap is built in O(size) as a Cartesian tree over the fresh priorities.
591
347
    static void assign_sorted(State& state, DorisVector<Entry> values) {
592
347
        const size_t size = values.size();
593
347
        check_slot_capacity(size);
594
347
        state.slots.assign(size, Slot {});
595
2.23k
        for (size_t slot = 0; slot != size; ++slot) {
596
1.88k
            state.slots[slot].count = values[slot].count;
597
1.88k
        }
598
347
        if constexpr (IS_STRING) {
599
            // The entries may point into this state's own arena, so the new arena is built aside
600
            // and swapped in before the old one is dropped.
601
40
            PaddedPODArray<char, 32> bytes;
602
40
            size_t live_bytes = 0;
603
130
            for (size_t slot = 0; slot != size; ++slot) {
604
90
                const StringRef value = values[slot].value;
605
90
                Payload& payload = state.slots[slot].payload;
606
90
                payload.offset = bytes.size();
607
90
                payload.length = value.size;
608
90
                if (value.size != 0) {
609
90
                    bytes.insert(value.data, value.data + value.size);
610
90
                }
611
90
                live_bytes += value.size;
612
90
            }
613
40
            state.bytes.swap(bytes);
614
40
            state.live_payload_bytes = live_bytes;
615
40
            state.dead_payload_bytes = 0;
616
307
        } else {
617
2.10k
            for (size_t slot = 0; slot != size; ++slot) {
618
1.79k
                state.slots[slot].payload = values[slot].value;
619
1.79k
            }
620
307
        }
621
347
        state.live = static_cast<uint32_t>(size);
622
347
        state.dead = 0;
623
347
        DorisVector<int32_t> stack;
624
347
        stack.reserve(size);
625
2.23k
        for (size_t slot = 0; slot != size; ++slot) {
626
1.88k
            state.slots[slot].priority = next_priority(state);
627
1.88k
            int32_t last = State::NO_SLOT;
628
3.26k
            while (!stack.empty() &&
629
3.26k
                   state.slots[stack.back()].priority < state.slots[slot].priority) {
630
1.38k
                last = stack.back();
631
1.38k
                stack.pop_back();
632
1.38k
            }
633
1.88k
            state.slots[slot].left = last;
634
1.88k
            if (!stack.empty()) {
635
1.41k
                state.slots[stack.back()].right = static_cast<int32_t>(slot);
636
1.41k
            }
637
1.88k
            stack.push_back(static_cast<int32_t>(slot));
638
1.88k
        }
639
347
        state.root = stack.empty() ? State::NO_SLOT : stack.front();
640
347
        refresh_worst(state);
641
347
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_2EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_3EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_4EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_5EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
591
146
    static void assign_sorted(State& state, DorisVector<Entry> values) {
592
146
        const size_t size = values.size();
593
146
        check_slot_capacity(size);
594
146
        state.slots.assign(size, Slot {});
595
1.57k
        for (size_t slot = 0; slot != size; ++slot) {
596
1.43k
            state.slots[slot].count = values[slot].count;
597
1.43k
        }
598
        if constexpr (IS_STRING) {
599
            // The entries may point into this state's own arena, so the new arena is built aside
600
            // and swapped in before the old one is dropped.
601
            PaddedPODArray<char, 32> bytes;
602
            size_t live_bytes = 0;
603
            for (size_t slot = 0; slot != size; ++slot) {
604
                const StringRef value = values[slot].value;
605
                Payload& payload = state.slots[slot].payload;
606
                payload.offset = bytes.size();
607
                payload.length = value.size;
608
                if (value.size != 0) {
609
                    bytes.insert(value.data, value.data + value.size);
610
                }
611
                live_bytes += value.size;
612
            }
613
            state.bytes.swap(bytes);
614
            state.live_payload_bytes = live_bytes;
615
            state.dead_payload_bytes = 0;
616
146
        } else {
617
1.57k
            for (size_t slot = 0; slot != size; ++slot) {
618
1.43k
                state.slots[slot].payload = values[slot].value;
619
1.43k
            }
620
146
        }
621
146
        state.live = static_cast<uint32_t>(size);
622
146
        state.dead = 0;
623
146
        DorisVector<int32_t> stack;
624
146
        stack.reserve(size);
625
1.57k
        for (size_t slot = 0; slot != size; ++slot) {
626
1.43k
            state.slots[slot].priority = next_priority(state);
627
1.43k
            int32_t last = State::NO_SLOT;
628
2.62k
            while (!stack.empty() &&
629
2.62k
                   state.slots[stack.back()].priority < state.slots[slot].priority) {
630
1.19k
                last = stack.back();
631
1.19k
                stack.pop_back();
632
1.19k
            }
633
1.43k
            state.slots[slot].left = last;
634
1.43k
            if (!stack.empty()) {
635
1.22k
                state.slots[stack.back()].right = static_cast<int32_t>(slot);
636
1.22k
            }
637
1.43k
            stack.push_back(static_cast<int32_t>(slot));
638
1.43k
        }
639
146
        state.root = stack.empty() ? State::NO_SLOT : stack.front();
640
146
        refresh_worst(state);
641
146
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_6EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_7EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_8EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_9EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
591
4
    static void assign_sorted(State& state, DorisVector<Entry> values) {
592
4
        const size_t size = values.size();
593
4
        check_slot_capacity(size);
594
4
        state.slots.assign(size, Slot {});
595
14
        for (size_t slot = 0; slot != size; ++slot) {
596
10
            state.slots[slot].count = values[slot].count;
597
10
        }
598
        if constexpr (IS_STRING) {
599
            // The entries may point into this state's own arena, so the new arena is built aside
600
            // and swapped in before the old one is dropped.
601
            PaddedPODArray<char, 32> bytes;
602
            size_t live_bytes = 0;
603
            for (size_t slot = 0; slot != size; ++slot) {
604
                const StringRef value = values[slot].value;
605
                Payload& payload = state.slots[slot].payload;
606
                payload.offset = bytes.size();
607
                payload.length = value.size;
608
                if (value.size != 0) {
609
                    bytes.insert(value.data, value.data + value.size);
610
                }
611
                live_bytes += value.size;
612
            }
613
            state.bytes.swap(bytes);
614
            state.live_payload_bytes = live_bytes;
615
            state.dead_payload_bytes = 0;
616
4
        } else {
617
14
            for (size_t slot = 0; slot != size; ++slot) {
618
10
                state.slots[slot].payload = values[slot].value;
619
10
            }
620
4
        }
621
4
        state.live = static_cast<uint32_t>(size);
622
4
        state.dead = 0;
623
4
        DorisVector<int32_t> stack;
624
4
        stack.reserve(size);
625
14
        for (size_t slot = 0; slot != size; ++slot) {
626
10
            state.slots[slot].priority = next_priority(state);
627
10
            int32_t last = State::NO_SLOT;
628
15
            while (!stack.empty() &&
629
15
                   state.slots[stack.back()].priority < state.slots[slot].priority) {
630
5
                last = stack.back();
631
5
                stack.pop_back();
632
5
            }
633
10
            state.slots[slot].left = last;
634
10
            if (!stack.empty()) {
635
3
                state.slots[stack.back()].right = static_cast<int32_t>(slot);
636
3
            }
637
10
            stack.push_back(static_cast<int32_t>(slot));
638
10
        }
639
4
        state.root = stack.empty() ? State::NO_SLOT : stack.front();
640
4
        refresh_worst(state);
641
4
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_28EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_29EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
591
17
    static void assign_sorted(State& state, DorisVector<Entry> values) {
592
17
        const size_t size = values.size();
593
17
        check_slot_capacity(size);
594
17
        state.slots.assign(size, Slot {});
595
44
        for (size_t slot = 0; slot != size; ++slot) {
596
27
            state.slots[slot].count = values[slot].count;
597
27
        }
598
        if constexpr (IS_STRING) {
599
            // The entries may point into this state's own arena, so the new arena is built aside
600
            // and swapped in before the old one is dropped.
601
            PaddedPODArray<char, 32> bytes;
602
            size_t live_bytes = 0;
603
            for (size_t slot = 0; slot != size; ++slot) {
604
                const StringRef value = values[slot].value;
605
                Payload& payload = state.slots[slot].payload;
606
                payload.offset = bytes.size();
607
                payload.length = value.size;
608
                if (value.size != 0) {
609
                    bytes.insert(value.data, value.data + value.size);
610
                }
611
                live_bytes += value.size;
612
            }
613
            state.bytes.swap(bytes);
614
            state.live_payload_bytes = live_bytes;
615
            state.dead_payload_bytes = 0;
616
17
        } else {
617
44
            for (size_t slot = 0; slot != size; ++slot) {
618
27
                state.slots[slot].payload = values[slot].value;
619
27
            }
620
17
        }
621
17
        state.live = static_cast<uint32_t>(size);
622
17
        state.dead = 0;
623
17
        DorisVector<int32_t> stack;
624
17
        stack.reserve(size);
625
44
        for (size_t slot = 0; slot != size; ++slot) {
626
27
            state.slots[slot].priority = next_priority(state);
627
27
            int32_t last = State::NO_SLOT;
628
32
            while (!stack.empty() &&
629
32
                   state.slots[stack.back()].priority < state.slots[slot].priority) {
630
5
                last = stack.back();
631
5
                stack.pop_back();
632
5
            }
633
27
            state.slots[slot].left = last;
634
27
            if (!stack.empty()) {
635
7
                state.slots[stack.back()].right = static_cast<int32_t>(slot);
636
7
            }
637
27
            stack.push_back(static_cast<int32_t>(slot));
638
27
        }
639
17
        state.root = stack.empty() ? State::NO_SLOT : stack.front();
640
17
        refresh_worst(state);
641
17
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_20EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_30EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_35EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_10EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
591
21
    static void assign_sorted(State& state, DorisVector<Entry> values) {
592
21
        const size_t size = values.size();
593
21
        check_slot_capacity(size);
594
21
        state.slots.assign(size, Slot {});
595
80
        for (size_t slot = 0; slot != size; ++slot) {
596
59
            state.slots[slot].count = values[slot].count;
597
59
        }
598
21
        if constexpr (IS_STRING) {
599
            // The entries may point into this state's own arena, so the new arena is built aside
600
            // and swapped in before the old one is dropped.
601
21
            PaddedPODArray<char, 32> bytes;
602
21
            size_t live_bytes = 0;
603
80
            for (size_t slot = 0; slot != size; ++slot) {
604
59
                const StringRef value = values[slot].value;
605
59
                Payload& payload = state.slots[slot].payload;
606
59
                payload.offset = bytes.size();
607
59
                payload.length = value.size;
608
59
                if (value.size != 0) {
609
59
                    bytes.insert(value.data, value.data + value.size);
610
59
                }
611
59
                live_bytes += value.size;
612
59
            }
613
21
            state.bytes.swap(bytes);
614
21
            state.live_payload_bytes = live_bytes;
615
21
            state.dead_payload_bytes = 0;
616
        } else {
617
            for (size_t slot = 0; slot != size; ++slot) {
618
                state.slots[slot].payload = values[slot].value;
619
            }
620
        }
621
21
        state.live = static_cast<uint32_t>(size);
622
21
        state.dead = 0;
623
21
        DorisVector<int32_t> stack;
624
21
        stack.reserve(size);
625
80
        for (size_t slot = 0; slot != size; ++slot) {
626
59
            state.slots[slot].priority = next_priority(state);
627
59
            int32_t last = State::NO_SLOT;
628
88
            while (!stack.empty() &&
629
88
                   state.slots[stack.back()].priority < state.slots[slot].priority) {
630
29
                last = stack.back();
631
29
                stack.pop_back();
632
29
            }
633
59
            state.slots[slot].left = last;
634
59
            if (!stack.empty()) {
635
30
                state.slots[stack.back()].right = static_cast<int32_t>(slot);
636
30
            }
637
59
            stack.push_back(static_cast<int32_t>(slot));
638
59
        }
639
21
        state.root = stack.empty() ? State::NO_SLOT : stack.front();
640
21
        refresh_worst(state);
641
21
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_11EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_12EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_25EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_26EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
591
13
    static void assign_sorted(State& state, DorisVector<Entry> values) {
592
13
        const size_t size = values.size();
593
13
        check_slot_capacity(size);
594
13
        state.slots.assign(size, Slot {});
595
30
        for (size_t slot = 0; slot != size; ++slot) {
596
17
            state.slots[slot].count = values[slot].count;
597
17
        }
598
        if constexpr (IS_STRING) {
599
            // The entries may point into this state's own arena, so the new arena is built aside
600
            // and swapped in before the old one is dropped.
601
            PaddedPODArray<char, 32> bytes;
602
            size_t live_bytes = 0;
603
            for (size_t slot = 0; slot != size; ++slot) {
604
                const StringRef value = values[slot].value;
605
                Payload& payload = state.slots[slot].payload;
606
                payload.offset = bytes.size();
607
                payload.length = value.size;
608
                if (value.size != 0) {
609
                    bytes.insert(value.data, value.data + value.size);
610
                }
611
                live_bytes += value.size;
612
            }
613
            state.bytes.swap(bytes);
614
            state.live_payload_bytes = live_bytes;
615
            state.dead_payload_bytes = 0;
616
13
        } else {
617
30
            for (size_t slot = 0; slot != size; ++slot) {
618
17
                state.slots[slot].payload = values[slot].value;
619
17
            }
620
13
        }
621
13
        state.live = static_cast<uint32_t>(size);
622
13
        state.dead = 0;
623
13
        DorisVector<int32_t> stack;
624
13
        stack.reserve(size);
625
30
        for (size_t slot = 0; slot != size; ++slot) {
626
17
            state.slots[slot].priority = next_priority(state);
627
17
            int32_t last = State::NO_SLOT;
628
21
            while (!stack.empty() &&
629
21
                   state.slots[stack.back()].priority < state.slots[slot].priority) {
630
4
                last = stack.back();
631
4
                stack.pop_back();
632
4
            }
633
17
            state.slots[slot].left = last;
634
17
            if (!stack.empty()) {
635
4
                state.slots[stack.back()].right = static_cast<int32_t>(slot);
636
4
            }
637
17
            stack.push_back(static_cast<int32_t>(slot));
638
17
        }
639
13
        state.root = stack.empty() ? State::NO_SLOT : stack.front();
640
13
        refresh_worst(state);
641
13
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_27EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_43EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_42EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_36EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_37EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_44EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_2EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_3EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_4EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_5EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
591
91
    static void assign_sorted(State& state, DorisVector<Entry> values) {
592
91
        const size_t size = values.size();
593
91
        check_slot_capacity(size);
594
91
        state.slots.assign(size, Slot {});
595
345
        for (size_t slot = 0; slot != size; ++slot) {
596
254
            state.slots[slot].count = values[slot].count;
597
254
        }
598
        if constexpr (IS_STRING) {
599
            // The entries may point into this state's own arena, so the new arena is built aside
600
            // and swapped in before the old one is dropped.
601
            PaddedPODArray<char, 32> bytes;
602
            size_t live_bytes = 0;
603
            for (size_t slot = 0; slot != size; ++slot) {
604
                const StringRef value = values[slot].value;
605
                Payload& payload = state.slots[slot].payload;
606
                payload.offset = bytes.size();
607
                payload.length = value.size;
608
                if (value.size != 0) {
609
                    bytes.insert(value.data, value.data + value.size);
610
                }
611
                live_bytes += value.size;
612
            }
613
            state.bytes.swap(bytes);
614
            state.live_payload_bytes = live_bytes;
615
            state.dead_payload_bytes = 0;
616
91
        } else {
617
345
            for (size_t slot = 0; slot != size; ++slot) {
618
254
                state.slots[slot].payload = values[slot].value;
619
254
            }
620
91
        }
621
91
        state.live = static_cast<uint32_t>(size);
622
91
        state.dead = 0;
623
91
        DorisVector<int32_t> stack;
624
91
        stack.reserve(size);
625
345
        for (size_t slot = 0; slot != size; ++slot) {
626
254
            state.slots[slot].priority = next_priority(state);
627
254
            int32_t last = State::NO_SLOT;
628
375
            while (!stack.empty() &&
629
375
                   state.slots[stack.back()].priority < state.slots[slot].priority) {
630
121
                last = stack.back();
631
121
                stack.pop_back();
632
121
            }
633
254
            state.slots[slot].left = last;
634
254
            if (!stack.empty()) {
635
127
                state.slots[stack.back()].right = static_cast<int32_t>(slot);
636
127
            }
637
254
            stack.push_back(static_cast<int32_t>(slot));
638
254
        }
639
91
        state.root = stack.empty() ? State::NO_SLOT : stack.front();
640
91
        refresh_worst(state);
641
91
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_6EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_7EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_8EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_9EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
591
4
    static void assign_sorted(State& state, DorisVector<Entry> values) {
592
4
        const size_t size = values.size();
593
4
        check_slot_capacity(size);
594
4
        state.slots.assign(size, Slot {});
595
14
        for (size_t slot = 0; slot != size; ++slot) {
596
10
            state.slots[slot].count = values[slot].count;
597
10
        }
598
        if constexpr (IS_STRING) {
599
            // The entries may point into this state's own arena, so the new arena is built aside
600
            // and swapped in before the old one is dropped.
601
            PaddedPODArray<char, 32> bytes;
602
            size_t live_bytes = 0;
603
            for (size_t slot = 0; slot != size; ++slot) {
604
                const StringRef value = values[slot].value;
605
                Payload& payload = state.slots[slot].payload;
606
                payload.offset = bytes.size();
607
                payload.length = value.size;
608
                if (value.size != 0) {
609
                    bytes.insert(value.data, value.data + value.size);
610
                }
611
                live_bytes += value.size;
612
            }
613
            state.bytes.swap(bytes);
614
            state.live_payload_bytes = live_bytes;
615
            state.dead_payload_bytes = 0;
616
4
        } else {
617
14
            for (size_t slot = 0; slot != size; ++slot) {
618
10
                state.slots[slot].payload = values[slot].value;
619
10
            }
620
4
        }
621
4
        state.live = static_cast<uint32_t>(size);
622
4
        state.dead = 0;
623
4
        DorisVector<int32_t> stack;
624
4
        stack.reserve(size);
625
14
        for (size_t slot = 0; slot != size; ++slot) {
626
10
            state.slots[slot].priority = next_priority(state);
627
10
            int32_t last = State::NO_SLOT;
628
15
            while (!stack.empty() &&
629
15
                   state.slots[stack.back()].priority < state.slots[slot].priority) {
630
5
                last = stack.back();
631
5
                stack.pop_back();
632
5
            }
633
10
            state.slots[slot].left = last;
634
10
            if (!stack.empty()) {
635
1
                state.slots[stack.back()].right = static_cast<int32_t>(slot);
636
1
            }
637
10
            stack.push_back(static_cast<int32_t>(slot));
638
10
        }
639
4
        state.root = stack.empty() ? State::NO_SLOT : stack.front();
640
4
        refresh_worst(state);
641
4
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_28EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_29EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
591
19
    static void assign_sorted(State& state, DorisVector<Entry> values) {
592
19
        const size_t size = values.size();
593
19
        check_slot_capacity(size);
594
19
        state.slots.assign(size, Slot {});
595
50
        for (size_t slot = 0; slot != size; ++slot) {
596
31
            state.slots[slot].count = values[slot].count;
597
31
        }
598
        if constexpr (IS_STRING) {
599
            // The entries may point into this state's own arena, so the new arena is built aside
600
            // and swapped in before the old one is dropped.
601
            PaddedPODArray<char, 32> bytes;
602
            size_t live_bytes = 0;
603
            for (size_t slot = 0; slot != size; ++slot) {
604
                const StringRef value = values[slot].value;
605
                Payload& payload = state.slots[slot].payload;
606
                payload.offset = bytes.size();
607
                payload.length = value.size;
608
                if (value.size != 0) {
609
                    bytes.insert(value.data, value.data + value.size);
610
                }
611
                live_bytes += value.size;
612
            }
613
            state.bytes.swap(bytes);
614
            state.live_payload_bytes = live_bytes;
615
            state.dead_payload_bytes = 0;
616
19
        } else {
617
50
            for (size_t slot = 0; slot != size; ++slot) {
618
31
                state.slots[slot].payload = values[slot].value;
619
31
            }
620
19
        }
621
19
        state.live = static_cast<uint32_t>(size);
622
19
        state.dead = 0;
623
19
        DorisVector<int32_t> stack;
624
19
        stack.reserve(size);
625
50
        for (size_t slot = 0; slot != size; ++slot) {
626
31
            state.slots[slot].priority = next_priority(state);
627
31
            int32_t last = State::NO_SLOT;
628
37
            while (!stack.empty() &&
629
37
                   state.slots[stack.back()].priority < state.slots[slot].priority) {
630
6
                last = stack.back();
631
6
                stack.pop_back();
632
6
            }
633
31
            state.slots[slot].left = last;
634
31
            if (!stack.empty()) {
635
8
                state.slots[stack.back()].right = static_cast<int32_t>(slot);
636
8
            }
637
31
            stack.push_back(static_cast<int32_t>(slot));
638
31
        }
639
19
        state.root = stack.empty() ? State::NO_SLOT : stack.front();
640
19
        refresh_worst(state);
641
19
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_20EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_30EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_35EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_10EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
591
19
    static void assign_sorted(State& state, DorisVector<Entry> values) {
592
19
        const size_t size = values.size();
593
19
        check_slot_capacity(size);
594
19
        state.slots.assign(size, Slot {});
595
50
        for (size_t slot = 0; slot != size; ++slot) {
596
31
            state.slots[slot].count = values[slot].count;
597
31
        }
598
19
        if constexpr (IS_STRING) {
599
            // The entries may point into this state's own arena, so the new arena is built aside
600
            // and swapped in before the old one is dropped.
601
19
            PaddedPODArray<char, 32> bytes;
602
19
            size_t live_bytes = 0;
603
50
            for (size_t slot = 0; slot != size; ++slot) {
604
31
                const StringRef value = values[slot].value;
605
31
                Payload& payload = state.slots[slot].payload;
606
31
                payload.offset = bytes.size();
607
31
                payload.length = value.size;
608
31
                if (value.size != 0) {
609
31
                    bytes.insert(value.data, value.data + value.size);
610
31
                }
611
31
                live_bytes += value.size;
612
31
            }
613
19
            state.bytes.swap(bytes);
614
19
            state.live_payload_bytes = live_bytes;
615
19
            state.dead_payload_bytes = 0;
616
        } else {
617
            for (size_t slot = 0; slot != size; ++slot) {
618
                state.slots[slot].payload = values[slot].value;
619
            }
620
        }
621
19
        state.live = static_cast<uint32_t>(size);
622
19
        state.dead = 0;
623
19
        DorisVector<int32_t> stack;
624
19
        stack.reserve(size);
625
50
        for (size_t slot = 0; slot != size; ++slot) {
626
31
            state.slots[slot].priority = next_priority(state);
627
31
            int32_t last = State::NO_SLOT;
628
37
            while (!stack.empty() &&
629
37
                   state.slots[stack.back()].priority < state.slots[slot].priority) {
630
6
                last = stack.back();
631
6
                stack.pop_back();
632
6
            }
633
31
            state.slots[slot].left = last;
634
31
            if (!stack.empty()) {
635
8
                state.slots[stack.back()].right = static_cast<int32_t>(slot);
636
8
            }
637
31
            stack.push_back(static_cast<int32_t>(slot));
638
31
        }
639
19
        state.root = stack.empty() ? State::NO_SLOT : stack.front();
640
19
        refresh_worst(state);
641
19
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_11EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_12EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_25EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_26EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
591
13
    static void assign_sorted(State& state, DorisVector<Entry> values) {
592
13
        const size_t size = values.size();
593
13
        check_slot_capacity(size);
594
13
        state.slots.assign(size, Slot {});
595
30
        for (size_t slot = 0; slot != size; ++slot) {
596
17
            state.slots[slot].count = values[slot].count;
597
17
        }
598
        if constexpr (IS_STRING) {
599
            // The entries may point into this state's own arena, so the new arena is built aside
600
            // and swapped in before the old one is dropped.
601
            PaddedPODArray<char, 32> bytes;
602
            size_t live_bytes = 0;
603
            for (size_t slot = 0; slot != size; ++slot) {
604
                const StringRef value = values[slot].value;
605
                Payload& payload = state.slots[slot].payload;
606
                payload.offset = bytes.size();
607
                payload.length = value.size;
608
                if (value.size != 0) {
609
                    bytes.insert(value.data, value.data + value.size);
610
                }
611
                live_bytes += value.size;
612
            }
613
            state.bytes.swap(bytes);
614
            state.live_payload_bytes = live_bytes;
615
            state.dead_payload_bytes = 0;
616
13
        } else {
617
30
            for (size_t slot = 0; slot != size; ++slot) {
618
17
                state.slots[slot].payload = values[slot].value;
619
17
            }
620
13
        }
621
13
        state.live = static_cast<uint32_t>(size);
622
13
        state.dead = 0;
623
13
        DorisVector<int32_t> stack;
624
13
        stack.reserve(size);
625
30
        for (size_t slot = 0; slot != size; ++slot) {
626
17
            state.slots[slot].priority = next_priority(state);
627
17
            int32_t last = State::NO_SLOT;
628
20
            while (!stack.empty() &&
629
20
                   state.slots[stack.back()].priority < state.slots[slot].priority) {
630
3
                last = stack.back();
631
3
                stack.pop_back();
632
3
            }
633
17
            state.slots[slot].left = last;
634
17
            if (!stack.empty()) {
635
5
                state.slots[stack.back()].right = static_cast<int32_t>(slot);
636
5
            }
637
17
            stack.push_back(static_cast<int32_t>(slot));
638
17
        }
639
13
        state.root = stack.empty() ? State::NO_SLOT : stack.front();
640
13
        refresh_worst(state);
641
13
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_27EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_43EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_42EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_36EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_37EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_44EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
642
643
    /// Reclaims the slots evicted since the last compaction. The O(k) rebuild is charged to the
644
    /// k/2 evictions that produced the dead slots, so it stays O(1) amortized per row.
645
71
    static void compact(State& state) {
646
71
        DorisVector<int32_t> slots;
647
71
        collect_in_order(state, slots);
648
71
        DorisVector<Entry> values;
649
71
        values.reserve(slots.size());
650
1.31k
        for (int32_t slot : slots) {
651
1.31k
            values.push_back(Entry {value_of(state, slot), state.slots[slot].count});
652
1.31k
        }
653
71
        assign_sorted(state, std::move(values));
654
71
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE7compactERNS_22AggregateTopKCountDataILS1_2EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE7compactERNS_22AggregateTopKCountDataILS1_3EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE7compactERNS_22AggregateTopKCountDataILS1_4EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE7compactERNS_22AggregateTopKCountDataILS1_5EEE
Line
Count
Source
645
42
    static void compact(State& state) {
646
42
        DorisVector<int32_t> slots;
647
42
        collect_in_order(state, slots);
648
42
        DorisVector<Entry> values;
649
42
        values.reserve(slots.size());
650
1.17k
        for (int32_t slot : slots) {
651
1.17k
            values.push_back(Entry {value_of(state, slot), state.slots[slot].count});
652
1.17k
        }
653
42
        assign_sorted(state, std::move(values));
654
42
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE7compactERNS_22AggregateTopKCountDataILS1_6EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE7compactERNS_22AggregateTopKCountDataILS1_7EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE7compactERNS_22AggregateTopKCountDataILS1_8EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE7compactERNS_22AggregateTopKCountDataILS1_9EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE7compactERNS_22AggregateTopKCountDataILS1_28EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE7compactERNS_22AggregateTopKCountDataILS1_29EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE7compactERNS_22AggregateTopKCountDataILS1_20EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE7compactERNS_22AggregateTopKCountDataILS1_30EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE7compactERNS_22AggregateTopKCountDataILS1_35EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE7compactERNS_22AggregateTopKCountDataILS1_10EEE
Line
Count
Source
645
3
    static void compact(State& state) {
646
3
        DorisVector<int32_t> slots;
647
3
        collect_in_order(state, slots);
648
3
        DorisVector<Entry> values;
649
3
        values.reserve(slots.size());
650
24
        for (int32_t slot : slots) {
651
24
            values.push_back(Entry {value_of(state, slot), state.slots[slot].count});
652
24
        }
653
3
        assign_sorted(state, std::move(values));
654
3
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE7compactERNS_22AggregateTopKCountDataILS1_11EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE7compactERNS_22AggregateTopKCountDataILS1_12EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE7compactERNS_22AggregateTopKCountDataILS1_25EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE7compactERNS_22AggregateTopKCountDataILS1_26EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE7compactERNS_22AggregateTopKCountDataILS1_27EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE7compactERNS_22AggregateTopKCountDataILS1_43EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE7compactERNS_22AggregateTopKCountDataILS1_42EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE7compactERNS_22AggregateTopKCountDataILS1_36EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE7compactERNS_22AggregateTopKCountDataILS1_37EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE7compactERNS_22AggregateTopKCountDataILS1_44EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE7compactERNS_22AggregateTopKCountDataILS1_2EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE7compactERNS_22AggregateTopKCountDataILS1_3EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE7compactERNS_22AggregateTopKCountDataILS1_4EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE7compactERNS_22AggregateTopKCountDataILS1_5EEE
Line
Count
Source
645
21
    static void compact(State& state) {
646
21
        DorisVector<int32_t> slots;
647
21
        collect_in_order(state, slots);
648
21
        DorisVector<Entry> values;
649
21
        values.reserve(slots.size());
650
109
        for (int32_t slot : slots) {
651
109
            values.push_back(Entry {value_of(state, slot), state.slots[slot].count});
652
109
        }
653
21
        assign_sorted(state, std::move(values));
654
21
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE7compactERNS_22AggregateTopKCountDataILS1_6EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE7compactERNS_22AggregateTopKCountDataILS1_7EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE7compactERNS_22AggregateTopKCountDataILS1_8EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE7compactERNS_22AggregateTopKCountDataILS1_9EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE7compactERNS_22AggregateTopKCountDataILS1_28EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE7compactERNS_22AggregateTopKCountDataILS1_29EEE
Line
Count
Source
645
2
    static void compact(State& state) {
646
2
        DorisVector<int32_t> slots;
647
2
        collect_in_order(state, slots);
648
2
        DorisVector<Entry> values;
649
2
        values.reserve(slots.size());
650
4
        for (int32_t slot : slots) {
651
4
            values.push_back(Entry {value_of(state, slot), state.slots[slot].count});
652
4
        }
653
2
        assign_sorted(state, std::move(values));
654
2
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE7compactERNS_22AggregateTopKCountDataILS1_20EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE7compactERNS_22AggregateTopKCountDataILS1_30EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE7compactERNS_22AggregateTopKCountDataILS1_35EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE7compactERNS_22AggregateTopKCountDataILS1_10EEE
Line
Count
Source
645
3
    static void compact(State& state) {
646
3
        DorisVector<int32_t> slots;
647
3
        collect_in_order(state, slots);
648
3
        DorisVector<Entry> values;
649
3
        values.reserve(slots.size());
650
6
        for (int32_t slot : slots) {
651
6
            values.push_back(Entry {value_of(state, slot), state.slots[slot].count});
652
6
        }
653
3
        assign_sorted(state, std::move(values));
654
3
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE7compactERNS_22AggregateTopKCountDataILS1_11EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE7compactERNS_22AggregateTopKCountDataILS1_12EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE7compactERNS_22AggregateTopKCountDataILS1_25EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE7compactERNS_22AggregateTopKCountDataILS1_26EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE7compactERNS_22AggregateTopKCountDataILS1_27EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE7compactERNS_22AggregateTopKCountDataILS1_43EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE7compactERNS_22AggregateTopKCountDataILS1_42EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE7compactERNS_22AggregateTopKCountDataILS1_36EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE7compactERNS_22AggregateTopKCountDataILS1_37EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE7compactERNS_22AggregateTopKCountDataILS1_44EEE
655
656
    /// Reclaims the dead slots or the evicted payload once it outnumbers the live one. Checked
657
    /// right after an eviction as well, so the last eviction of a group does not keep a large
658
    /// discarded payload until the next row arrives.
659
22.6k
    static void maybe_compact(State& state) {
660
22.6k
        if (state.dead > state.live || evicted_payload_exceeds_live(state)) {
661
71
            compact(state);
662
71
        }
663
22.6k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_2EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_3EEE
Line
Count
Source
659
1
    static void maybe_compact(State& state) {
660
1
        if (state.dead > state.live || evicted_payload_exceeds_live(state)) {
661
0
            compact(state);
662
0
        }
663
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_4EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_5EEE
Line
Count
Source
659
12.0k
    static void maybe_compact(State& state) {
660
12.0k
        if (state.dead > state.live || evicted_payload_exceeds_live(state)) {
661
42
            compact(state);
662
42
        }
663
12.0k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_6EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_7EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_8EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_9EEE
Line
Count
Source
659
5
    static void maybe_compact(State& state) {
660
5
        if (state.dead > state.live || evicted_payload_exceeds_live(state)) {
661
0
            compact(state);
662
0
        }
663
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_28EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_29EEE
Line
Count
Source
659
40
    static void maybe_compact(State& state) {
660
40
        if (state.dead > state.live || evicted_payload_exceeds_live(state)) {
661
0
            compact(state);
662
0
        }
663
40
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_20EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_30EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_35EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_10EEE
Line
Count
Source
659
101
    static void maybe_compact(State& state) {
660
101
        if (state.dead > state.live || evicted_payload_exceeds_live(state)) {
661
3
            compact(state);
662
3
        }
663
101
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_11EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_12EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_25EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_26EEE
Line
Count
Source
659
14
    static void maybe_compact(State& state) {
660
14
        if (state.dead > state.live || evicted_payload_exceeds_live(state)) {
661
0
            compact(state);
662
0
        }
663
14
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_27EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_43EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_42EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_36EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_37EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_44EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_2EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_3EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_4EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_5EEE
Line
Count
Source
659
10.2k
    static void maybe_compact(State& state) {
660
10.2k
        if (state.dead > state.live || evicted_payload_exceeds_live(state)) {
661
21
            compact(state);
662
21
        }
663
10.2k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_6EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_7EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_8EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_9EEE
Line
Count
Source
659
5
    static void maybe_compact(State& state) {
660
5
        if (state.dead > state.live || evicted_payload_exceeds_live(state)) {
661
0
            compact(state);
662
0
        }
663
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_28EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_29EEE
Line
Count
Source
659
51
    static void maybe_compact(State& state) {
660
51
        if (state.dead > state.live || evicted_payload_exceeds_live(state)) {
661
2
            compact(state);
662
2
        }
663
51
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_20EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_30EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_35EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_10EEE
Line
Count
Source
659
62
    static void maybe_compact(State& state) {
660
62
        if (state.dead > state.live || evicted_payload_exceeds_live(state)) {
661
3
            compact(state);
662
3
        }
663
62
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_11EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_12EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_25EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_26EEE
Line
Count
Source
659
19
    static void maybe_compact(State& state) {
660
19
        if (state.dead > state.live || evicted_payload_exceeds_live(state)) {
661
0
            compact(state);
662
0
        }
663
19
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_27EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_43EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_42EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_36EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_37EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_44EEE
664
665
20.8k
    static void check_k(State& state, const IColumn& count_column, size_t row_num) {
666
20.8k
        const IColumn* nested = &count_column;
667
20.8k
        if (const auto* nullable = check_and_get_column<ColumnNullable>(&count_column)) {
668
5
            if (UNLIKELY(nullable->is_null_at(row_num))) {
669
3
                throw Exception(ErrorCode::INVALID_ARGUMENT,
670
3
                                "the count of min_topk and max_topk must be a non-null "
671
3
                                "constant");
672
3
            }
673
2
            nested = &nullable->get_nested_column();
674
2
        }
675
20.8k
        int64_t value =
676
20.8k
                assert_cast<const ColumnInt64&, TypeCheckOnRelease::DISABLE>(*nested).get_element(
677
20.8k
                        row_num);
678
20.8k
        if (state.k == State::NO_K) {
679
235
            if (UNLIKELY(value < 0)) {
680
0
                throw Exception(ErrorCode::INVALID_ARGUMENT,
681
0
                                "the count of min_topk and max_topk must be a non-negative "
682
0
                                "constant, but got {}",
683
0
                                value);
684
0
            }
685
235
            state.k = value;
686
20.6k
        } else {
687
            // k comes from the same constant expression on every row and every partial state.
688
20.6k
            DCHECK_EQ(state.k, value);
689
20.6k
        }
690
20.8k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_2EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_3EEERKNS_7IColumnEm
Line
Count
Source
665
1
    static void check_k(State& state, const IColumn& count_column, size_t row_num) {
666
1
        const IColumn* nested = &count_column;
667
1
        if (const auto* nullable = check_and_get_column<ColumnNullable>(&count_column)) {
668
0
            if (UNLIKELY(nullable->is_null_at(row_num))) {
669
0
                throw Exception(ErrorCode::INVALID_ARGUMENT,
670
0
                                "the count of min_topk and max_topk must be a non-null "
671
0
                                "constant");
672
0
            }
673
0
            nested = &nullable->get_nested_column();
674
0
        }
675
1
        int64_t value =
676
1
                assert_cast<const ColumnInt64&, TypeCheckOnRelease::DISABLE>(*nested).get_element(
677
1
                        row_num);
678
1
        if (state.k == State::NO_K) {
679
1
            if (UNLIKELY(value < 0)) {
680
0
                throw Exception(ErrorCode::INVALID_ARGUMENT,
681
0
                                "the count of min_topk and max_topk must be a non-negative "
682
0
                                "constant, but got {}",
683
0
                                value);
684
0
            }
685
1
            state.k = value;
686
1
        } else {
687
            // k comes from the same constant expression on every row and every partial state.
688
            DCHECK_EQ(state.k, value);
689
0
        }
690
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_4EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_5EEERKNS_7IColumnEm
Line
Count
Source
665
10.4k
    static void check_k(State& state, const IColumn& count_column, size_t row_num) {
666
10.4k
        const IColumn* nested = &count_column;
667
10.4k
        if (const auto* nullable = check_and_get_column<ColumnNullable>(&count_column)) {
668
4
            if (UNLIKELY(nullable->is_null_at(row_num))) {
669
2
                throw Exception(ErrorCode::INVALID_ARGUMENT,
670
2
                                "the count of min_topk and max_topk must be a non-null "
671
2
                                "constant");
672
2
            }
673
2
            nested = &nullable->get_nested_column();
674
2
        }
675
10.3k
        int64_t value =
676
10.3k
                assert_cast<const ColumnInt64&, TypeCheckOnRelease::DISABLE>(*nested).get_element(
677
10.3k
                        row_num);
678
10.3k
        if (state.k == State::NO_K) {
679
89
            if (UNLIKELY(value < 0)) {
680
0
                throw Exception(ErrorCode::INVALID_ARGUMENT,
681
0
                                "the count of min_topk and max_topk must be a non-negative "
682
0
                                "constant, but got {}",
683
0
                                value);
684
0
            }
685
89
            state.k = value;
686
10.3k
        } else {
687
            // k comes from the same constant expression on every row and every partial state.
688
            DCHECK_EQ(state.k, value);
689
10.3k
        }
690
10.3k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_6EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_7EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_8EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_9EEERKNS_7IColumnEm
Line
Count
Source
665
5
    static void check_k(State& state, const IColumn& count_column, size_t row_num) {
666
5
        const IColumn* nested = &count_column;
667
5
        if (const auto* nullable = check_and_get_column<ColumnNullable>(&count_column)) {
668
0
            if (UNLIKELY(nullable->is_null_at(row_num))) {
669
0
                throw Exception(ErrorCode::INVALID_ARGUMENT,
670
0
                                "the count of min_topk and max_topk must be a non-null "
671
0
                                "constant");
672
0
            }
673
0
            nested = &nullable->get_nested_column();
674
0
        }
675
5
        int64_t value =
676
5
                assert_cast<const ColumnInt64&, TypeCheckOnRelease::DISABLE>(*nested).get_element(
677
5
                        row_num);
678
5
        if (state.k == State::NO_K) {
679
2
            if (UNLIKELY(value < 0)) {
680
0
                throw Exception(ErrorCode::INVALID_ARGUMENT,
681
0
                                "the count of min_topk and max_topk must be a non-negative "
682
0
                                "constant, but got {}",
683
0
                                value);
684
0
            }
685
2
            state.k = value;
686
3
        } else {
687
            // k comes from the same constant expression on every row and every partial state.
688
            DCHECK_EQ(state.k, value);
689
3
        }
690
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_28EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_29EEERKNS_7IColumnEm
Line
Count
Source
665
44
    static void check_k(State& state, const IColumn& count_column, size_t row_num) {
666
44
        const IColumn* nested = &count_column;
667
44
        if (const auto* nullable = check_and_get_column<ColumnNullable>(&count_column)) {
668
0
            if (UNLIKELY(nullable->is_null_at(row_num))) {
669
0
                throw Exception(ErrorCode::INVALID_ARGUMENT,
670
0
                                "the count of min_topk and max_topk must be a non-null "
671
0
                                "constant");
672
0
            }
673
0
            nested = &nullable->get_nested_column();
674
0
        }
675
44
        int64_t value =
676
44
                assert_cast<const ColumnInt64&, TypeCheckOnRelease::DISABLE>(*nested).get_element(
677
44
                        row_num);
678
44
        if (state.k == State::NO_K) {
679
11
            if (UNLIKELY(value < 0)) {
680
0
                throw Exception(ErrorCode::INVALID_ARGUMENT,
681
0
                                "the count of min_topk and max_topk must be a non-negative "
682
0
                                "constant, but got {}",
683
0
                                value);
684
0
            }
685
11
            state.k = value;
686
33
        } else {
687
            // k comes from the same constant expression on every row and every partial state.
688
            DCHECK_EQ(state.k, value);
689
33
        }
690
44
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_20EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_30EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_35EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_10EEERKNS_7IColumnEm
Line
Count
Source
665
93
    static void check_k(State& state, const IColumn& count_column, size_t row_num) {
666
93
        const IColumn* nested = &count_column;
667
93
        if (const auto* nullable = check_and_get_column<ColumnNullable>(&count_column)) {
668
0
            if (UNLIKELY(nullable->is_null_at(row_num))) {
669
0
                throw Exception(ErrorCode::INVALID_ARGUMENT,
670
0
                                "the count of min_topk and max_topk must be a non-null "
671
0
                                "constant");
672
0
            }
673
0
            nested = &nullable->get_nested_column();
674
0
        }
675
93
        int64_t value =
676
93
                assert_cast<const ColumnInt64&, TypeCheckOnRelease::DISABLE>(*nested).get_element(
677
93
                        row_num);
678
93
        if (state.k == State::NO_K) {
679
28
            if (UNLIKELY(value < 0)) {
680
0
                throw Exception(ErrorCode::INVALID_ARGUMENT,
681
0
                                "the count of min_topk and max_topk must be a non-negative "
682
0
                                "constant, but got {}",
683
0
                                value);
684
0
            }
685
28
            state.k = value;
686
65
        } else {
687
            // k comes from the same constant expression on every row and every partial state.
688
            DCHECK_EQ(state.k, value);
689
65
        }
690
93
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_11EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_12EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_25EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_26EEERKNS_7IColumnEm
Line
Count
Source
665
22
    static void check_k(State& state, const IColumn& count_column, size_t row_num) {
666
22
        const IColumn* nested = &count_column;
667
22
        if (const auto* nullable = check_and_get_column<ColumnNullable>(&count_column)) {
668
0
            if (UNLIKELY(nullable->is_null_at(row_num))) {
669
0
                throw Exception(ErrorCode::INVALID_ARGUMENT,
670
0
                                "the count of min_topk and max_topk must be a non-null "
671
0
                                "constant");
672
0
            }
673
0
            nested = &nullable->get_nested_column();
674
0
        }
675
22
        int64_t value =
676
22
                assert_cast<const ColumnInt64&, TypeCheckOnRelease::DISABLE>(*nested).get_element(
677
22
                        row_num);
678
22
        if (state.k == State::NO_K) {
679
9
            if (UNLIKELY(value < 0)) {
680
0
                throw Exception(ErrorCode::INVALID_ARGUMENT,
681
0
                                "the count of min_topk and max_topk must be a non-negative "
682
0
                                "constant, but got {}",
683
0
                                value);
684
0
            }
685
9
            state.k = value;
686
13
        } else {
687
            // k comes from the same constant expression on every row and every partial state.
688
            DCHECK_EQ(state.k, value);
689
13
        }
690
22
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_27EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_43EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_42EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_36EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_37EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_44EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_2EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_3EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_4EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_5EEERKNS_7IColumnEm
Line
Count
Source
665
10.1k
    static void check_k(State& state, const IColumn& count_column, size_t row_num) {
666
10.1k
        const IColumn* nested = &count_column;
667
10.1k
        if (const auto* nullable = check_and_get_column<ColumnNullable>(&count_column)) {
668
1
            if (UNLIKELY(nullable->is_null_at(row_num))) {
669
1
                throw Exception(ErrorCode::INVALID_ARGUMENT,
670
1
                                "the count of min_topk and max_topk must be a non-null "
671
1
                                "constant");
672
1
            }
673
0
            nested = &nullable->get_nested_column();
674
0
        }
675
10.1k
        int64_t value =
676
10.1k
                assert_cast<const ColumnInt64&, TypeCheckOnRelease::DISABLE>(*nested).get_element(
677
10.1k
                        row_num);
678
10.1k
        if (state.k == State::NO_K) {
679
61
            if (UNLIKELY(value < 0)) {
680
0
                throw Exception(ErrorCode::INVALID_ARGUMENT,
681
0
                                "the count of min_topk and max_topk must be a non-negative "
682
0
                                "constant, but got {}",
683
0
                                value);
684
0
            }
685
61
            state.k = value;
686
10.1k
        } else {
687
            // k comes from the same constant expression on every row and every partial state.
688
            DCHECK_EQ(state.k, value);
689
10.1k
        }
690
10.1k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_6EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_7EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_8EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_9EEERKNS_7IColumnEm
Line
Count
Source
665
5
    static void check_k(State& state, const IColumn& count_column, size_t row_num) {
666
5
        const IColumn* nested = &count_column;
667
5
        if (const auto* nullable = check_and_get_column<ColumnNullable>(&count_column)) {
668
0
            if (UNLIKELY(nullable->is_null_at(row_num))) {
669
0
                throw Exception(ErrorCode::INVALID_ARGUMENT,
670
0
                                "the count of min_topk and max_topk must be a non-null "
671
0
                                "constant");
672
0
            }
673
0
            nested = &nullable->get_nested_column();
674
0
        }
675
5
        int64_t value =
676
5
                assert_cast<const ColumnInt64&, TypeCheckOnRelease::DISABLE>(*nested).get_element(
677
5
                        row_num);
678
5
        if (state.k == State::NO_K) {
679
2
            if (UNLIKELY(value < 0)) {
680
0
                throw Exception(ErrorCode::INVALID_ARGUMENT,
681
0
                                "the count of min_topk and max_topk must be a non-negative "
682
0
                                "constant, but got {}",
683
0
                                value);
684
0
            }
685
2
            state.k = value;
686
3
        } else {
687
            // k comes from the same constant expression on every row and every partial state.
688
            DCHECK_EQ(state.k, value);
689
3
        }
690
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_28EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_29EEERKNS_7IColumnEm
Line
Count
Source
665
44
    static void check_k(State& state, const IColumn& count_column, size_t row_num) {
666
44
        const IColumn* nested = &count_column;
667
44
        if (const auto* nullable = check_and_get_column<ColumnNullable>(&count_column)) {
668
0
            if (UNLIKELY(nullable->is_null_at(row_num))) {
669
0
                throw Exception(ErrorCode::INVALID_ARGUMENT,
670
0
                                "the count of min_topk and max_topk must be a non-null "
671
0
                                "constant");
672
0
            }
673
0
            nested = &nullable->get_nested_column();
674
0
        }
675
44
        int64_t value =
676
44
                assert_cast<const ColumnInt64&, TypeCheckOnRelease::DISABLE>(*nested).get_element(
677
44
                        row_num);
678
44
        if (state.k == State::NO_K) {
679
11
            if (UNLIKELY(value < 0)) {
680
0
                throw Exception(ErrorCode::INVALID_ARGUMENT,
681
0
                                "the count of min_topk and max_topk must be a non-negative "
682
0
                                "constant, but got {}",
683
0
                                value);
684
0
            }
685
11
            state.k = value;
686
33
        } else {
687
            // k comes from the same constant expression on every row and every partial state.
688
            DCHECK_EQ(state.k, value);
689
33
        }
690
44
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_20EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_30EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_35EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_10EEERKNS_7IColumnEm
Line
Count
Source
665
48
    static void check_k(State& state, const IColumn& count_column, size_t row_num) {
666
48
        const IColumn* nested = &count_column;
667
48
        if (const auto* nullable = check_and_get_column<ColumnNullable>(&count_column)) {
668
0
            if (UNLIKELY(nullable->is_null_at(row_num))) {
669
0
                throw Exception(ErrorCode::INVALID_ARGUMENT,
670
0
                                "the count of min_topk and max_topk must be a non-null "
671
0
                                "constant");
672
0
            }
673
0
            nested = &nullable->get_nested_column();
674
0
        }
675
48
        int64_t value =
676
48
                assert_cast<const ColumnInt64&, TypeCheckOnRelease::DISABLE>(*nested).get_element(
677
48
                        row_num);
678
48
        if (state.k == State::NO_K) {
679
12
            if (UNLIKELY(value < 0)) {
680
0
                throw Exception(ErrorCode::INVALID_ARGUMENT,
681
0
                                "the count of min_topk and max_topk must be a non-negative "
682
0
                                "constant, but got {}",
683
0
                                value);
684
0
            }
685
12
            state.k = value;
686
36
        } else {
687
            // k comes from the same constant expression on every row and every partial state.
688
            DCHECK_EQ(state.k, value);
689
36
        }
690
48
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_11EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_12EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_25EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_26EEERKNS_7IColumnEm
Line
Count
Source
665
22
    static void check_k(State& state, const IColumn& count_column, size_t row_num) {
666
22
        const IColumn* nested = &count_column;
667
22
        if (const auto* nullable = check_and_get_column<ColumnNullable>(&count_column)) {
668
0
            if (UNLIKELY(nullable->is_null_at(row_num))) {
669
0
                throw Exception(ErrorCode::INVALID_ARGUMENT,
670
0
                                "the count of min_topk and max_topk must be a non-null "
671
0
                                "constant");
672
0
            }
673
0
            nested = &nullable->get_nested_column();
674
0
        }
675
22
        int64_t value =
676
22
                assert_cast<const ColumnInt64&, TypeCheckOnRelease::DISABLE>(*nested).get_element(
677
22
                        row_num);
678
22
        if (state.k == State::NO_K) {
679
9
            if (UNLIKELY(value < 0)) {
680
0
                throw Exception(ErrorCode::INVALID_ARGUMENT,
681
0
                                "the count of min_topk and max_topk must be a non-negative "
682
0
                                "constant, but got {}",
683
0
                                value);
684
0
            }
685
9
            state.k = value;
686
13
        } else {
687
            // k comes from the same constant expression on every row and every partial state.
688
            DCHECK_EQ(state.k, value);
689
13
        }
690
22
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_27EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_43EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_42EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_36EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_37EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_44EEERKNS_7IColumnEm
691
692
142
    static int64_t checked_add(int64_t lhs, int64_t rhs) {
693
142
        int64_t result = 0;
694
142
        if (UNLIKELY(__builtin_add_overflow(lhs, rhs, &result))) {
695
1
            throw Exception(ErrorCode::INVALID_ARGUMENT, "min_topk/max_topk value count overflow");
696
1
        }
697
141
        return result;
698
142
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE11checked_addEll
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE11checked_addEll
Line
Count
Source
692
58
    static int64_t checked_add(int64_t lhs, int64_t rhs) {
693
58
        int64_t result = 0;
694
58
        if (UNLIKELY(__builtin_add_overflow(lhs, rhs, &result))) {
695
1
            throw Exception(ErrorCode::INVALID_ARGUMENT, "min_topk/max_topk value count overflow");
696
1
        }
697
57
        return result;
698
58
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE11checked_addEll
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE11checked_addEll
Line
Count
Source
692
2
    static int64_t checked_add(int64_t lhs, int64_t rhs) {
693
2
        int64_t result = 0;
694
2
        if (UNLIKELY(__builtin_add_overflow(lhs, rhs, &result))) {
695
0
            throw Exception(ErrorCode::INVALID_ARGUMENT, "min_topk/max_topk value count overflow");
696
0
        }
697
2
        return result;
698
2
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE11checked_addEll
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE11checked_addEll
Line
Count
Source
692
10
    static int64_t checked_add(int64_t lhs, int64_t rhs) {
693
10
        int64_t result = 0;
694
10
        if (UNLIKELY(__builtin_add_overflow(lhs, rhs, &result))) {
695
0
            throw Exception(ErrorCode::INVALID_ARGUMENT, "min_topk/max_topk value count overflow");
696
0
        }
697
10
        return result;
698
10
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE11checked_addEll
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE11checked_addEll
Line
Count
Source
692
11
    static int64_t checked_add(int64_t lhs, int64_t rhs) {
693
11
        int64_t result = 0;
694
11
        if (UNLIKELY(__builtin_add_overflow(lhs, rhs, &result))) {
695
0
            throw Exception(ErrorCode::INVALID_ARGUMENT, "min_topk/max_topk value count overflow");
696
0
        }
697
11
        return result;
698
11
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE11checked_addEll
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE11checked_addEll
Line
Count
Source
692
41
    static int64_t checked_add(int64_t lhs, int64_t rhs) {
693
41
        int64_t result = 0;
694
41
        if (UNLIKELY(__builtin_add_overflow(lhs, rhs, &result))) {
695
0
            throw Exception(ErrorCode::INVALID_ARGUMENT, "min_topk/max_topk value count overflow");
696
0
        }
697
41
        return result;
698
41
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE11checked_addEll
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE11checked_addEll
Line
Count
Source
692
2
    static int64_t checked_add(int64_t lhs, int64_t rhs) {
693
2
        int64_t result = 0;
694
2
        if (UNLIKELY(__builtin_add_overflow(lhs, rhs, &result))) {
695
0
            throw Exception(ErrorCode::INVALID_ARGUMENT, "min_topk/max_topk value count overflow");
696
0
        }
697
2
        return result;
698
2
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE11checked_addEll
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE11checked_addEll
Line
Count
Source
692
7
    static int64_t checked_add(int64_t lhs, int64_t rhs) {
693
7
        int64_t result = 0;
694
7
        if (UNLIKELY(__builtin_add_overflow(lhs, rhs, &result))) {
695
0
            throw Exception(ErrorCode::INVALID_ARGUMENT, "min_topk/max_topk value count overflow");
696
0
        }
697
7
        return result;
698
7
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE11checked_addEll
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE11checked_addEll
Line
Count
Source
692
10
    static int64_t checked_add(int64_t lhs, int64_t rhs) {
693
10
        int64_t result = 0;
694
10
        if (UNLIKELY(__builtin_add_overflow(lhs, rhs, &result))) {
695
0
            throw Exception(ErrorCode::INVALID_ARGUMENT, "min_topk/max_topk value count overflow");
696
0
        }
697
10
        return result;
698
10
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE11checked_addEll
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE11checked_addEll
Line
Count
Source
692
1
    static int64_t checked_add(int64_t lhs, int64_t rhs) {
693
1
        int64_t result = 0;
694
1
        if (UNLIKELY(__builtin_add_overflow(lhs, rhs, &result))) {
695
0
            throw Exception(ErrorCode::INVALID_ARGUMENT, "min_topk/max_topk value count overflow");
696
0
        }
697
1
        return result;
698
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE11checked_addEll
699
700
    /// k == 0 fast path: only the extreme value is tracked.
701
20.7k
    static void add_value(State& state, const IColumn& column, size_t row_num) {
702
20.7k
        if (state.k == 0) {
703
45
            if (state.live == 0) {
704
17
                state.root = append_slot(state, column, row_num, 1);
705
17
                state.worst = state.root;
706
17
                return;
707
17
            }
708
28
            int cmp = compare_values(value_at(column, row_num), value_of(state, 0));
709
28
            if (cmp == 0) {
710
8
                state.slots[0].count = checked_add(state.slots[0].count, 1);
711
20
            } else if (comes_before(cmp)) {
712
                // The new value is better: replace the tracked extreme. The slot and the
713
                // single-node tree stay in place, only the stored value changes.
714
10
                replace_value(state, 0, value_at(column, row_num));
715
10
                state.slots[0].count = 1;
716
10
            }
717
28
            return;
718
45
        }
719
720
        // Dead slots and evicted payload are reclaimed once they outnumber the live ones.
721
20.7k
        maybe_compact(state);
722
723
20.7k
        if (state.live >= state.k) {
724
            // A full list rejects or absorbs most rows: comparing with the eviction candidate
725
            // costs one comparison, while the tree descent would cost log2(k).
726
19.2k
            int cmp = compare_values(value_at(column, row_num), value_of(state, state.worst));
727
19.2k
            if (cmp == 0) {
728
20
                state.slots[state.worst].count = checked_add(state.slots[state.worst].count, 1);
729
20
                return;
730
20
            }
731
19.2k
            if (is_worse(cmp)) {
732
17.2k
                return;
733
17.2k
            }
734
19.2k
        }
735
736
3.45k
        int32_t inserted = State::NO_SLOT;
737
3.45k
        state.root = add_or_increment(state, state.root, value_at(column, row_num), 1, &inserted);
738
3.45k
        if (inserted == State::NO_SLOT) {
739
75
            return;
740
75
        }
741
3.37k
        if (state.live <= state.k) {
742
            // Not over capacity: the new entry competes with the cached worst for the eviction
743
            // candidate role.
744
1.43k
            if (state.worst == State::NO_SLOT ||
745
1.43k
                is_worse(compare_slots(state, inserted, state.worst))) {
746
839
                state.worst = inserted;
747
839
            }
748
1.43k
            return;
749
1.43k
        }
750
        // The list was full and the value is new. It beat the cached worst above, so it cannot be
751
        // the worst itself; the old worst is still the rightmost entry and leaves the list.
752
1.94k
        int32_t removed = State::NO_SLOT;
753
1.94k
        state.root = erase_worst(state, state.root, &removed);
754
1.94k
        DCHECK_EQ(removed, state.worst);
755
1.94k
        evict_value(state, removed);
756
1.94k
        state.slots[removed].count = State::DEAD_COUNT;
757
1.94k
        --state.live;
758
1.94k
        ++state.dead;
759
1.94k
        refresh_worst(state);
760
1.94k
        maybe_compact(state);
761
1.94k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_2EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_3EEERKNS_7IColumnEm
Line
Count
Source
701
1
    static void add_value(State& state, const IColumn& column, size_t row_num) {
702
1
        if (state.k == 0) {
703
0
            if (state.live == 0) {
704
0
                state.root = append_slot(state, column, row_num, 1);
705
0
                state.worst = state.root;
706
0
                return;
707
0
            }
708
0
            int cmp = compare_values(value_at(column, row_num), value_of(state, 0));
709
0
            if (cmp == 0) {
710
0
                state.slots[0].count = checked_add(state.slots[0].count, 1);
711
0
            } else if (comes_before(cmp)) {
712
                // The new value is better: replace the tracked extreme. The slot and the
713
                // single-node tree stay in place, only the stored value changes.
714
0
                replace_value(state, 0, value_at(column, row_num));
715
0
                state.slots[0].count = 1;
716
0
            }
717
0
            return;
718
0
        }
719
720
        // Dead slots and evicted payload are reclaimed once they outnumber the live ones.
721
1
        maybe_compact(state);
722
723
1
        if (state.live >= state.k) {
724
            // A full list rejects or absorbs most rows: comparing with the eviction candidate
725
            // costs one comparison, while the tree descent would cost log2(k).
726
0
            int cmp = compare_values(value_at(column, row_num), value_of(state, state.worst));
727
0
            if (cmp == 0) {
728
0
                state.slots[state.worst].count = checked_add(state.slots[state.worst].count, 1);
729
0
                return;
730
0
            }
731
0
            if (is_worse(cmp)) {
732
0
                return;
733
0
            }
734
0
        }
735
736
1
        int32_t inserted = State::NO_SLOT;
737
1
        state.root = add_or_increment(state, state.root, value_at(column, row_num), 1, &inserted);
738
1
        if (inserted == State::NO_SLOT) {
739
0
            return;
740
0
        }
741
1
        if (state.live <= state.k) {
742
            // Not over capacity: the new entry competes with the cached worst for the eviction
743
            // candidate role.
744
1
            if (state.worst == State::NO_SLOT ||
745
1
                is_worse(compare_slots(state, inserted, state.worst))) {
746
1
                state.worst = inserted;
747
1
            }
748
1
            return;
749
1
        }
750
        // The list was full and the value is new. It beat the cached worst above, so it cannot be
751
        // the worst itself; the old worst is still the rightmost entry and leaves the list.
752
0
        int32_t removed = State::NO_SLOT;
753
0
        state.root = erase_worst(state, state.root, &removed);
754
        DCHECK_EQ(removed, state.worst);
755
0
        evict_value(state, removed);
756
0
        state.slots[removed].count = State::DEAD_COUNT;
757
0
        --state.live;
758
0
        ++state.dead;
759
0
        refresh_worst(state);
760
0
        maybe_compact(state);
761
0
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_4EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_5EEERKNS_7IColumnEm
Line
Count
Source
701
10.3k
    static void add_value(State& state, const IColumn& column, size_t row_num) {
702
10.3k
        if (state.k == 0) {
703
23
            if (state.live == 0) {
704
9
                state.root = append_slot(state, column, row_num, 1);
705
9
                state.worst = state.root;
706
9
                return;
707
9
            }
708
14
            int cmp = compare_values(value_at(column, row_num), value_of(state, 0));
709
14
            if (cmp == 0) {
710
4
                state.slots[0].count = checked_add(state.slots[0].count, 1);
711
10
            } else if (comes_before(cmp)) {
712
                // The new value is better: replace the tracked extreme. The slot and the
713
                // single-node tree stay in place, only the stored value changes.
714
1
                replace_value(state, 0, value_at(column, row_num));
715
1
                state.slots[0].count = 1;
716
1
            }
717
14
            return;
718
23
        }
719
720
        // Dead slots and evicted payload are reclaimed once they outnumber the live ones.
721
10.3k
        maybe_compact(state);
722
723
10.3k
        if (state.live >= state.k) {
724
            // A full list rejects or absorbs most rows: comparing with the eviction candidate
725
            // costs one comparison, while the tree descent would cost log2(k).
726
9.62k
            int cmp = compare_values(value_at(column, row_num), value_of(state, state.worst));
727
9.62k
            if (cmp == 0) {
728
6
                state.slots[state.worst].count = checked_add(state.slots[state.worst].count, 1);
729
6
                return;
730
6
            }
731
9.62k
            if (is_worse(cmp)) {
732
7.87k
                return;
733
7.87k
            }
734
9.62k
        }
735
736
2.46k
        int32_t inserted = State::NO_SLOT;
737
2.46k
        state.root = add_or_increment(state, state.root, value_at(column, row_num), 1, &inserted);
738
2.46k
        if (inserted == State::NO_SLOT) {
739
34
            return;
740
34
        }
741
2.43k
        if (state.live <= state.k) {
742
            // Not over capacity: the new entry competes with the cached worst for the eviction
743
            // candidate role.
744
701
            if (state.worst == State::NO_SLOT ||
745
701
                is_worse(compare_slots(state, inserted, state.worst))) {
746
183
                state.worst = inserted;
747
183
            }
748
701
            return;
749
701
        }
750
        // The list was full and the value is new. It beat the cached worst above, so it cannot be
751
        // the worst itself; the old worst is still the rightmost entry and leaves the list.
752
1.73k
        int32_t removed = State::NO_SLOT;
753
1.73k
        state.root = erase_worst(state, state.root, &removed);
754
        DCHECK_EQ(removed, state.worst);
755
1.73k
        evict_value(state, removed);
756
1.73k
        state.slots[removed].count = State::DEAD_COUNT;
757
1.73k
        --state.live;
758
1.73k
        ++state.dead;
759
1.73k
        refresh_worst(state);
760
1.73k
        maybe_compact(state);
761
1.73k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_6EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_7EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_8EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_9EEERKNS_7IColumnEm
Line
Count
Source
701
5
    static void add_value(State& state, const IColumn& column, size_t row_num) {
702
5
        if (state.k == 0) {
703
0
            if (state.live == 0) {
704
0
                state.root = append_slot(state, column, row_num, 1);
705
0
                state.worst = state.root;
706
0
                return;
707
0
            }
708
0
            int cmp = compare_values(value_at(column, row_num), value_of(state, 0));
709
0
            if (cmp == 0) {
710
0
                state.slots[0].count = checked_add(state.slots[0].count, 1);
711
0
            } else if (comes_before(cmp)) {
712
                // The new value is better: replace the tracked extreme. The slot and the
713
                // single-node tree stay in place, only the stored value changes.
714
0
                replace_value(state, 0, value_at(column, row_num));
715
0
                state.slots[0].count = 1;
716
0
            }
717
0
            return;
718
0
        }
719
720
        // Dead slots and evicted payload are reclaimed once they outnumber the live ones.
721
5
        maybe_compact(state);
722
723
5
        if (state.live >= state.k) {
724
            // A full list rejects or absorbs most rows: comparing with the eviction candidate
725
            // costs one comparison, while the tree descent would cost log2(k).
726
0
            int cmp = compare_values(value_at(column, row_num), value_of(state, state.worst));
727
0
            if (cmp == 0) {
728
0
                state.slots[state.worst].count = checked_add(state.slots[state.worst].count, 1);
729
0
                return;
730
0
            }
731
0
            if (is_worse(cmp)) {
732
0
                return;
733
0
            }
734
0
        }
735
736
5
        int32_t inserted = State::NO_SLOT;
737
5
        state.root = add_or_increment(state, state.root, value_at(column, row_num), 1, &inserted);
738
5
        if (inserted == State::NO_SLOT) {
739
0
            return;
740
0
        }
741
5
        if (state.live <= state.k) {
742
            // Not over capacity: the new entry competes with the cached worst for the eviction
743
            // candidate role.
744
5
            if (state.worst == State::NO_SLOT ||
745
5
                is_worse(compare_slots(state, inserted, state.worst))) {
746
5
                state.worst = inserted;
747
5
            }
748
5
            return;
749
5
        }
750
        // The list was full and the value is new. It beat the cached worst above, so it cannot be
751
        // the worst itself; the old worst is still the rightmost entry and leaves the list.
752
0
        int32_t removed = State::NO_SLOT;
753
0
        state.root = erase_worst(state, state.root, &removed);
754
        DCHECK_EQ(removed, state.worst);
755
0
        evict_value(state, removed);
756
0
        state.slots[removed].count = State::DEAD_COUNT;
757
0
        --state.live;
758
0
        ++state.dead;
759
0
        refresh_worst(state);
760
0
        maybe_compact(state);
761
0
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_28EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_29EEERKNS_7IColumnEm
Line
Count
Source
701
38
    static void add_value(State& state, const IColumn& column, size_t row_num) {
702
38
        if (state.k == 0) {
703
0
            if (state.live == 0) {
704
0
                state.root = append_slot(state, column, row_num, 1);
705
0
                state.worst = state.root;
706
0
                return;
707
0
            }
708
0
            int cmp = compare_values(value_at(column, row_num), value_of(state, 0));
709
0
            if (cmp == 0) {
710
0
                state.slots[0].count = checked_add(state.slots[0].count, 1);
711
0
            } else if (comes_before(cmp)) {
712
                // The new value is better: replace the tracked extreme. The slot and the
713
                // single-node tree stay in place, only the stored value changes.
714
0
                replace_value(state, 0, value_at(column, row_num));
715
0
                state.slots[0].count = 1;
716
0
            }
717
0
            return;
718
0
        }
719
720
        // Dead slots and evicted payload are reclaimed once they outnumber the live ones.
721
38
        maybe_compact(state);
722
723
38
        if (state.live >= state.k) {
724
            // A full list rejects or absorbs most rows: comparing with the eviction candidate
725
            // costs one comparison, while the tree descent would cost log2(k).
726
18
            int cmp = compare_values(value_at(column, row_num), value_of(state, state.worst));
727
18
            if (cmp == 0) {
728
0
                state.slots[state.worst].count = checked_add(state.slots[state.worst].count, 1);
729
0
                return;
730
0
            }
731
18
            if (is_worse(cmp)) {
732
13
                return;
733
13
            }
734
18
        }
735
736
25
        int32_t inserted = State::NO_SLOT;
737
25
        state.root = add_or_increment(state, state.root, value_at(column, row_num), 1, &inserted);
738
25
        if (inserted == State::NO_SLOT) {
739
8
            return;
740
8
        }
741
17
        if (state.live <= state.k) {
742
            // Not over capacity: the new entry competes with the cached worst for the eviction
743
            // candidate role.
744
15
            if (state.worst == State::NO_SLOT ||
745
15
                is_worse(compare_slots(state, inserted, state.worst))) {
746
15
                state.worst = inserted;
747
15
            }
748
15
            return;
749
15
        }
750
        // The list was full and the value is new. It beat the cached worst above, so it cannot be
751
        // the worst itself; the old worst is still the rightmost entry and leaves the list.
752
2
        int32_t removed = State::NO_SLOT;
753
2
        state.root = erase_worst(state, state.root, &removed);
754
        DCHECK_EQ(removed, state.worst);
755
2
        evict_value(state, removed);
756
2
        state.slots[removed].count = State::DEAD_COUNT;
757
2
        --state.live;
758
2
        ++state.dead;
759
2
        refresh_worst(state);
760
2
        maybe_compact(state);
761
2
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_20EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_30EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_35EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_10EEERKNS_7IColumnEm
Line
Count
Source
701
89
    static void add_value(State& state, const IColumn& column, size_t row_num) {
702
89
        if (state.k == 0) {
703
0
            if (state.live == 0) {
704
0
                state.root = append_slot(state, column, row_num, 1);
705
0
                state.worst = state.root;
706
0
                return;
707
0
            }
708
0
            int cmp = compare_values(value_at(column, row_num), value_of(state, 0));
709
0
            if (cmp == 0) {
710
0
                state.slots[0].count = checked_add(state.slots[0].count, 1);
711
0
            } else if (comes_before(cmp)) {
712
                // The new value is better: replace the tracked extreme. The slot and the
713
                // single-node tree stay in place, only the stored value changes.
714
0
                replace_value(state, 0, value_at(column, row_num));
715
0
                state.slots[0].count = 1;
716
0
            }
717
0
            return;
718
0
        }
719
720
        // Dead slots and evicted payload are reclaimed once they outnumber the live ones.
721
89
        maybe_compact(state);
722
723
89
        if (state.live >= state.k) {
724
            // A full list rejects or absorbs most rows: comparing with the eviction candidate
725
            // costs one comparison, while the tree descent would cost log2(k).
726
33
            int cmp = compare_values(value_at(column, row_num), value_of(state, state.worst));
727
33
            if (cmp == 0) {
728
1
                state.slots[state.worst].count = checked_add(state.slots[state.worst].count, 1);
729
1
                return;
730
1
            }
731
32
            if (is_worse(cmp)) {
732
20
                return;
733
20
            }
734
32
        }
735
736
68
        int32_t inserted = State::NO_SLOT;
737
68
        state.root = add_or_increment(state, state.root, value_at(column, row_num), 1, &inserted);
738
68
        if (inserted == State::NO_SLOT) {
739
6
            return;
740
6
        }
741
62
        if (state.live <= state.k) {
742
            // Not over capacity: the new entry competes with the cached worst for the eviction
743
            // candidate role.
744
51
            if (state.worst == State::NO_SLOT ||
745
51
                is_worse(compare_slots(state, inserted, state.worst))) {
746
48
                state.worst = inserted;
747
48
            }
748
51
            return;
749
51
        }
750
        // The list was full and the value is new. It beat the cached worst above, so it cannot be
751
        // the worst itself; the old worst is still the rightmost entry and leaves the list.
752
11
        int32_t removed = State::NO_SLOT;
753
11
        state.root = erase_worst(state, state.root, &removed);
754
        DCHECK_EQ(removed, state.worst);
755
11
        evict_value(state, removed);
756
11
        state.slots[removed].count = State::DEAD_COUNT;
757
11
        --state.live;
758
11
        ++state.dead;
759
11
        refresh_worst(state);
760
11
        maybe_compact(state);
761
11
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_11EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_12EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_25EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_26EEERKNS_7IColumnEm
Line
Count
Source
701
14
    static void add_value(State& state, const IColumn& column, size_t row_num) {
702
14
        if (state.k == 0) {
703
0
            if (state.live == 0) {
704
0
                state.root = append_slot(state, column, row_num, 1);
705
0
                state.worst = state.root;
706
0
                return;
707
0
            }
708
0
            int cmp = compare_values(value_at(column, row_num), value_of(state, 0));
709
0
            if (cmp == 0) {
710
0
                state.slots[0].count = checked_add(state.slots[0].count, 1);
711
0
            } else if (comes_before(cmp)) {
712
                // The new value is better: replace the tracked extreme. The slot and the
713
                // single-node tree stay in place, only the stored value changes.
714
0
                replace_value(state, 0, value_at(column, row_num));
715
0
                state.slots[0].count = 1;
716
0
            }
717
0
            return;
718
0
        }
719
720
        // Dead slots and evicted payload are reclaimed once they outnumber the live ones.
721
14
        maybe_compact(state);
722
723
14
        if (state.live >= state.k) {
724
            // A full list rejects or absorbs most rows: comparing with the eviction candidate
725
            // costs one comparison, while the tree descent would cost log2(k).
726
5
            int cmp = compare_values(value_at(column, row_num), value_of(state, state.worst));
727
5
            if (cmp == 0) {
728
0
                state.slots[state.worst].count = checked_add(state.slots[state.worst].count, 1);
729
0
                return;
730
0
            }
731
5
            if (is_worse(cmp)) {
732
5
                return;
733
5
            }
734
5
        }
735
736
9
        int32_t inserted = State::NO_SLOT;
737
9
        state.root = add_or_increment(state, state.root, value_at(column, row_num), 1, &inserted);
738
9
        if (inserted == State::NO_SLOT) {
739
0
            return;
740
0
        }
741
9
        if (state.live <= state.k) {
742
            // Not over capacity: the new entry competes with the cached worst for the eviction
743
            // candidate role.
744
9
            if (state.worst == State::NO_SLOT ||
745
9
                is_worse(compare_slots(state, inserted, state.worst))) {
746
8
                state.worst = inserted;
747
8
            }
748
9
            return;
749
9
        }
750
        // The list was full and the value is new. It beat the cached worst above, so it cannot be
751
        // the worst itself; the old worst is still the rightmost entry and leaves the list.
752
0
        int32_t removed = State::NO_SLOT;
753
0
        state.root = erase_worst(state, state.root, &removed);
754
        DCHECK_EQ(removed, state.worst);
755
0
        evict_value(state, removed);
756
0
        state.slots[removed].count = State::DEAD_COUNT;
757
0
        --state.live;
758
0
        ++state.dead;
759
0
        refresh_worst(state);
760
0
        maybe_compact(state);
761
0
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_27EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_43EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_42EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_36EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_37EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_44EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_2EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_3EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_4EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_5EEERKNS_7IColumnEm
Line
Count
Source
701
10.1k
    static void add_value(State& state, const IColumn& column, size_t row_num) {
702
10.1k
        if (state.k == 0) {
703
22
            if (state.live == 0) {
704
8
                state.root = append_slot(state, column, row_num, 1);
705
8
                state.worst = state.root;
706
8
                return;
707
8
            }
708
14
            int cmp = compare_values(value_at(column, row_num), value_of(state, 0));
709
14
            if (cmp == 0) {
710
4
                state.slots[0].count = checked_add(state.slots[0].count, 1);
711
10
            } else if (comes_before(cmp)) {
712
                // The new value is better: replace the tracked extreme. The slot and the
713
                // single-node tree stay in place, only the stored value changes.
714
9
                replace_value(state, 0, value_at(column, row_num));
715
9
                state.slots[0].count = 1;
716
9
            }
717
14
            return;
718
22
        }
719
720
        // Dead slots and evicted payload are reclaimed once they outnumber the live ones.
721
10.1k
        maybe_compact(state);
722
723
10.1k
        if (state.live >= state.k) {
724
            // A full list rejects or absorbs most rows: comparing with the eviction candidate
725
            // costs one comparison, while the tree descent would cost log2(k).
726
9.51k
            int cmp = compare_values(value_at(column, row_num), value_of(state, state.worst));
727
9.51k
            if (cmp == 0) {
728
10
                state.slots[state.worst].count = checked_add(state.slots[state.worst].count, 1);
729
10
                return;
730
10
            }
731
9.50k
            if (is_worse(cmp)) {
732
9.34k
                return;
733
9.34k
            }
734
9.50k
        }
735
736
784
        int32_t inserted = State::NO_SLOT;
737
784
        state.root = add_or_increment(state, state.root, value_at(column, row_num), 1, &inserted);
738
784
        if (inserted == State::NO_SLOT) {
739
17
            return;
740
17
        }
741
767
        if (state.live <= state.k) {
742
            // Not over capacity: the new entry competes with the cached worst for the eviction
743
            // candidate role.
744
604
            if (state.worst == State::NO_SLOT ||
745
604
                is_worse(compare_slots(state, inserted, state.worst))) {
746
549
                state.worst = inserted;
747
549
            }
748
604
            return;
749
604
        }
750
        // The list was full and the value is new. It beat the cached worst above, so it cannot be
751
        // the worst itself; the old worst is still the rightmost entry and leaves the list.
752
163
        int32_t removed = State::NO_SLOT;
753
163
        state.root = erase_worst(state, state.root, &removed);
754
        DCHECK_EQ(removed, state.worst);
755
163
        evict_value(state, removed);
756
163
        state.slots[removed].count = State::DEAD_COUNT;
757
163
        --state.live;
758
163
        ++state.dead;
759
163
        refresh_worst(state);
760
163
        maybe_compact(state);
761
163
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_6EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_7EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_8EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_9EEERKNS_7IColumnEm
Line
Count
Source
701
5
    static void add_value(State& state, const IColumn& column, size_t row_num) {
702
5
        if (state.k == 0) {
703
0
            if (state.live == 0) {
704
0
                state.root = append_slot(state, column, row_num, 1);
705
0
                state.worst = state.root;
706
0
                return;
707
0
            }
708
0
            int cmp = compare_values(value_at(column, row_num), value_of(state, 0));
709
0
            if (cmp == 0) {
710
0
                state.slots[0].count = checked_add(state.slots[0].count, 1);
711
0
            } else if (comes_before(cmp)) {
712
                // The new value is better: replace the tracked extreme. The slot and the
713
                // single-node tree stay in place, only the stored value changes.
714
0
                replace_value(state, 0, value_at(column, row_num));
715
0
                state.slots[0].count = 1;
716
0
            }
717
0
            return;
718
0
        }
719
720
        // Dead slots and evicted payload are reclaimed once they outnumber the live ones.
721
5
        maybe_compact(state);
722
723
5
        if (state.live >= state.k) {
724
            // A full list rejects or absorbs most rows: comparing with the eviction candidate
725
            // costs one comparison, while the tree descent would cost log2(k).
726
0
            int cmp = compare_values(value_at(column, row_num), value_of(state, state.worst));
727
0
            if (cmp == 0) {
728
0
                state.slots[state.worst].count = checked_add(state.slots[state.worst].count, 1);
729
0
                return;
730
0
            }
731
0
            if (is_worse(cmp)) {
732
0
                return;
733
0
            }
734
0
        }
735
736
5
        int32_t inserted = State::NO_SLOT;
737
5
        state.root = add_or_increment(state, state.root, value_at(column, row_num), 1, &inserted);
738
5
        if (inserted == State::NO_SLOT) {
739
0
            return;
740
0
        }
741
5
        if (state.live <= state.k) {
742
            // Not over capacity: the new entry competes with the cached worst for the eviction
743
            // candidate role.
744
5
            if (state.worst == State::NO_SLOT ||
745
5
                is_worse(compare_slots(state, inserted, state.worst))) {
746
2
                state.worst = inserted;
747
2
            }
748
5
            return;
749
5
        }
750
        // The list was full and the value is new. It beat the cached worst above, so it cannot be
751
        // the worst itself; the old worst is still the rightmost entry and leaves the list.
752
0
        int32_t removed = State::NO_SLOT;
753
0
        state.root = erase_worst(state, state.root, &removed);
754
        DCHECK_EQ(removed, state.worst);
755
0
        evict_value(state, removed);
756
0
        state.slots[removed].count = State::DEAD_COUNT;
757
0
        --state.live;
758
0
        ++state.dead;
759
0
        refresh_worst(state);
760
0
        maybe_compact(state);
761
0
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_28EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_29EEERKNS_7IColumnEm
Line
Count
Source
701
38
    static void add_value(State& state, const IColumn& column, size_t row_num) {
702
38
        if (state.k == 0) {
703
0
            if (state.live == 0) {
704
0
                state.root = append_slot(state, column, row_num, 1);
705
0
                state.worst = state.root;
706
0
                return;
707
0
            }
708
0
            int cmp = compare_values(value_at(column, row_num), value_of(state, 0));
709
0
            if (cmp == 0) {
710
0
                state.slots[0].count = checked_add(state.slots[0].count, 1);
711
0
            } else if (comes_before(cmp)) {
712
                // The new value is better: replace the tracked extreme. The slot and the
713
                // single-node tree stay in place, only the stored value changes.
714
0
                replace_value(state, 0, value_at(column, row_num));
715
0
                state.slots[0].count = 1;
716
0
            }
717
0
            return;
718
0
        }
719
720
        // Dead slots and evicted payload are reclaimed once they outnumber the live ones.
721
38
        maybe_compact(state);
722
723
38
        if (state.live >= state.k) {
724
            // A full list rejects or absorbs most rows: comparing with the eviction candidate
725
            // costs one comparison, while the tree descent would cost log2(k).
726
18
            int cmp = compare_values(value_at(column, row_num), value_of(state, state.worst));
727
18
            if (cmp == 0) {
728
0
                state.slots[state.worst].count = checked_add(state.slots[state.worst].count, 1);
729
0
                return;
730
0
            }
731
18
            if (is_worse(cmp)) {
732
5
                return;
733
5
            }
734
18
        }
735
736
33
        int32_t inserted = State::NO_SLOT;
737
33
        state.root = add_or_increment(state, state.root, value_at(column, row_num), 1, &inserted);
738
33
        if (inserted == State::NO_SLOT) {
739
5
            return;
740
5
        }
741
28
        if (state.live <= state.k) {
742
            // Not over capacity: the new entry competes with the cached worst for the eviction
743
            // candidate role.
744
15
            if (state.worst == State::NO_SLOT ||
745
15
                is_worse(compare_slots(state, inserted, state.worst))) {
746
9
                state.worst = inserted;
747
9
            }
748
15
            return;
749
15
        }
750
        // The list was full and the value is new. It beat the cached worst above, so it cannot be
751
        // the worst itself; the old worst is still the rightmost entry and leaves the list.
752
13
        int32_t removed = State::NO_SLOT;
753
13
        state.root = erase_worst(state, state.root, &removed);
754
        DCHECK_EQ(removed, state.worst);
755
13
        evict_value(state, removed);
756
13
        state.slots[removed].count = State::DEAD_COUNT;
757
13
        --state.live;
758
13
        ++state.dead;
759
13
        refresh_worst(state);
760
13
        maybe_compact(state);
761
13
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_20EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_30EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_35EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_10EEERKNS_7IColumnEm
Line
Count
Source
701
44
    static void add_value(State& state, const IColumn& column, size_t row_num) {
702
44
        if (state.k == 0) {
703
0
            if (state.live == 0) {
704
0
                state.root = append_slot(state, column, row_num, 1);
705
0
                state.worst = state.root;
706
0
                return;
707
0
            }
708
0
            int cmp = compare_values(value_at(column, row_num), value_of(state, 0));
709
0
            if (cmp == 0) {
710
0
                state.slots[0].count = checked_add(state.slots[0].count, 1);
711
0
            } else if (comes_before(cmp)) {
712
                // The new value is better: replace the tracked extreme. The slot and the
713
                // single-node tree stay in place, only the stored value changes.
714
0
                replace_value(state, 0, value_at(column, row_num));
715
0
                state.slots[0].count = 1;
716
0
            }
717
0
            return;
718
0
        }
719
720
        // Dead slots and evicted payload are reclaimed once they outnumber the live ones.
721
44
        maybe_compact(state);
722
723
44
        if (state.live >= state.k) {
724
            // A full list rejects or absorbs most rows: comparing with the eviction candidate
725
            // costs one comparison, while the tree descent would cost log2(k).
726
22
            int cmp = compare_values(value_at(column, row_num), value_of(state, state.worst));
727
22
            if (cmp == 0) {
728
3
                state.slots[state.worst].count = checked_add(state.slots[state.worst].count, 1);
729
3
                return;
730
3
            }
731
19
            if (is_worse(cmp)) {
732
1
                return;
733
1
            }
734
19
        }
735
736
40
        int32_t inserted = State::NO_SLOT;
737
40
        state.root = add_or_increment(state, state.root, value_at(column, row_num), 1, &inserted);
738
40
        if (inserted == State::NO_SLOT) {
739
5
            return;
740
5
        }
741
35
        if (state.live <= state.k) {
742
            // Not over capacity: the new entry competes with the cached worst for the eviction
743
            // candidate role.
744
17
            if (state.worst == State::NO_SLOT ||
745
17
                is_worse(compare_slots(state, inserted, state.worst))) {
746
13
                state.worst = inserted;
747
13
            }
748
17
            return;
749
17
        }
750
        // The list was full and the value is new. It beat the cached worst above, so it cannot be
751
        // the worst itself; the old worst is still the rightmost entry and leaves the list.
752
18
        int32_t removed = State::NO_SLOT;
753
18
        state.root = erase_worst(state, state.root, &removed);
754
        DCHECK_EQ(removed, state.worst);
755
18
        evict_value(state, removed);
756
18
        state.slots[removed].count = State::DEAD_COUNT;
757
18
        --state.live;
758
18
        ++state.dead;
759
18
        refresh_worst(state);
760
18
        maybe_compact(state);
761
18
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_11EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_12EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_25EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_26EEERKNS_7IColumnEm
Line
Count
Source
701
14
    static void add_value(State& state, const IColumn& column, size_t row_num) {
702
14
        if (state.k == 0) {
703
0
            if (state.live == 0) {
704
0
                state.root = append_slot(state, column, row_num, 1);
705
0
                state.worst = state.root;
706
0
                return;
707
0
            }
708
0
            int cmp = compare_values(value_at(column, row_num), value_of(state, 0));
709
0
            if (cmp == 0) {
710
0
                state.slots[0].count = checked_add(state.slots[0].count, 1);
711
0
            } else if (comes_before(cmp)) {
712
                // The new value is better: replace the tracked extreme. The slot and the
713
                // single-node tree stay in place, only the stored value changes.
714
0
                replace_value(state, 0, value_at(column, row_num));
715
0
                state.slots[0].count = 1;
716
0
            }
717
0
            return;
718
0
        }
719
720
        // Dead slots and evicted payload are reclaimed once they outnumber the live ones.
721
14
        maybe_compact(state);
722
723
14
        if (state.live >= state.k) {
724
            // A full list rejects or absorbs most rows: comparing with the eviction candidate
725
            // costs one comparison, while the tree descent would cost log2(k).
726
5
            int cmp = compare_values(value_at(column, row_num), value_of(state, state.worst));
727
5
            if (cmp == 0) {
728
0
                state.slots[state.worst].count = checked_add(state.slots[state.worst].count, 1);
729
0
                return;
730
0
            }
731
5
            if (is_worse(cmp)) {
732
0
                return;
733
0
            }
734
5
        }
735
736
14
        int32_t inserted = State::NO_SLOT;
737
14
        state.root = add_or_increment(state, state.root, value_at(column, row_num), 1, &inserted);
738
14
        if (inserted == State::NO_SLOT) {
739
0
            return;
740
0
        }
741
14
        if (state.live <= state.k) {
742
            // Not over capacity: the new entry competes with the cached worst for the eviction
743
            // candidate role.
744
9
            if (state.worst == State::NO_SLOT ||
745
9
                is_worse(compare_slots(state, inserted, state.worst))) {
746
6
                state.worst = inserted;
747
6
            }
748
9
            return;
749
9
        }
750
        // The list was full and the value is new. It beat the cached worst above, so it cannot be
751
        // the worst itself; the old worst is still the rightmost entry and leaves the list.
752
5
        int32_t removed = State::NO_SLOT;
753
5
        state.root = erase_worst(state, state.root, &removed);
754
        DCHECK_EQ(removed, state.worst);
755
5
        evict_value(state, removed);
756
5
        state.slots[removed].count = State::DEAD_COUNT;
757
5
        --state.live;
758
5
        ++state.dead;
759
5
        refresh_worst(state);
760
5
        maybe_compact(state);
761
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_27EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_43EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_42EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_36EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_37EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_44EEERKNS_7IColumnEm
762
763
    /// k == 0: the state holds at most the extreme value and its count.
764
18
    static void merge_extreme(State& state, const State& other) {
765
18
        if (other.live == 0) {
766
4
            return;
767
4
        }
768
14
        if (state.live == 0) {
769
8
            state.root = append_slot(state, value_of(other, 0), other.slots[0].count);
770
8
            state.worst = state.root;
771
8
            return;
772
8
        }
773
6
        int cmp = compare_values(value_of(state, 0), value_of(other, 0));
774
6
        if (cmp == 0) {
775
3
            state.slots[0].count = checked_add(state.slots[0].count, other.slots[0].count);
776
3
        } else if (is_worse(cmp)) {
777
1
            replace_value(state, 0, value_of(other, 0));
778
1
            state.slots[0].count = other.slots[0].count;
779
1
        }
780
6
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_2EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_3EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_4EEERKS4_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_5EEERKS4_
Line
Count
Source
764
9
    static void merge_extreme(State& state, const State& other) {
765
9
        if (other.live == 0) {
766
2
            return;
767
2
        }
768
7
        if (state.live == 0) {
769
4
            state.root = append_slot(state, value_of(other, 0), other.slots[0].count);
770
4
            state.worst = state.root;
771
4
            return;
772
4
        }
773
3
        int cmp = compare_values(value_of(state, 0), value_of(other, 0));
774
3
        if (cmp == 0) {
775
1
            state.slots[0].count = checked_add(state.slots[0].count, other.slots[0].count);
776
2
        } else if (is_worse(cmp)) {
777
1
            replace_value(state, 0, value_of(other, 0));
778
1
            state.slots[0].count = other.slots[0].count;
779
1
        }
780
3
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_6EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_7EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_8EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_9EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_28EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_29EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_20EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_30EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_35EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_10EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_11EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_12EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_25EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_26EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_27EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_43EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_42EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_36EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_37EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_44EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_2EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_3EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_4EEERKS4_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_5EEERKS4_
Line
Count
Source
764
9
    static void merge_extreme(State& state, const State& other) {
765
9
        if (other.live == 0) {
766
2
            return;
767
2
        }
768
7
        if (state.live == 0) {
769
4
            state.root = append_slot(state, value_of(other, 0), other.slots[0].count);
770
4
            state.worst = state.root;
771
4
            return;
772
4
        }
773
3
        int cmp = compare_values(value_of(state, 0), value_of(other, 0));
774
3
        if (cmp == 0) {
775
2
            state.slots[0].count = checked_add(state.slots[0].count, other.slots[0].count);
776
2
        } else if (is_worse(cmp)) {
777
0
            replace_value(state, 0, value_of(other, 0));
778
0
            state.slots[0].count = other.slots[0].count;
779
0
        }
780
3
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_6EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_7EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_8EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_9EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_28EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_29EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_20EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_30EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_35EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_10EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_11EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_12EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_25EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_26EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_27EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_43EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_42EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_36EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_37EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_44EEERKS4_
781
782
    /// Merges two ordered lists, summing the counts of equal values and keeping the k best.
783
    ///
784
    /// The merge stops as soon as k entries are produced. Both inputs are best-first and hold
785
    /// distinct values, and equal values have already been combined, so every remaining value is
786
    /// worse than all retained ones: it can neither enter the result nor overflow it. Stopping
787
    /// here also avoids materializing a tail that would be truncated away.
788
183
    static void merge_values(State& state, const State& other) {
789
183
        if (other.live == 0) {
790
            // The other partial state saw no non-NULL row.
791
37
            return;
792
37
        }
793
        // `_state`/`_merge`/`_union` merges one serialized singleton per row, so a single-entry
794
        // RHS is exactly one add, whether or not the list is full: a retained value (including an
795
        // interior one) only bumps its count, and a new one is inserted, evicting the worst only
796
        // when the list was already full. Neither copies the retained values nor rebuilds the
797
        // tree.
798
146
        if (other.live == 1) {
799
64
            const int32_t other_only = other.root;
800
64
            ValueRef value = value_of(other, other_only);
801
64
            if (state.live >= state.k &&
802
64
                is_worse(compare_values(value, value_of(state, state.worst)))) {
803
                // A full list rejects a worse value without touching the tree.
804
3
                return;
805
3
            }
806
61
            int32_t inserted = State::NO_SLOT;
807
61
            state.root = add_or_increment(state, state.root, value, other.slots[other_only].count,
808
61
                                          &inserted);
809
61
            if (inserted == State::NO_SLOT) {
810
18
                return;
811
18
            }
812
43
            if (state.live <= state.k) {
813
                // There was room: the new entry competes with the cached worst for the eviction
814
                // candidate role, exactly like the add path.
815
40
                if (state.worst == State::NO_SLOT ||
816
40
                    is_worse(compare_slots(state, inserted, state.worst))) {
817
40
                    state.worst = inserted;
818
40
                }
819
40
                return;
820
40
            }
821
            // The list was full, so the new entry is one over capacity. It beat the cached worst
822
            // above, so the old worst is still the last entry and leaves the list.
823
3
            int32_t removed = State::NO_SLOT;
824
3
            state.root = erase_worst(state, state.root, &removed);
825
3
            DCHECK_EQ(removed, state.worst);
826
3
            evict_value(state, removed);
827
3
            state.slots[removed].count = State::DEAD_COUNT;
828
3
            --state.live;
829
3
            ++state.dead;
830
3
            refresh_worst(state);
831
3
            maybe_compact(state);
832
3
            return;
833
43
        }
834
82
        if (state.live >= state.k) {
835
            // A full state already holds the k best values. If every value of the other state is
836
            // worse than the worst one retained here, the merge cannot change the result, so skip
837
            // the collect/rebuild.
838
34
            const int32_t other_best = best_slot(other);
839
34
            int cmp = compare_values(value_of(other, other_best), value_of(state, state.worst));
840
34
            if (is_worse(cmp)) {
841
1
                return;
842
1
            }
843
33
            if (cmp == 0) {
844
                // The other state's best value is the worst retained one. Its remaining values are
845
                // distinct and worse, so they cannot enter either: only that count changes, and
846
                // the tree stays as it is.
847
2
                state.slots[state.worst].count =
848
2
                        checked_add(state.slots[state.worst].count, other.slots[other_best].count);
849
2
                return;
850
2
            }
851
33
        }
852
79
        DorisVector<int32_t> lhs_slots;
853
79
        DorisVector<int32_t> rhs_slots;
854
79
        collect_in_order(state, lhs_slots);
855
79
        collect_in_order(other, rhs_slots);
856
79
        DorisVector<Entry> merged;
857
79
        merge_sorted_slots(state, lhs_slots, other, rhs_slots, static_cast<size_t>(state.k),
858
79
                           merged);
859
79
        check_slot_capacity(merged.size());
860
79
        assign_sorted(state, std::move(merged));
861
79
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_2EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_3EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_4EEERKS4_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_5EEERKS4_
Line
Count
Source
788
66
    static void merge_values(State& state, const State& other) {
789
66
        if (other.live == 0) {
790
            // The other partial state saw no non-NULL row.
791
13
            return;
792
13
        }
793
        // `_state`/`_merge`/`_union` merges one serialized singleton per row, so a single-entry
794
        // RHS is exactly one add, whether or not the list is full: a retained value (including an
795
        // interior one) only bumps its count, and a new one is inserted, evicting the worst only
796
        // when the list was already full. Neither copies the retained values nor rebuilds the
797
        // tree.
798
53
        if (other.live == 1) {
799
27
            const int32_t other_only = other.root;
800
27
            ValueRef value = value_of(other, other_only);
801
27
            if (state.live >= state.k &&
802
27
                is_worse(compare_values(value, value_of(state, state.worst)))) {
803
                // A full list rejects a worse value without touching the tree.
804
1
                return;
805
1
            }
806
26
            int32_t inserted = State::NO_SLOT;
807
26
            state.root = add_or_increment(state, state.root, value, other.slots[other_only].count,
808
26
                                          &inserted);
809
26
            if (inserted == State::NO_SLOT) {
810
7
                return;
811
7
            }
812
19
            if (state.live <= state.k) {
813
                // There was room: the new entry competes with the cached worst for the eviction
814
                // candidate role, exactly like the add path.
815
17
                if (state.worst == State::NO_SLOT ||
816
17
                    is_worse(compare_slots(state, inserted, state.worst))) {
817
17
                    state.worst = inserted;
818
17
                }
819
17
                return;
820
17
            }
821
            // The list was full, so the new entry is one over capacity. It beat the cached worst
822
            // above, so the old worst is still the last entry and leaves the list.
823
2
            int32_t removed = State::NO_SLOT;
824
2
            state.root = erase_worst(state, state.root, &removed);
825
2
            DCHECK_EQ(removed, state.worst);
826
2
            evict_value(state, removed);
827
2
            state.slots[removed].count = State::DEAD_COUNT;
828
2
            --state.live;
829
2
            ++state.dead;
830
2
            refresh_worst(state);
831
2
            maybe_compact(state);
832
2
            return;
833
19
        }
834
26
        if (state.live >= state.k) {
835
            // A full state already holds the k best values. If every value of the other state is
836
            // worse than the worst one retained here, the merge cannot change the result, so skip
837
            // the collect/rebuild.
838
10
            const int32_t other_best = best_slot(other);
839
10
            int cmp = compare_values(value_of(other, other_best), value_of(state, state.worst));
840
10
            if (is_worse(cmp)) {
841
0
                return;
842
0
            }
843
10
            if (cmp == 0) {
844
                // The other state's best value is the worst retained one. Its remaining values are
845
                // distinct and worse, so they cannot enter either: only that count changes, and
846
                // the tree stays as it is.
847
0
                state.slots[state.worst].count =
848
0
                        checked_add(state.slots[state.worst].count, other.slots[other_best].count);
849
0
                return;
850
0
            }
851
10
        }
852
26
        DorisVector<int32_t> lhs_slots;
853
26
        DorisVector<int32_t> rhs_slots;
854
26
        collect_in_order(state, lhs_slots);
855
26
        collect_in_order(other, rhs_slots);
856
26
        DorisVector<Entry> merged;
857
26
        merge_sorted_slots(state, lhs_slots, other, rhs_slots, static_cast<size_t>(state.k),
858
26
                           merged);
859
26
        check_slot_capacity(merged.size());
860
26
        assign_sorted(state, std::move(merged));
861
26
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_6EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_7EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_8EEERKS4_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_9EEERKS4_
Line
Count
Source
788
2
    static void merge_values(State& state, const State& other) {
789
2
        if (other.live == 0) {
790
            // The other partial state saw no non-NULL row.
791
0
            return;
792
0
        }
793
        // `_state`/`_merge`/`_union` merges one serialized singleton per row, so a single-entry
794
        // RHS is exactly one add, whether or not the list is full: a retained value (including an
795
        // interior one) only bumps its count, and a new one is inserted, evicting the worst only
796
        // when the list was already full. Neither copies the retained values nor rebuilds the
797
        // tree.
798
2
        if (other.live == 1) {
799
0
            const int32_t other_only = other.root;
800
0
            ValueRef value = value_of(other, other_only);
801
0
            if (state.live >= state.k &&
802
0
                is_worse(compare_values(value, value_of(state, state.worst)))) {
803
                // A full list rejects a worse value without touching the tree.
804
0
                return;
805
0
            }
806
0
            int32_t inserted = State::NO_SLOT;
807
0
            state.root = add_or_increment(state, state.root, value, other.slots[other_only].count,
808
0
                                          &inserted);
809
0
            if (inserted == State::NO_SLOT) {
810
0
                return;
811
0
            }
812
0
            if (state.live <= state.k) {
813
                // There was room: the new entry competes with the cached worst for the eviction
814
                // candidate role, exactly like the add path.
815
0
                if (state.worst == State::NO_SLOT ||
816
0
                    is_worse(compare_slots(state, inserted, state.worst))) {
817
0
                    state.worst = inserted;
818
0
                }
819
0
                return;
820
0
            }
821
            // The list was full, so the new entry is one over capacity. It beat the cached worst
822
            // above, so the old worst is still the last entry and leaves the list.
823
0
            int32_t removed = State::NO_SLOT;
824
0
            state.root = erase_worst(state, state.root, &removed);
825
0
            DCHECK_EQ(removed, state.worst);
826
0
            evict_value(state, removed);
827
0
            state.slots[removed].count = State::DEAD_COUNT;
828
0
            --state.live;
829
0
            ++state.dead;
830
0
            refresh_worst(state);
831
0
            maybe_compact(state);
832
0
            return;
833
0
        }
834
2
        if (state.live >= state.k) {
835
            // A full state already holds the k best values. If every value of the other state is
836
            // worse than the worst one retained here, the merge cannot change the result, so skip
837
            // the collect/rebuild.
838
0
            const int32_t other_best = best_slot(other);
839
0
            int cmp = compare_values(value_of(other, other_best), value_of(state, state.worst));
840
0
            if (is_worse(cmp)) {
841
0
                return;
842
0
            }
843
0
            if (cmp == 0) {
844
                // The other state's best value is the worst retained one. Its remaining values are
845
                // distinct and worse, so they cannot enter either: only that count changes, and
846
                // the tree stays as it is.
847
0
                state.slots[state.worst].count =
848
0
                        checked_add(state.slots[state.worst].count, other.slots[other_best].count);
849
0
                return;
850
0
            }
851
0
        }
852
2
        DorisVector<int32_t> lhs_slots;
853
2
        DorisVector<int32_t> rhs_slots;
854
2
        collect_in_order(state, lhs_slots);
855
2
        collect_in_order(other, rhs_slots);
856
2
        DorisVector<Entry> merged;
857
2
        merge_sorted_slots(state, lhs_slots, other, rhs_slots, static_cast<size_t>(state.k),
858
2
                           merged);
859
2
        check_slot_capacity(merged.size());
860
2
        assign_sorted(state, std::move(merged));
861
2
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_28EEERKS4_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_29EEERKS4_
Line
Count
Source
788
11
    static void merge_values(State& state, const State& other) {
789
11
        if (other.live == 0) {
790
            // The other partial state saw no non-NULL row.
791
2
            return;
792
2
        }
793
        // `_state`/`_merge`/`_union` merges one serialized singleton per row, so a single-entry
794
        // RHS is exactly one add, whether or not the list is full: a retained value (including an
795
        // interior one) only bumps its count, and a new one is inserted, evicting the worst only
796
        // when the list was already full. Neither copies the retained values nor rebuilds the
797
        // tree.
798
9
        if (other.live == 1) {
799
3
            const int32_t other_only = other.root;
800
3
            ValueRef value = value_of(other, other_only);
801
3
            if (state.live >= state.k &&
802
3
                is_worse(compare_values(value, value_of(state, state.worst)))) {
803
                // A full list rejects a worse value without touching the tree.
804
0
                return;
805
0
            }
806
3
            int32_t inserted = State::NO_SLOT;
807
3
            state.root = add_or_increment(state, state.root, value, other.slots[other_only].count,
808
3
                                          &inserted);
809
3
            if (inserted == State::NO_SLOT) {
810
1
                return;
811
1
            }
812
2
            if (state.live <= state.k) {
813
                // There was room: the new entry competes with the cached worst for the eviction
814
                // candidate role, exactly like the add path.
815
2
                if (state.worst == State::NO_SLOT ||
816
2
                    is_worse(compare_slots(state, inserted, state.worst))) {
817
2
                    state.worst = inserted;
818
2
                }
819
2
                return;
820
2
            }
821
            // The list was full, so the new entry is one over capacity. It beat the cached worst
822
            // above, so the old worst is still the last entry and leaves the list.
823
0
            int32_t removed = State::NO_SLOT;
824
0
            state.root = erase_worst(state, state.root, &removed);
825
0
            DCHECK_EQ(removed, state.worst);
826
0
            evict_value(state, removed);
827
0
            state.slots[removed].count = State::DEAD_COUNT;
828
0
            --state.live;
829
0
            ++state.dead;
830
0
            refresh_worst(state);
831
0
            maybe_compact(state);
832
0
            return;
833
2
        }
834
6
        if (state.live >= state.k) {
835
            // A full state already holds the k best values. If every value of the other state is
836
            // worse than the worst one retained here, the merge cannot change the result, so skip
837
            // the collect/rebuild.
838
3
            const int32_t other_best = best_slot(other);
839
3
            int cmp = compare_values(value_of(other, other_best), value_of(state, state.worst));
840
3
            if (is_worse(cmp)) {
841
0
                return;
842
0
            }
843
3
            if (cmp == 0) {
844
                // The other state's best value is the worst retained one. Its remaining values are
845
                // distinct and worse, so they cannot enter either: only that count changes, and
846
                // the tree stays as it is.
847
0
                state.slots[state.worst].count =
848
0
                        checked_add(state.slots[state.worst].count, other.slots[other_best].count);
849
0
                return;
850
0
            }
851
3
        }
852
6
        DorisVector<int32_t> lhs_slots;
853
6
        DorisVector<int32_t> rhs_slots;
854
6
        collect_in_order(state, lhs_slots);
855
6
        collect_in_order(other, rhs_slots);
856
6
        DorisVector<Entry> merged;
857
6
        merge_sorted_slots(state, lhs_slots, other, rhs_slots, static_cast<size_t>(state.k),
858
6
                           merged);
859
6
        check_slot_capacity(merged.size());
860
6
        assign_sorted(state, std::move(merged));
861
6
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_20EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_30EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_35EEERKS4_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_10EEERKS4_
Line
Count
Source
788
18
    static void merge_values(State& state, const State& other) {
789
18
        if (other.live == 0) {
790
            // The other partial state saw no non-NULL row.
791
2
            return;
792
2
        }
793
        // `_state`/`_merge`/`_union` merges one serialized singleton per row, so a single-entry
794
        // RHS is exactly one add, whether or not the list is full: a retained value (including an
795
        // interior one) only bumps its count, and a new one is inserted, evicting the worst only
796
        // when the list was already full. Neither copies the retained values nor rebuilds the
797
        // tree.
798
16
        if (other.live == 1) {
799
8
            const int32_t other_only = other.root;
800
8
            ValueRef value = value_of(other, other_only);
801
8
            if (state.live >= state.k &&
802
8
                is_worse(compare_values(value, value_of(state, state.worst)))) {
803
                // A full list rejects a worse value without touching the tree.
804
1
                return;
805
1
            }
806
7
            int32_t inserted = State::NO_SLOT;
807
7
            state.root = add_or_increment(state, state.root, value, other.slots[other_only].count,
808
7
                                          &inserted);
809
7
            if (inserted == State::NO_SLOT) {
810
3
                return;
811
3
            }
812
4
            if (state.live <= state.k) {
813
                // There was room: the new entry competes with the cached worst for the eviction
814
                // candidate role, exactly like the add path.
815
3
                if (state.worst == State::NO_SLOT ||
816
3
                    is_worse(compare_slots(state, inserted, state.worst))) {
817
3
                    state.worst = inserted;
818
3
                }
819
3
                return;
820
3
            }
821
            // The list was full, so the new entry is one over capacity. It beat the cached worst
822
            // above, so the old worst is still the last entry and leaves the list.
823
1
            int32_t removed = State::NO_SLOT;
824
1
            state.root = erase_worst(state, state.root, &removed);
825
1
            DCHECK_EQ(removed, state.worst);
826
1
            evict_value(state, removed);
827
1
            state.slots[removed].count = State::DEAD_COUNT;
828
1
            --state.live;
829
1
            ++state.dead;
830
1
            refresh_worst(state);
831
1
            maybe_compact(state);
832
1
            return;
833
4
        }
834
8
        if (state.live >= state.k) {
835
            // A full state already holds the k best values. If every value of the other state is
836
            // worse than the worst one retained here, the merge cannot change the result, so skip
837
            // the collect/rebuild.
838
5
            const int32_t other_best = best_slot(other);
839
5
            int cmp = compare_values(value_of(other, other_best), value_of(state, state.worst));
840
5
            if (is_worse(cmp)) {
841
1
                return;
842
1
            }
843
4
            if (cmp == 0) {
844
                // The other state's best value is the worst retained one. Its remaining values are
845
                // distinct and worse, so they cannot enter either: only that count changes, and
846
                // the tree stays as it is.
847
1
                state.slots[state.worst].count =
848
1
                        checked_add(state.slots[state.worst].count, other.slots[other_best].count);
849
1
                return;
850
1
            }
851
4
        }
852
6
        DorisVector<int32_t> lhs_slots;
853
6
        DorisVector<int32_t> rhs_slots;
854
6
        collect_in_order(state, lhs_slots);
855
6
        collect_in_order(other, rhs_slots);
856
6
        DorisVector<Entry> merged;
857
6
        merge_sorted_slots(state, lhs_slots, other, rhs_slots, static_cast<size_t>(state.k),
858
6
                           merged);
859
6
        check_slot_capacity(merged.size());
860
6
        assign_sorted(state, std::move(merged));
861
6
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_11EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_12EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_25EEERKS4_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_26EEERKS4_
Line
Count
Source
788
9
    static void merge_values(State& state, const State& other) {
789
9
        if (other.live == 0) {
790
            // The other partial state saw no non-NULL row.
791
4
            return;
792
4
        }
793
        // `_state`/`_merge`/`_union` merges one serialized singleton per row, so a single-entry
794
        // RHS is exactly one add, whether or not the list is full: a retained value (including an
795
        // interior one) only bumps its count, and a new one is inserted, evicting the worst only
796
        // when the list was already full. Neither copies the retained values nor rebuilds the
797
        // tree.
798
5
        if (other.live == 1) {
799
1
            const int32_t other_only = other.root;
800
1
            ValueRef value = value_of(other, other_only);
801
1
            if (state.live >= state.k &&
802
1
                is_worse(compare_values(value, value_of(state, state.worst)))) {
803
                // A full list rejects a worse value without touching the tree.
804
0
                return;
805
0
            }
806
1
            int32_t inserted = State::NO_SLOT;
807
1
            state.root = add_or_increment(state, state.root, value, other.slots[other_only].count,
808
1
                                          &inserted);
809
1
            if (inserted == State::NO_SLOT) {
810
0
                return;
811
0
            }
812
1
            if (state.live <= state.k) {
813
                // There was room: the new entry competes with the cached worst for the eviction
814
                // candidate role, exactly like the add path.
815
1
                if (state.worst == State::NO_SLOT ||
816
1
                    is_worse(compare_slots(state, inserted, state.worst))) {
817
1
                    state.worst = inserted;
818
1
                }
819
1
                return;
820
1
            }
821
            // The list was full, so the new entry is one over capacity. It beat the cached worst
822
            // above, so the old worst is still the last entry and leaves the list.
823
0
            int32_t removed = State::NO_SLOT;
824
0
            state.root = erase_worst(state, state.root, &removed);
825
0
            DCHECK_EQ(removed, state.worst);
826
0
            evict_value(state, removed);
827
0
            state.slots[removed].count = State::DEAD_COUNT;
828
0
            --state.live;
829
0
            ++state.dead;
830
0
            refresh_worst(state);
831
0
            maybe_compact(state);
832
0
            return;
833
1
        }
834
4
        if (state.live >= state.k) {
835
            // A full state already holds the k best values. If every value of the other state is
836
            // worse than the worst one retained here, the merge cannot change the result, so skip
837
            // the collect/rebuild.
838
2
            const int32_t other_best = best_slot(other);
839
2
            int cmp = compare_values(value_of(other, other_best), value_of(state, state.worst));
840
2
            if (is_worse(cmp)) {
841
0
                return;
842
0
            }
843
2
            if (cmp == 0) {
844
                // The other state's best value is the worst retained one. Its remaining values are
845
                // distinct and worse, so they cannot enter either: only that count changes, and
846
                // the tree stays as it is.
847
0
                state.slots[state.worst].count =
848
0
                        checked_add(state.slots[state.worst].count, other.slots[other_best].count);
849
0
                return;
850
0
            }
851
2
        }
852
4
        DorisVector<int32_t> lhs_slots;
853
4
        DorisVector<int32_t> rhs_slots;
854
4
        collect_in_order(state, lhs_slots);
855
4
        collect_in_order(other, rhs_slots);
856
4
        DorisVector<Entry> merged;
857
4
        merge_sorted_slots(state, lhs_slots, other, rhs_slots, static_cast<size_t>(state.k),
858
4
                           merged);
859
4
        check_slot_capacity(merged.size());
860
4
        assign_sorted(state, std::move(merged));
861
4
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_27EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_43EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_42EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_36EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_37EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_44EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_2EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_3EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_4EEERKS4_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_5EEERKS4_
Line
Count
Source
788
44
    static void merge_values(State& state, const State& other) {
789
44
        if (other.live == 0) {
790
            // The other partial state saw no non-NULL row.
791
8
            return;
792
8
        }
793
        // `_state`/`_merge`/`_union` merges one serialized singleton per row, so a single-entry
794
        // RHS is exactly one add, whether or not the list is full: a retained value (including an
795
        // interior one) only bumps its count, and a new one is inserted, evicting the worst only
796
        // when the list was already full. Neither copies the retained values nor rebuilds the
797
        // tree.
798
36
        if (other.live == 1) {
799
18
            const int32_t other_only = other.root;
800
18
            ValueRef value = value_of(other, other_only);
801
18
            if (state.live >= state.k &&
802
18
                is_worse(compare_values(value, value_of(state, state.worst)))) {
803
                // A full list rejects a worse value without touching the tree.
804
1
                return;
805
1
            }
806
17
            int32_t inserted = State::NO_SLOT;
807
17
            state.root = add_or_increment(state, state.root, value, other.slots[other_only].count,
808
17
                                          &inserted);
809
17
            if (inserted == State::NO_SLOT) {
810
5
                return;
811
5
            }
812
12
            if (state.live <= state.k) {
813
                // There was room: the new entry competes with the cached worst for the eviction
814
                // candidate role, exactly like the add path.
815
12
                if (state.worst == State::NO_SLOT ||
816
12
                    is_worse(compare_slots(state, inserted, state.worst))) {
817
12
                    state.worst = inserted;
818
12
                }
819
12
                return;
820
12
            }
821
            // The list was full, so the new entry is one over capacity. It beat the cached worst
822
            // above, so the old worst is still the last entry and leaves the list.
823
0
            int32_t removed = State::NO_SLOT;
824
0
            state.root = erase_worst(state, state.root, &removed);
825
0
            DCHECK_EQ(removed, state.worst);
826
0
            evict_value(state, removed);
827
0
            state.slots[removed].count = State::DEAD_COUNT;
828
0
            --state.live;
829
0
            ++state.dead;
830
0
            refresh_worst(state);
831
0
            maybe_compact(state);
832
0
            return;
833
12
        }
834
18
        if (state.live >= state.k) {
835
            // A full state already holds the k best values. If every value of the other state is
836
            // worse than the worst one retained here, the merge cannot change the result, so skip
837
            // the collect/rebuild.
838
6
            const int32_t other_best = best_slot(other);
839
6
            int cmp = compare_values(value_of(other, other_best), value_of(state, state.worst));
840
6
            if (is_worse(cmp)) {
841
0
                return;
842
0
            }
843
6
            if (cmp == 0) {
844
                // The other state's best value is the worst retained one. Its remaining values are
845
                // distinct and worse, so they cannot enter either: only that count changes, and
846
                // the tree stays as it is.
847
0
                state.slots[state.worst].count =
848
0
                        checked_add(state.slots[state.worst].count, other.slots[other_best].count);
849
0
                return;
850
0
            }
851
6
        }
852
18
        DorisVector<int32_t> lhs_slots;
853
18
        DorisVector<int32_t> rhs_slots;
854
18
        collect_in_order(state, lhs_slots);
855
18
        collect_in_order(other, rhs_slots);
856
18
        DorisVector<Entry> merged;
857
18
        merge_sorted_slots(state, lhs_slots, other, rhs_slots, static_cast<size_t>(state.k),
858
18
                           merged);
859
18
        check_slot_capacity(merged.size());
860
18
        assign_sorted(state, std::move(merged));
861
18
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_6EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_7EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_8EEERKS4_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_9EEERKS4_
Line
Count
Source
788
2
    static void merge_values(State& state, const State& other) {
789
2
        if (other.live == 0) {
790
            // The other partial state saw no non-NULL row.
791
0
            return;
792
0
        }
793
        // `_state`/`_merge`/`_union` merges one serialized singleton per row, so a single-entry
794
        // RHS is exactly one add, whether or not the list is full: a retained value (including an
795
        // interior one) only bumps its count, and a new one is inserted, evicting the worst only
796
        // when the list was already full. Neither copies the retained values nor rebuilds the
797
        // tree.
798
2
        if (other.live == 1) {
799
0
            const int32_t other_only = other.root;
800
0
            ValueRef value = value_of(other, other_only);
801
0
            if (state.live >= state.k &&
802
0
                is_worse(compare_values(value, value_of(state, state.worst)))) {
803
                // A full list rejects a worse value without touching the tree.
804
0
                return;
805
0
            }
806
0
            int32_t inserted = State::NO_SLOT;
807
0
            state.root = add_or_increment(state, state.root, value, other.slots[other_only].count,
808
0
                                          &inserted);
809
0
            if (inserted == State::NO_SLOT) {
810
0
                return;
811
0
            }
812
0
            if (state.live <= state.k) {
813
                // There was room: the new entry competes with the cached worst for the eviction
814
                // candidate role, exactly like the add path.
815
0
                if (state.worst == State::NO_SLOT ||
816
0
                    is_worse(compare_slots(state, inserted, state.worst))) {
817
0
                    state.worst = inserted;
818
0
                }
819
0
                return;
820
0
            }
821
            // The list was full, so the new entry is one over capacity. It beat the cached worst
822
            // above, so the old worst is still the last entry and leaves the list.
823
0
            int32_t removed = State::NO_SLOT;
824
0
            state.root = erase_worst(state, state.root, &removed);
825
0
            DCHECK_EQ(removed, state.worst);
826
0
            evict_value(state, removed);
827
0
            state.slots[removed].count = State::DEAD_COUNT;
828
0
            --state.live;
829
0
            ++state.dead;
830
0
            refresh_worst(state);
831
0
            maybe_compact(state);
832
0
            return;
833
0
        }
834
2
        if (state.live >= state.k) {
835
            // A full state already holds the k best values. If every value of the other state is
836
            // worse than the worst one retained here, the merge cannot change the result, so skip
837
            // the collect/rebuild.
838
0
            const int32_t other_best = best_slot(other);
839
0
            int cmp = compare_values(value_of(other, other_best), value_of(state, state.worst));
840
0
            if (is_worse(cmp)) {
841
0
                return;
842
0
            }
843
0
            if (cmp == 0) {
844
                // The other state's best value is the worst retained one. Its remaining values are
845
                // distinct and worse, so they cannot enter either: only that count changes, and
846
                // the tree stays as it is.
847
0
                state.slots[state.worst].count =
848
0
                        checked_add(state.slots[state.worst].count, other.slots[other_best].count);
849
0
                return;
850
0
            }
851
0
        }
852
2
        DorisVector<int32_t> lhs_slots;
853
2
        DorisVector<int32_t> rhs_slots;
854
2
        collect_in_order(state, lhs_slots);
855
2
        collect_in_order(other, rhs_slots);
856
2
        DorisVector<Entry> merged;
857
2
        merge_sorted_slots(state, lhs_slots, other, rhs_slots, static_cast<size_t>(state.k),
858
2
                           merged);
859
2
        check_slot_capacity(merged.size());
860
2
        assign_sorted(state, std::move(merged));
861
2
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_28EEERKS4_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_29EEERKS4_
Line
Count
Source
788
11
    static void merge_values(State& state, const State& other) {
789
11
        if (other.live == 0) {
790
            // The other partial state saw no non-NULL row.
791
2
            return;
792
2
        }
793
        // `_state`/`_merge`/`_union` merges one serialized singleton per row, so a single-entry
794
        // RHS is exactly one add, whether or not the list is full: a retained value (including an
795
        // interior one) only bumps its count, and a new one is inserted, evicting the worst only
796
        // when the list was already full. Neither copies the retained values nor rebuilds the
797
        // tree.
798
9
        if (other.live == 1) {
799
3
            const int32_t other_only = other.root;
800
3
            ValueRef value = value_of(other, other_only);
801
3
            if (state.live >= state.k &&
802
3
                is_worse(compare_values(value, value_of(state, state.worst)))) {
803
                // A full list rejects a worse value without touching the tree.
804
0
                return;
805
0
            }
806
3
            int32_t inserted = State::NO_SLOT;
807
3
            state.root = add_or_increment(state, state.root, value, other.slots[other_only].count,
808
3
                                          &inserted);
809
3
            if (inserted == State::NO_SLOT) {
810
1
                return;
811
1
            }
812
2
            if (state.live <= state.k) {
813
                // There was room: the new entry competes with the cached worst for the eviction
814
                // candidate role, exactly like the add path.
815
2
                if (state.worst == State::NO_SLOT ||
816
2
                    is_worse(compare_slots(state, inserted, state.worst))) {
817
2
                    state.worst = inserted;
818
2
                }
819
2
                return;
820
2
            }
821
            // The list was full, so the new entry is one over capacity. It beat the cached worst
822
            // above, so the old worst is still the last entry and leaves the list.
823
0
            int32_t removed = State::NO_SLOT;
824
0
            state.root = erase_worst(state, state.root, &removed);
825
0
            DCHECK_EQ(removed, state.worst);
826
0
            evict_value(state, removed);
827
0
            state.slots[removed].count = State::DEAD_COUNT;
828
0
            --state.live;
829
0
            ++state.dead;
830
0
            refresh_worst(state);
831
0
            maybe_compact(state);
832
0
            return;
833
2
        }
834
6
        if (state.live >= state.k) {
835
            // A full state already holds the k best values. If every value of the other state is
836
            // worse than the worst one retained here, the merge cannot change the result, so skip
837
            // the collect/rebuild.
838
3
            const int32_t other_best = best_slot(other);
839
3
            int cmp = compare_values(value_of(other, other_best), value_of(state, state.worst));
840
3
            if (is_worse(cmp)) {
841
0
                return;
842
0
            }
843
3
            if (cmp == 0) {
844
                // The other state's best value is the worst retained one. Its remaining values are
845
                // distinct and worse, so they cannot enter either: only that count changes, and
846
                // the tree stays as it is.
847
0
                state.slots[state.worst].count =
848
0
                        checked_add(state.slots[state.worst].count, other.slots[other_best].count);
849
0
                return;
850
0
            }
851
3
        }
852
6
        DorisVector<int32_t> lhs_slots;
853
6
        DorisVector<int32_t> rhs_slots;
854
6
        collect_in_order(state, lhs_slots);
855
6
        collect_in_order(other, rhs_slots);
856
6
        DorisVector<Entry> merged;
857
6
        merge_sorted_slots(state, lhs_slots, other, rhs_slots, static_cast<size_t>(state.k),
858
6
                           merged);
859
6
        check_slot_capacity(merged.size());
860
6
        assign_sorted(state, std::move(merged));
861
6
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_20EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_30EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_35EEERKS4_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_10EEERKS4_
Line
Count
Source
788
11
    static void merge_values(State& state, const State& other) {
789
11
        if (other.live == 0) {
790
            // The other partial state saw no non-NULL row.
791
2
            return;
792
2
        }
793
        // `_state`/`_merge`/`_union` merges one serialized singleton per row, so a single-entry
794
        // RHS is exactly one add, whether or not the list is full: a retained value (including an
795
        // interior one) only bumps its count, and a new one is inserted, evicting the worst only
796
        // when the list was already full. Neither copies the retained values nor rebuilds the
797
        // tree.
798
9
        if (other.live == 1) {
799
3
            const int32_t other_only = other.root;
800
3
            ValueRef value = value_of(other, other_only);
801
3
            if (state.live >= state.k &&
802
3
                is_worse(compare_values(value, value_of(state, state.worst)))) {
803
                // A full list rejects a worse value without touching the tree.
804
0
                return;
805
0
            }
806
3
            int32_t inserted = State::NO_SLOT;
807
3
            state.root = add_or_increment(state, state.root, value, other.slots[other_only].count,
808
3
                                          &inserted);
809
3
            if (inserted == State::NO_SLOT) {
810
1
                return;
811
1
            }
812
2
            if (state.live <= state.k) {
813
                // There was room: the new entry competes with the cached worst for the eviction
814
                // candidate role, exactly like the add path.
815
2
                if (state.worst == State::NO_SLOT ||
816
2
                    is_worse(compare_slots(state, inserted, state.worst))) {
817
2
                    state.worst = inserted;
818
2
                }
819
2
                return;
820
2
            }
821
            // The list was full, so the new entry is one over capacity. It beat the cached worst
822
            // above, so the old worst is still the last entry and leaves the list.
823
0
            int32_t removed = State::NO_SLOT;
824
0
            state.root = erase_worst(state, state.root, &removed);
825
0
            DCHECK_EQ(removed, state.worst);
826
0
            evict_value(state, removed);
827
0
            state.slots[removed].count = State::DEAD_COUNT;
828
0
            --state.live;
829
0
            ++state.dead;
830
0
            refresh_worst(state);
831
0
            maybe_compact(state);
832
0
            return;
833
2
        }
834
6
        if (state.live >= state.k) {
835
            // A full state already holds the k best values. If every value of the other state is
836
            // worse than the worst one retained here, the merge cannot change the result, so skip
837
            // the collect/rebuild.
838
3
            const int32_t other_best = best_slot(other);
839
3
            int cmp = compare_values(value_of(other, other_best), value_of(state, state.worst));
840
3
            if (is_worse(cmp)) {
841
0
                return;
842
0
            }
843
3
            if (cmp == 0) {
844
                // The other state's best value is the worst retained one. Its remaining values are
845
                // distinct and worse, so they cannot enter either: only that count changes, and
846
                // the tree stays as it is.
847
1
                state.slots[state.worst].count =
848
1
                        checked_add(state.slots[state.worst].count, other.slots[other_best].count);
849
1
                return;
850
1
            }
851
3
        }
852
5
        DorisVector<int32_t> lhs_slots;
853
5
        DorisVector<int32_t> rhs_slots;
854
5
        collect_in_order(state, lhs_slots);
855
5
        collect_in_order(other, rhs_slots);
856
5
        DorisVector<Entry> merged;
857
5
        merge_sorted_slots(state, lhs_slots, other, rhs_slots, static_cast<size_t>(state.k),
858
5
                           merged);
859
5
        check_slot_capacity(merged.size());
860
5
        assign_sorted(state, std::move(merged));
861
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_11EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_12EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_25EEERKS4_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_26EEERKS4_
Line
Count
Source
788
9
    static void merge_values(State& state, const State& other) {
789
9
        if (other.live == 0) {
790
            // The other partial state saw no non-NULL row.
791
4
            return;
792
4
        }
793
        // `_state`/`_merge`/`_union` merges one serialized singleton per row, so a single-entry
794
        // RHS is exactly one add, whether or not the list is full: a retained value (including an
795
        // interior one) only bumps its count, and a new one is inserted, evicting the worst only
796
        // when the list was already full. Neither copies the retained values nor rebuilds the
797
        // tree.
798
5
        if (other.live == 1) {
799
1
            const int32_t other_only = other.root;
800
1
            ValueRef value = value_of(other, other_only);
801
1
            if (state.live >= state.k &&
802
1
                is_worse(compare_values(value, value_of(state, state.worst)))) {
803
                // A full list rejects a worse value without touching the tree.
804
0
                return;
805
0
            }
806
1
            int32_t inserted = State::NO_SLOT;
807
1
            state.root = add_or_increment(state, state.root, value, other.slots[other_only].count,
808
1
                                          &inserted);
809
1
            if (inserted == State::NO_SLOT) {
810
0
                return;
811
0
            }
812
1
            if (state.live <= state.k) {
813
                // There was room: the new entry competes with the cached worst for the eviction
814
                // candidate role, exactly like the add path.
815
1
                if (state.worst == State::NO_SLOT ||
816
1
                    is_worse(compare_slots(state, inserted, state.worst))) {
817
1
                    state.worst = inserted;
818
1
                }
819
1
                return;
820
1
            }
821
            // The list was full, so the new entry is one over capacity. It beat the cached worst
822
            // above, so the old worst is still the last entry and leaves the list.
823
0
            int32_t removed = State::NO_SLOT;
824
0
            state.root = erase_worst(state, state.root, &removed);
825
0
            DCHECK_EQ(removed, state.worst);
826
0
            evict_value(state, removed);
827
0
            state.slots[removed].count = State::DEAD_COUNT;
828
0
            --state.live;
829
0
            ++state.dead;
830
0
            refresh_worst(state);
831
0
            maybe_compact(state);
832
0
            return;
833
1
        }
834
4
        if (state.live >= state.k) {
835
            // A full state already holds the k best values. If every value of the other state is
836
            // worse than the worst one retained here, the merge cannot change the result, so skip
837
            // the collect/rebuild.
838
2
            const int32_t other_best = best_slot(other);
839
2
            int cmp = compare_values(value_of(other, other_best), value_of(state, state.worst));
840
2
            if (is_worse(cmp)) {
841
0
                return;
842
0
            }
843
2
            if (cmp == 0) {
844
                // The other state's best value is the worst retained one. Its remaining values are
845
                // distinct and worse, so they cannot enter either: only that count changes, and
846
                // the tree stays as it is.
847
0
                state.slots[state.worst].count =
848
0
                        checked_add(state.slots[state.worst].count, other.slots[other_best].count);
849
0
                return;
850
0
            }
851
2
        }
852
4
        DorisVector<int32_t> lhs_slots;
853
4
        DorisVector<int32_t> rhs_slots;
854
4
        collect_in_order(state, lhs_slots);
855
4
        collect_in_order(other, rhs_slots);
856
4
        DorisVector<Entry> merged;
857
4
        merge_sorted_slots(state, lhs_slots, other, rhs_slots, static_cast<size_t>(state.k),
858
4
                           merged);
859
4
        check_slot_capacity(merged.size());
860
4
        assign_sorted(state, std::move(merged));
861
4
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_27EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_43EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_42EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_36EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_37EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_44EEERKS4_
862
863
    /// Merges two best-first slot lists into at most `limit` entries in the aggregate's order,
864
    /// summing the counts of equal values. Both inputs hold distinct values, so a value appears at
865
    /// most twice.
866
    static void merge_sorted_slots(const State& state, const DorisVector<int32_t>& lhs_slots,
867
                                   const State& other, const DorisVector<int32_t>& rhs_slots,
868
79
                                   size_t limit, DorisVector<Entry>& merged) {
869
79
        merged.reserve(std::min(limit, lhs_slots.size() + rhs_slots.size()));
870
79
        size_t lhs_index = 0;
871
79
        size_t rhs_index = 0;
872
299
        while (merged.size() < limit &&
873
299
               (lhs_index < lhs_slots.size() || rhs_index < rhs_slots.size())) {
874
220
            if (rhs_index == rhs_slots.size()) {
875
4
                merged.push_back(Entry {value_of(state, lhs_slots[lhs_index]),
876
4
                                        state.slots[lhs_slots[lhs_index]].count});
877
4
                ++lhs_index;
878
216
            } else if (lhs_index == lhs_slots.size()) {
879
98
                merged.push_back(Entry {value_of(other, rhs_slots[rhs_index]),
880
98
                                        other.slots[rhs_slots[rhs_index]].count});
881
98
                ++rhs_index;
882
118
            } else {
883
118
                ValueRef lhs_value = value_of(state, lhs_slots[lhs_index]);
884
118
                ValueRef rhs_value = value_of(other, rhs_slots[rhs_index]);
885
118
                int cmp = compare_values(lhs_value, rhs_value);
886
                // Both lists are ordered best-first (ascending for MIN, descending for MAX).
887
118
                const bool lhs_is_better = comes_before(cmp);
888
118
                if (lhs_is_better) {
889
50
                    merged.push_back(Entry {lhs_value, state.slots[lhs_slots[lhs_index]].count});
890
50
                    ++lhs_index;
891
68
                } else if (cmp != 0) {
892
                    // Not better and not equal: the right-hand value is better.
893
53
                    merged.push_back(Entry {rhs_value, other.slots[rhs_slots[rhs_index]].count});
894
53
                    ++rhs_index;
895
53
                } else {
896
15
                    merged.push_back(Entry {lhs_value,
897
15
                                            checked_add(state.slots[lhs_slots[lhs_index]].count,
898
15
                                                        other.slots[rhs_slots[rhs_index]].count)});
899
15
                    ++lhs_index;
900
15
                    ++rhs_index;
901
15
                }
902
118
            }
903
220
        }
904
79
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_2EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_3EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_4EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_5EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Line
Count
Source
868
26
                                   size_t limit, DorisVector<Entry>& merged) {
869
26
        merged.reserve(std::min(limit, lhs_slots.size() + rhs_slots.size()));
870
26
        size_t lhs_index = 0;
871
26
        size_t rhs_index = 0;
872
108
        while (merged.size() < limit &&
873
108
               (lhs_index < lhs_slots.size() || rhs_index < rhs_slots.size())) {
874
82
            if (rhs_index == rhs_slots.size()) {
875
2
                merged.push_back(Entry {value_of(state, lhs_slots[lhs_index]),
876
2
                                        state.slots[lhs_slots[lhs_index]].count});
877
2
                ++lhs_index;
878
80
            } else if (lhs_index == lhs_slots.size()) {
879
34
                merged.push_back(Entry {value_of(other, rhs_slots[rhs_index]),
880
34
                                        other.slots[rhs_slots[rhs_index]].count});
881
34
                ++rhs_index;
882
46
            } else {
883
46
                ValueRef lhs_value = value_of(state, lhs_slots[lhs_index]);
884
46
                ValueRef rhs_value = value_of(other, rhs_slots[rhs_index]);
885
46
                int cmp = compare_values(lhs_value, rhs_value);
886
                // Both lists are ordered best-first (ascending for MIN, descending for MAX).
887
46
                const bool lhs_is_better = comes_before(cmp);
888
46
                if (lhs_is_better) {
889
20
                    merged.push_back(Entry {lhs_value, state.slots[lhs_slots[lhs_index]].count});
890
20
                    ++lhs_index;
891
26
                } else if (cmp != 0) {
892
                    // Not better and not equal: the right-hand value is better.
893
21
                    merged.push_back(Entry {rhs_value, other.slots[rhs_slots[rhs_index]].count});
894
21
                    ++rhs_index;
895
21
                } else {
896
5
                    merged.push_back(Entry {lhs_value,
897
5
                                            checked_add(state.slots[lhs_slots[lhs_index]].count,
898
5
                                                        other.slots[rhs_slots[rhs_index]].count)});
899
5
                    ++lhs_index;
900
5
                    ++rhs_index;
901
5
                }
902
46
            }
903
82
        }
904
26
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_6EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_7EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_8EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_9EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Line
Count
Source
868
2
                                   size_t limit, DorisVector<Entry>& merged) {
869
2
        merged.reserve(std::min(limit, lhs_slots.size() + rhs_slots.size()));
870
2
        size_t lhs_index = 0;
871
2
        size_t rhs_index = 0;
872
7
        while (merged.size() < limit &&
873
7
               (lhs_index < lhs_slots.size() || rhs_index < rhs_slots.size())) {
874
5
            if (rhs_index == rhs_slots.size()) {
875
0
                merged.push_back(Entry {value_of(state, lhs_slots[lhs_index]),
876
0
                                        state.slots[lhs_slots[lhs_index]].count});
877
0
                ++lhs_index;
878
5
            } else if (lhs_index == lhs_slots.size()) {
879
2
                merged.push_back(Entry {value_of(other, rhs_slots[rhs_index]),
880
2
                                        other.slots[rhs_slots[rhs_index]].count});
881
2
                ++rhs_index;
882
3
            } else {
883
3
                ValueRef lhs_value = value_of(state, lhs_slots[lhs_index]);
884
3
                ValueRef rhs_value = value_of(other, rhs_slots[rhs_index]);
885
3
                int cmp = compare_values(lhs_value, rhs_value);
886
                // Both lists are ordered best-first (ascending for MIN, descending for MAX).
887
3
                const bool lhs_is_better = comes_before(cmp);
888
3
                if (lhs_is_better) {
889
0
                    merged.push_back(Entry {lhs_value, state.slots[lhs_slots[lhs_index]].count});
890
0
                    ++lhs_index;
891
3
                } else if (cmp != 0) {
892
                    // Not better and not equal: the right-hand value is better.
893
1
                    merged.push_back(Entry {rhs_value, other.slots[rhs_slots[rhs_index]].count});
894
1
                    ++rhs_index;
895
2
                } else {
896
2
                    merged.push_back(Entry {lhs_value,
897
2
                                            checked_add(state.slots[lhs_slots[lhs_index]].count,
898
2
                                                        other.slots[rhs_slots[rhs_index]].count)});
899
2
                    ++lhs_index;
900
2
                    ++rhs_index;
901
2
                }
902
3
            }
903
5
        }
904
2
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_28EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_29EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Line
Count
Source
868
6
                                   size_t limit, DorisVector<Entry>& merged) {
869
6
        merged.reserve(std::min(limit, lhs_slots.size() + rhs_slots.size()));
870
6
        size_t lhs_index = 0;
871
6
        size_t rhs_index = 0;
872
18
        while (merged.size() < limit &&
873
18
               (lhs_index < lhs_slots.size() || rhs_index < rhs_slots.size())) {
874
12
            if (rhs_index == rhs_slots.size()) {
875
0
                merged.push_back(Entry {value_of(state, lhs_slots[lhs_index]),
876
0
                                        state.slots[lhs_slots[lhs_index]].count});
877
0
                ++lhs_index;
878
12
            } else if (lhs_index == lhs_slots.size()) {
879
6
                merged.push_back(Entry {value_of(other, rhs_slots[rhs_index]),
880
6
                                        other.slots[rhs_slots[rhs_index]].count});
881
6
                ++rhs_index;
882
6
            } else {
883
6
                ValueRef lhs_value = value_of(state, lhs_slots[lhs_index]);
884
6
                ValueRef rhs_value = value_of(other, rhs_slots[rhs_index]);
885
6
                int cmp = compare_values(lhs_value, rhs_value);
886
                // Both lists are ordered best-first (ascending for MIN, descending for MAX).
887
6
                const bool lhs_is_better = comes_before(cmp);
888
6
                if (lhs_is_better) {
889
3
                    merged.push_back(Entry {lhs_value, state.slots[lhs_slots[lhs_index]].count});
890
3
                    ++lhs_index;
891
3
                } else if (cmp != 0) {
892
                    // Not better and not equal: the right-hand value is better.
893
2
                    merged.push_back(Entry {rhs_value, other.slots[rhs_slots[rhs_index]].count});
894
2
                    ++rhs_index;
895
2
                } else {
896
1
                    merged.push_back(Entry {lhs_value,
897
1
                                            checked_add(state.slots[lhs_slots[lhs_index]].count,
898
1
                                                        other.slots[rhs_slots[rhs_index]].count)});
899
1
                    ++lhs_index;
900
1
                    ++rhs_index;
901
1
                }
902
6
            }
903
12
        }
904
6
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_20EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_30EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_35EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_10EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Line
Count
Source
868
6
                                   size_t limit, DorisVector<Entry>& merged) {
869
6
        merged.reserve(std::min(limit, lhs_slots.size() + rhs_slots.size()));
870
6
        size_t lhs_index = 0;
871
6
        size_t rhs_index = 0;
872
18
        while (merged.size() < limit &&
873
18
               (lhs_index < lhs_slots.size() || rhs_index < rhs_slots.size())) {
874
12
            if (rhs_index == rhs_slots.size()) {
875
0
                merged.push_back(Entry {value_of(state, lhs_slots[lhs_index]),
876
0
                                        state.slots[lhs_slots[lhs_index]].count});
877
0
                ++lhs_index;
878
12
            } else if (lhs_index == lhs_slots.size()) {
879
6
                merged.push_back(Entry {value_of(other, rhs_slots[rhs_index]),
880
6
                                        other.slots[rhs_slots[rhs_index]].count});
881
6
                ++rhs_index;
882
6
            } else {
883
6
                ValueRef lhs_value = value_of(state, lhs_slots[lhs_index]);
884
6
                ValueRef rhs_value = value_of(other, rhs_slots[rhs_index]);
885
6
                int cmp = compare_values(lhs_value, rhs_value);
886
                // Both lists are ordered best-first (ascending for MIN, descending for MAX).
887
6
                const bool lhs_is_better = comes_before(cmp);
888
6
                if (lhs_is_better) {
889
2
                    merged.push_back(Entry {lhs_value, state.slots[lhs_slots[lhs_index]].count});
890
2
                    ++lhs_index;
891
4
                } else if (cmp != 0) {
892
                    // Not better and not equal: the right-hand value is better.
893
4
                    merged.push_back(Entry {rhs_value, other.slots[rhs_slots[rhs_index]].count});
894
4
                    ++rhs_index;
895
4
                } else {
896
0
                    merged.push_back(Entry {lhs_value,
897
0
                                            checked_add(state.slots[lhs_slots[lhs_index]].count,
898
0
                                                        other.slots[rhs_slots[rhs_index]].count)});
899
0
                    ++lhs_index;
900
0
                    ++rhs_index;
901
0
                }
902
6
            }
903
12
        }
904
6
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_11EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_12EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_25EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_26EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Line
Count
Source
868
4
                                   size_t limit, DorisVector<Entry>& merged) {
869
4
        merged.reserve(std::min(limit, lhs_slots.size() + rhs_slots.size()));
870
4
        size_t lhs_index = 0;
871
4
        size_t rhs_index = 0;
872
12
        while (merged.size() < limit &&
873
12
               (lhs_index < lhs_slots.size() || rhs_index < rhs_slots.size())) {
874
8
            if (rhs_index == rhs_slots.size()) {
875
0
                merged.push_back(Entry {value_of(state, lhs_slots[lhs_index]),
876
0
                                        state.slots[lhs_slots[lhs_index]].count});
877
0
                ++lhs_index;
878
8
            } else if (lhs_index == lhs_slots.size()) {
879
4
                merged.push_back(Entry {value_of(other, rhs_slots[rhs_index]),
880
4
                                        other.slots[rhs_slots[rhs_index]].count});
881
4
                ++rhs_index;
882
4
            } else {
883
4
                ValueRef lhs_value = value_of(state, lhs_slots[lhs_index]);
884
4
                ValueRef rhs_value = value_of(other, rhs_slots[rhs_index]);
885
4
                int cmp = compare_values(lhs_value, rhs_value);
886
                // Both lists are ordered best-first (ascending for MIN, descending for MAX).
887
4
                const bool lhs_is_better = comes_before(cmp);
888
4
                if (lhs_is_better) {
889
1
                    merged.push_back(Entry {lhs_value, state.slots[lhs_slots[lhs_index]].count});
890
1
                    ++lhs_index;
891
3
                } else if (cmp != 0) {
892
                    // Not better and not equal: the right-hand value is better.
893
3
                    merged.push_back(Entry {rhs_value, other.slots[rhs_slots[rhs_index]].count});
894
3
                    ++rhs_index;
895
3
                } else {
896
0
                    merged.push_back(Entry {lhs_value,
897
0
                                            checked_add(state.slots[lhs_slots[lhs_index]].count,
898
0
                                                        other.slots[rhs_slots[rhs_index]].count)});
899
0
                    ++lhs_index;
900
0
                    ++rhs_index;
901
0
                }
902
4
            }
903
8
        }
904
4
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_27EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_43EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_42EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_36EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_37EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_44EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_2EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_3EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_4EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_5EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Line
Count
Source
868
18
                                   size_t limit, DorisVector<Entry>& merged) {
869
18
        merged.reserve(std::min(limit, lhs_slots.size() + rhs_slots.size()));
870
18
        size_t lhs_index = 0;
871
18
        size_t rhs_index = 0;
872
84
        while (merged.size() < limit &&
873
84
               (lhs_index < lhs_slots.size() || rhs_index < rhs_slots.size())) {
874
66
            if (rhs_index == rhs_slots.size()) {
875
2
                merged.push_back(Entry {value_of(state, lhs_slots[lhs_index]),
876
2
                                        state.slots[lhs_slots[lhs_index]].count});
877
2
                ++lhs_index;
878
64
            } else if (lhs_index == lhs_slots.size()) {
879
28
                merged.push_back(Entry {value_of(other, rhs_slots[rhs_index]),
880
28
                                        other.slots[rhs_slots[rhs_index]].count});
881
28
                ++rhs_index;
882
36
            } else {
883
36
                ValueRef lhs_value = value_of(state, lhs_slots[lhs_index]);
884
36
                ValueRef rhs_value = value_of(other, rhs_slots[rhs_index]);
885
36
                int cmp = compare_values(lhs_value, rhs_value);
886
                // Both lists are ordered best-first (ascending for MIN, descending for MAX).
887
36
                const bool lhs_is_better = comes_before(cmp);
888
36
                if (lhs_is_better) {
889
17
                    merged.push_back(Entry {lhs_value, state.slots[lhs_slots[lhs_index]].count});
890
17
                    ++lhs_index;
891
19
                } else if (cmp != 0) {
892
                    // Not better and not equal: the right-hand value is better.
893
16
                    merged.push_back(Entry {rhs_value, other.slots[rhs_slots[rhs_index]].count});
894
16
                    ++rhs_index;
895
16
                } else {
896
3
                    merged.push_back(Entry {lhs_value,
897
3
                                            checked_add(state.slots[lhs_slots[lhs_index]].count,
898
3
                                                        other.slots[rhs_slots[rhs_index]].count)});
899
3
                    ++lhs_index;
900
3
                    ++rhs_index;
901
3
                }
902
36
            }
903
66
        }
904
18
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_6EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_7EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_8EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_9EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Line
Count
Source
868
2
                                   size_t limit, DorisVector<Entry>& merged) {
869
2
        merged.reserve(std::min(limit, lhs_slots.size() + rhs_slots.size()));
870
2
        size_t lhs_index = 0;
871
2
        size_t rhs_index = 0;
872
7
        while (merged.size() < limit &&
873
7
               (lhs_index < lhs_slots.size() || rhs_index < rhs_slots.size())) {
874
5
            if (rhs_index == rhs_slots.size()) {
875
0
                merged.push_back(Entry {value_of(state, lhs_slots[lhs_index]),
876
0
                                        state.slots[lhs_slots[lhs_index]].count});
877
0
                ++lhs_index;
878
5
            } else if (lhs_index == lhs_slots.size()) {
879
2
                merged.push_back(Entry {value_of(other, rhs_slots[rhs_index]),
880
2
                                        other.slots[rhs_slots[rhs_index]].count});
881
2
                ++rhs_index;
882
3
            } else {
883
3
                ValueRef lhs_value = value_of(state, lhs_slots[lhs_index]);
884
3
                ValueRef rhs_value = value_of(other, rhs_slots[rhs_index]);
885
3
                int cmp = compare_values(lhs_value, rhs_value);
886
                // Both lists are ordered best-first (ascending for MIN, descending for MAX).
887
3
                const bool lhs_is_better = comes_before(cmp);
888
3
                if (lhs_is_better) {
889
0
                    merged.push_back(Entry {lhs_value, state.slots[lhs_slots[lhs_index]].count});
890
0
                    ++lhs_index;
891
3
                } else if (cmp != 0) {
892
                    // Not better and not equal: the right-hand value is better.
893
1
                    merged.push_back(Entry {rhs_value, other.slots[rhs_slots[rhs_index]].count});
894
1
                    ++rhs_index;
895
2
                } else {
896
2
                    merged.push_back(Entry {lhs_value,
897
2
                                            checked_add(state.slots[lhs_slots[lhs_index]].count,
898
2
                                                        other.slots[rhs_slots[rhs_index]].count)});
899
2
                    ++lhs_index;
900
2
                    ++rhs_index;
901
2
                }
902
3
            }
903
5
        }
904
2
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_28EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_29EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Line
Count
Source
868
6
                                   size_t limit, DorisVector<Entry>& merged) {
869
6
        merged.reserve(std::min(limit, lhs_slots.size() + rhs_slots.size()));
870
6
        size_t lhs_index = 0;
871
6
        size_t rhs_index = 0;
872
18
        while (merged.size() < limit &&
873
18
               (lhs_index < lhs_slots.size() || rhs_index < rhs_slots.size())) {
874
12
            if (rhs_index == rhs_slots.size()) {
875
0
                merged.push_back(Entry {value_of(state, lhs_slots[lhs_index]),
876
0
                                        state.slots[lhs_slots[lhs_index]].count});
877
0
                ++lhs_index;
878
12
            } else if (lhs_index == lhs_slots.size()) {
879
6
                merged.push_back(Entry {value_of(other, rhs_slots[rhs_index]),
880
6
                                        other.slots[rhs_slots[rhs_index]].count});
881
6
                ++rhs_index;
882
6
            } else {
883
6
                ValueRef lhs_value = value_of(state, lhs_slots[lhs_index]);
884
6
                ValueRef rhs_value = value_of(other, rhs_slots[rhs_index]);
885
6
                int cmp = compare_values(lhs_value, rhs_value);
886
                // Both lists are ordered best-first (ascending for MIN, descending for MAX).
887
6
                const bool lhs_is_better = comes_before(cmp);
888
6
                if (lhs_is_better) {
889
3
                    merged.push_back(Entry {lhs_value, state.slots[lhs_slots[lhs_index]].count});
890
3
                    ++lhs_index;
891
3
                } else if (cmp != 0) {
892
                    // Not better and not equal: the right-hand value is better.
893
2
                    merged.push_back(Entry {rhs_value, other.slots[rhs_slots[rhs_index]].count});
894
2
                    ++rhs_index;
895
2
                } else {
896
1
                    merged.push_back(Entry {lhs_value,
897
1
                                            checked_add(state.slots[lhs_slots[lhs_index]].count,
898
1
                                                        other.slots[rhs_slots[rhs_index]].count)});
899
1
                    ++lhs_index;
900
1
                    ++rhs_index;
901
1
                }
902
6
            }
903
12
        }
904
6
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_20EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_30EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_35EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_10EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Line
Count
Source
868
5
                                   size_t limit, DorisVector<Entry>& merged) {
869
5
        merged.reserve(std::min(limit, lhs_slots.size() + rhs_slots.size()));
870
5
        size_t lhs_index = 0;
871
5
        size_t rhs_index = 0;
872
15
        while (merged.size() < limit &&
873
15
               (lhs_index < lhs_slots.size() || rhs_index < rhs_slots.size())) {
874
10
            if (rhs_index == rhs_slots.size()) {
875
0
                merged.push_back(Entry {value_of(state, lhs_slots[lhs_index]),
876
0
                                        state.slots[lhs_slots[lhs_index]].count});
877
0
                ++lhs_index;
878
10
            } else if (lhs_index == lhs_slots.size()) {
879
6
                merged.push_back(Entry {value_of(other, rhs_slots[rhs_index]),
880
6
                                        other.slots[rhs_slots[rhs_index]].count});
881
6
                ++rhs_index;
882
6
            } else {
883
4
                ValueRef lhs_value = value_of(state, lhs_slots[lhs_index]);
884
4
                ValueRef rhs_value = value_of(other, rhs_slots[rhs_index]);
885
4
                int cmp = compare_values(lhs_value, rhs_value);
886
                // Both lists are ordered best-first (ascending for MIN, descending for MAX).
887
4
                const bool lhs_is_better = comes_before(cmp);
888
4
                if (lhs_is_better) {
889
2
                    merged.push_back(Entry {lhs_value, state.slots[lhs_slots[lhs_index]].count});
890
2
                    ++lhs_index;
891
2
                } else if (cmp != 0) {
892
                    // Not better and not equal: the right-hand value is better.
893
2
                    merged.push_back(Entry {rhs_value, other.slots[rhs_slots[rhs_index]].count});
894
2
                    ++rhs_index;
895
2
                } else {
896
0
                    merged.push_back(Entry {lhs_value,
897
0
                                            checked_add(state.slots[lhs_slots[lhs_index]].count,
898
0
                                                        other.slots[rhs_slots[rhs_index]].count)});
899
0
                    ++lhs_index;
900
0
                    ++rhs_index;
901
0
                }
902
4
            }
903
10
        }
904
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_11EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_12EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_25EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_26EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Line
Count
Source
868
4
                                   size_t limit, DorisVector<Entry>& merged) {
869
4
        merged.reserve(std::min(limit, lhs_slots.size() + rhs_slots.size()));
870
4
        size_t lhs_index = 0;
871
4
        size_t rhs_index = 0;
872
12
        while (merged.size() < limit &&
873
12
               (lhs_index < lhs_slots.size() || rhs_index < rhs_slots.size())) {
874
8
            if (rhs_index == rhs_slots.size()) {
875
0
                merged.push_back(Entry {value_of(state, lhs_slots[lhs_index]),
876
0
                                        state.slots[lhs_slots[lhs_index]].count});
877
0
                ++lhs_index;
878
8
            } else if (lhs_index == lhs_slots.size()) {
879
4
                merged.push_back(Entry {value_of(other, rhs_slots[rhs_index]),
880
4
                                        other.slots[rhs_slots[rhs_index]].count});
881
4
                ++rhs_index;
882
4
            } else {
883
4
                ValueRef lhs_value = value_of(state, lhs_slots[lhs_index]);
884
4
                ValueRef rhs_value = value_of(other, rhs_slots[rhs_index]);
885
4
                int cmp = compare_values(lhs_value, rhs_value);
886
                // Both lists are ordered best-first (ascending for MIN, descending for MAX).
887
4
                const bool lhs_is_better = comes_before(cmp);
888
4
                if (lhs_is_better) {
889
2
                    merged.push_back(Entry {lhs_value, state.slots[lhs_slots[lhs_index]].count});
890
2
                    ++lhs_index;
891
2
                } else if (cmp != 0) {
892
                    // Not better and not equal: the right-hand value is better.
893
1
                    merged.push_back(Entry {rhs_value, other.slots[rhs_slots[rhs_index]].count});
894
1
                    ++rhs_index;
895
1
                } else {
896
1
                    merged.push_back(Entry {lhs_value,
897
1
                                            checked_add(state.slots[lhs_slots[lhs_index]].count,
898
1
                                                        other.slots[rhs_slots[rhs_index]].count)});
899
1
                    ++lhs_index;
900
1
                    ++rhs_index;
901
1
                }
902
4
            }
903
8
        }
904
4
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_27EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_43EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_42EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_36EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_37EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_44EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
905
906
    /// Writes a length-prefixed column blob. The declared length is
907
    /// get_uncompressed_serialized_bytes(), which is an upper bound: above
908
    /// SERIALIZED_MEM_SIZE_LIMIT the serde may compress the payload and return an earlier end
909
    /// pointer, so the reader skips the same declared length and the unused tail is padding.
910
194
    void write_column(BufferWritable& buf, const IColumn& column) const {
911
194
        const auto value_type = remove_nullable(this->argument_types[0]);
912
194
        int64_t capacity =
913
194
                value_type->get_uncompressed_serialized_bytes(column, IAggregateFunction::version);
914
194
        buf.write_binary(capacity);
915
194
        buf.resize(capacity);
916
194
        auto* pos = value_type->serialize(column, buf.data(), IAggregateFunction::version);
917
194
        DCHECK_LE(pos, buf.data() + capacity);
918
194
        buf.add_offset(capacity);
919
194
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Line
Count
Source
910
76
    void write_column(BufferWritable& buf, const IColumn& column) const {
911
76
        const auto value_type = remove_nullable(this->argument_types[0]);
912
76
        int64_t capacity =
913
76
                value_type->get_uncompressed_serialized_bytes(column, IAggregateFunction::version);
914
76
        buf.write_binary(capacity);
915
76
        buf.resize(capacity);
916
76
        auto* pos = value_type->serialize(column, buf.data(), IAggregateFunction::version);
917
        DCHECK_LE(pos, buf.data() + capacity);
918
76
        buf.add_offset(capacity);
919
76
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Line
Count
Source
910
2
    void write_column(BufferWritable& buf, const IColumn& column) const {
911
2
        const auto value_type = remove_nullable(this->argument_types[0]);
912
2
        int64_t capacity =
913
2
                value_type->get_uncompressed_serialized_bytes(column, IAggregateFunction::version);
914
2
        buf.write_binary(capacity);
915
2
        buf.resize(capacity);
916
2
        auto* pos = value_type->serialize(column, buf.data(), IAggregateFunction::version);
917
        DCHECK_LE(pos, buf.data() + capacity);
918
2
        buf.add_offset(capacity);
919
2
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Line
Count
Source
910
11
    void write_column(BufferWritable& buf, const IColumn& column) const {
911
11
        const auto value_type = remove_nullable(this->argument_types[0]);
912
11
        int64_t capacity =
913
11
                value_type->get_uncompressed_serialized_bytes(column, IAggregateFunction::version);
914
11
        buf.write_binary(capacity);
915
11
        buf.resize(capacity);
916
11
        auto* pos = value_type->serialize(column, buf.data(), IAggregateFunction::version);
917
        DCHECK_LE(pos, buf.data() + capacity);
918
11
        buf.add_offset(capacity);
919
11
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Line
Count
Source
910
12
    void write_column(BufferWritable& buf, const IColumn& column) const {
911
12
        const auto value_type = remove_nullable(this->argument_types[0]);
912
12
        int64_t capacity =
913
12
                value_type->get_uncompressed_serialized_bytes(column, IAggregateFunction::version);
914
12
        buf.write_binary(capacity);
915
12
        buf.resize(capacity);
916
12
        auto* pos = value_type->serialize(column, buf.data(), IAggregateFunction::version);
917
        DCHECK_LE(pos, buf.data() + capacity);
918
12
        buf.add_offset(capacity);
919
12
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Line
Count
Source
910
9
    void write_column(BufferWritable& buf, const IColumn& column) const {
911
9
        const auto value_type = remove_nullable(this->argument_types[0]);
912
9
        int64_t capacity =
913
9
                value_type->get_uncompressed_serialized_bytes(column, IAggregateFunction::version);
914
9
        buf.write_binary(capacity);
915
9
        buf.resize(capacity);
916
9
        auto* pos = value_type->serialize(column, buf.data(), IAggregateFunction::version);
917
        DCHECK_LE(pos, buf.data() + capacity);
918
9
        buf.add_offset(capacity);
919
9
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Line
Count
Source
910
51
    void write_column(BufferWritable& buf, const IColumn& column) const {
911
51
        const auto value_type = remove_nullable(this->argument_types[0]);
912
51
        int64_t capacity =
913
51
                value_type->get_uncompressed_serialized_bytes(column, IAggregateFunction::version);
914
51
        buf.write_binary(capacity);
915
51
        buf.resize(capacity);
916
51
        auto* pos = value_type->serialize(column, buf.data(), IAggregateFunction::version);
917
        DCHECK_LE(pos, buf.data() + capacity);
918
51
        buf.add_offset(capacity);
919
51
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Line
Count
Source
910
2
    void write_column(BufferWritable& buf, const IColumn& column) const {
911
2
        const auto value_type = remove_nullable(this->argument_types[0]);
912
2
        int64_t capacity =
913
2
                value_type->get_uncompressed_serialized_bytes(column, IAggregateFunction::version);
914
2
        buf.write_binary(capacity);
915
2
        buf.resize(capacity);
916
2
        auto* pos = value_type->serialize(column, buf.data(), IAggregateFunction::version);
917
        DCHECK_LE(pos, buf.data() + capacity);
918
2
        buf.add_offset(capacity);
919
2
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Line
Count
Source
910
11
    void write_column(BufferWritable& buf, const IColumn& column) const {
911
11
        const auto value_type = remove_nullable(this->argument_types[0]);
912
11
        int64_t capacity =
913
11
                value_type->get_uncompressed_serialized_bytes(column, IAggregateFunction::version);
914
11
        buf.write_binary(capacity);
915
11
        buf.resize(capacity);
916
11
        auto* pos = value_type->serialize(column, buf.data(), IAggregateFunction::version);
917
        DCHECK_LE(pos, buf.data() + capacity);
918
11
        buf.add_offset(capacity);
919
11
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Line
Count
Source
910
11
    void write_column(BufferWritable& buf, const IColumn& column) const {
911
11
        const auto value_type = remove_nullable(this->argument_types[0]);
912
11
        int64_t capacity =
913
11
                value_type->get_uncompressed_serialized_bytes(column, IAggregateFunction::version);
914
11
        buf.write_binary(capacity);
915
11
        buf.resize(capacity);
916
11
        auto* pos = value_type->serialize(column, buf.data(), IAggregateFunction::version);
917
        DCHECK_LE(pos, buf.data() + capacity);
918
11
        buf.add_offset(capacity);
919
11
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Line
Count
Source
910
9
    void write_column(BufferWritable& buf, const IColumn& column) const {
911
9
        const auto value_type = remove_nullable(this->argument_types[0]);
912
9
        int64_t capacity =
913
9
                value_type->get_uncompressed_serialized_bytes(column, IAggregateFunction::version);
914
9
        buf.write_binary(capacity);
915
9
        buf.resize(capacity);
916
9
        auto* pos = value_type->serialize(column, buf.data(), IAggregateFunction::version);
917
        DCHECK_LE(pos, buf.data() + capacity);
918
9
        buf.add_offset(capacity);
919
9
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
920
921
197
    MutableColumnPtr read_column(BufferReadable& buf) const {
922
197
        const auto value_type = remove_nullable(this->argument_types[0]);
923
197
        int64_t capacity = 0;
924
197
        buf.read_binary(capacity);
925
197
        MutableColumnPtr column = value_type->create_column();
926
197
        const auto* pos = value_type->deserialize(buf.data(), &column, IAggregateFunction::version);
927
        DCHECK_LE(pos, buf.data() + capacity);
928
197
        buf.add_offset(capacity);
929
197
        return column;
930
197
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE11read_columnERNS_14BufferReadableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE11read_columnERNS_14BufferReadableE
Line
Count
Source
921
78
    MutableColumnPtr read_column(BufferReadable& buf) const {
922
78
        const auto value_type = remove_nullable(this->argument_types[0]);
923
78
        int64_t capacity = 0;
924
78
        buf.read_binary(capacity);
925
78
        MutableColumnPtr column = value_type->create_column();
926
78
        const auto* pos = value_type->deserialize(buf.data(), &column, IAggregateFunction::version);
927
        DCHECK_LE(pos, buf.data() + capacity);
928
78
        buf.add_offset(capacity);
929
78
        return column;
930
78
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE11read_columnERNS_14BufferReadableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE11read_columnERNS_14BufferReadableE
Line
Count
Source
921
2
    MutableColumnPtr read_column(BufferReadable& buf) const {
922
2
        const auto value_type = remove_nullable(this->argument_types[0]);
923
2
        int64_t capacity = 0;
924
2
        buf.read_binary(capacity);
925
2
        MutableColumnPtr column = value_type->create_column();
926
2
        const auto* pos = value_type->deserialize(buf.data(), &column, IAggregateFunction::version);
927
        DCHECK_LE(pos, buf.data() + capacity);
928
2
        buf.add_offset(capacity);
929
2
        return column;
930
2
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE11read_columnERNS_14BufferReadableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE11read_columnERNS_14BufferReadableE
Line
Count
Source
921
11
    MutableColumnPtr read_column(BufferReadable& buf) const {
922
11
        const auto value_type = remove_nullable(this->argument_types[0]);
923
11
        int64_t capacity = 0;
924
11
        buf.read_binary(capacity);
925
11
        MutableColumnPtr column = value_type->create_column();
926
11
        const auto* pos = value_type->deserialize(buf.data(), &column, IAggregateFunction::version);
927
        DCHECK_LE(pos, buf.data() + capacity);
928
11
        buf.add_offset(capacity);
929
11
        return column;
930
11
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE11read_columnERNS_14BufferReadableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE11read_columnERNS_14BufferReadableE
Line
Count
Source
921
12
    MutableColumnPtr read_column(BufferReadable& buf) const {
922
12
        const auto value_type = remove_nullable(this->argument_types[0]);
923
12
        int64_t capacity = 0;
924
12
        buf.read_binary(capacity);
925
12
        MutableColumnPtr column = value_type->create_column();
926
12
        const auto* pos = value_type->deserialize(buf.data(), &column, IAggregateFunction::version);
927
        DCHECK_LE(pos, buf.data() + capacity);
928
12
        buf.add_offset(capacity);
929
12
        return column;
930
12
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE11read_columnERNS_14BufferReadableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE11read_columnERNS_14BufferReadableE
Line
Count
Source
921
9
    MutableColumnPtr read_column(BufferReadable& buf) const {
922
9
        const auto value_type = remove_nullable(this->argument_types[0]);
923
9
        int64_t capacity = 0;
924
9
        buf.read_binary(capacity);
925
9
        MutableColumnPtr column = value_type->create_column();
926
9
        const auto* pos = value_type->deserialize(buf.data(), &column, IAggregateFunction::version);
927
        DCHECK_LE(pos, buf.data() + capacity);
928
9
        buf.add_offset(capacity);
929
9
        return column;
930
9
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb0EE11read_columnERNS_14BufferReadableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE11read_columnERNS_14BufferReadableE
Line
Count
Source
921
52
    MutableColumnPtr read_column(BufferReadable& buf) const {
922
52
        const auto value_type = remove_nullable(this->argument_types[0]);
923
52
        int64_t capacity = 0;
924
52
        buf.read_binary(capacity);
925
52
        MutableColumnPtr column = value_type->create_column();
926
52
        const auto* pos = value_type->deserialize(buf.data(), &column, IAggregateFunction::version);
927
        DCHECK_LE(pos, buf.data() + capacity);
928
52
        buf.add_offset(capacity);
929
52
        return column;
930
52
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE11read_columnERNS_14BufferReadableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE11read_columnERNS_14BufferReadableE
Line
Count
Source
921
2
    MutableColumnPtr read_column(BufferReadable& buf) const {
922
2
        const auto value_type = remove_nullable(this->argument_types[0]);
923
2
        int64_t capacity = 0;
924
2
        buf.read_binary(capacity);
925
2
        MutableColumnPtr column = value_type->create_column();
926
2
        const auto* pos = value_type->deserialize(buf.data(), &column, IAggregateFunction::version);
927
        DCHECK_LE(pos, buf.data() + capacity);
928
2
        buf.add_offset(capacity);
929
2
        return column;
930
2
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE11read_columnERNS_14BufferReadableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE11read_columnERNS_14BufferReadableE
Line
Count
Source
921
11
    MutableColumnPtr read_column(BufferReadable& buf) const {
922
11
        const auto value_type = remove_nullable(this->argument_types[0]);
923
11
        int64_t capacity = 0;
924
11
        buf.read_binary(capacity);
925
11
        MutableColumnPtr column = value_type->create_column();
926
11
        const auto* pos = value_type->deserialize(buf.data(), &column, IAggregateFunction::version);
927
        DCHECK_LE(pos, buf.data() + capacity);
928
11
        buf.add_offset(capacity);
929
11
        return column;
930
11
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE11read_columnERNS_14BufferReadableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE11read_columnERNS_14BufferReadableE
Line
Count
Source
921
11
    MutableColumnPtr read_column(BufferReadable& buf) const {
922
11
        const auto value_type = remove_nullable(this->argument_types[0]);
923
11
        int64_t capacity = 0;
924
11
        buf.read_binary(capacity);
925
11
        MutableColumnPtr column = value_type->create_column();
926
11
        const auto* pos = value_type->deserialize(buf.data(), &column, IAggregateFunction::version);
927
        DCHECK_LE(pos, buf.data() + capacity);
928
11
        buf.add_offset(capacity);
929
11
        return column;
930
11
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE11read_columnERNS_14BufferReadableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE11read_columnERNS_14BufferReadableE
Line
Count
Source
921
9
    MutableColumnPtr read_column(BufferReadable& buf) const {
922
9
        const auto value_type = remove_nullable(this->argument_types[0]);
923
9
        int64_t capacity = 0;
924
9
        buf.read_binary(capacity);
925
9
        MutableColumnPtr column = value_type->create_column();
926
9
        const auto* pos = value_type->deserialize(buf.data(), &column, IAggregateFunction::version);
927
        DCHECK_LE(pos, buf.data() + capacity);
928
9
        buf.add_offset(capacity);
929
9
        return column;
930
9
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE27ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE43ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE42ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE36ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE37ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE44ELb0EE11read_columnERNS_14BufferReadableE
931
};
932
933
} // namespace doris