Coverage Report

Created: 2026-10-30 22:37

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
60
inline uint32_t next_topk_priority_seed() {
90
60
    static std::atomic<uint32_t> counter {0};
91
60
    static const uint32_t base = [] {
92
1
        std::random_device device;
93
1
        return static_cast<uint32_t>(device());
94
1
    }();
95
60
    uint32_t z = base + counter.fetch_add(1, std::memory_order_relaxed) * 0x9E3779B9U;
96
60
    z = (z ^ (z >> 16)) * 0x21F0AAADU;
97
60
    z = (z ^ (z >> 15)) * 0x735A2D97U;
98
60
    return z ^ (z >> 15);
99
60
}
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
60
    AggregateTopKCountData() = default;
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE2EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE3EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE4EEC2Ev
_ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE5EEC2Ev
Line
Count
Source
173
41
    AggregateTopKCountData() = default;
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE6EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE7EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE8EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE9EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE28EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE29EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE20EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE30EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE35EEC2Ev
_ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE10EEC2Ev
Line
Count
Source
173
19
    AggregateTopKCountData() = default;
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE11EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE12EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE25EEC2Ev
Unexecuted instantiation: _ZN5doris22AggregateTopKCountDataILNS_13PrimitiveTypeE26EEC2Ev
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
39
    explicit AggregateFunctionTopK(const DataTypes& argument_types_) : Base(argument_types_) {
209
39
        DCHECK_EQ(argument_types_.size(), 2);
210
39
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Line
Count
Source
208
16
    explicit AggregateFunctionTopK(const DataTypes& argument_types_) : Base(argument_types_) {
209
        DCHECK_EQ(argument_types_.size(), 2);
210
16
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
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
10
    explicit AggregateFunctionTopK(const DataTypes& argument_types_) : Base(argument_types_) {
209
        DCHECK_EQ(argument_types_.size(), 2);
210
10
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
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
12
    explicit AggregateFunctionTopK(const DataTypes& argument_types_) : Base(argument_types_) {
209
        DCHECK_EQ(argument_types_.size(), 2);
210
12
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
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
1
    explicit AggregateFunctionTopK(const DataTypes& argument_types_) : Base(argument_types_) {
209
        DCHECK_EQ(argument_types_.size(), 2);
210
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
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
44
    DataTypePtr get_return_type() const override {
215
44
        return make_return_type(remove_nullable(this->argument_types[0]));
216
44
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE15get_return_typeEv
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE15get_return_typeEv
Line
Count
Source
214
20
    DataTypePtr get_return_type() const override {
215
20
        return make_return_type(remove_nullable(this->argument_types[0]));
216
20
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE15get_return_typeEv
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
11
    DataTypePtr get_return_type() const override {
215
11
        return make_return_type(remove_nullable(this->argument_types[0]));
216
11
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE15get_return_typeEv
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
12
    DataTypePtr get_return_type() const override {
215
12
        return make_return_type(remove_nullable(this->argument_types[0]));
216
12
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE15get_return_typeEv
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
1
    DataTypePtr get_return_type() const override {
215
1
        return make_return_type(remove_nullable(this->argument_types[0]));
216
1
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE15get_return_typeEv
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE15get_return_typeEv
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.2k
             Arena& arena) const override {
220
20.2k
        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.2k
        check_k(state, *columns[1], row_num);
224
20.2k
        const IColumn* value_column = columns[0];
225
20.2k
        if (const auto* nullable = check_and_get_column<ColumnNullable>(value_column)) {
226
4
            if (nullable->is_null_at(row_num)) {
227
2
                return;
228
2
            }
229
2
            value_column = &nullable->get_nested_column();
230
2
        }
231
20.2k
        add_value(state, *value_column, row_num);
232
20.2k
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE3addEPcPPKNS_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
0
            if (nullable->is_null_at(row_num)) {
227
0
                return;
228
0
            }
229
0
            value_column = &nullable->get_nested_column();
230
0
        }
231
10.1k
        add_value(state, *value_column, row_num);
232
10.1k
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
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
49
             Arena& arena) const override {
220
49
        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
49
        check_k(state, *columns[1], row_num);
224
49
        const IColumn* value_column = columns[0];
225
49
        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
49
        add_value(state, *value_column, row_num);
232
49
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
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.0k
             Arena& arena) const override {
220
10.0k
        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.0k
        check_k(state, *columns[1], row_num);
224
10.0k
        const IColumn* value_column = columns[0];
225
10.0k
        if (const auto* nullable = check_and_get_column<ColumnNullable>(value_column)) {
226
4
            if (nullable->is_null_at(row_num)) {
227
2
                return;
228
2
            }
229
2
            value_column = &nullable->get_nested_column();
230
2
        }
231
10.0k
        add_value(state, *value_column, row_num);
232
10.0k
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
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
4
             Arena& arena) const override {
220
4
        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
4
        check_k(state, *columns[1], row_num);
224
4
        const IColumn* value_column = columns[0];
225
4
        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
4
        add_value(state, *value_column, row_num);
232
4
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE3addEPcPPKNS_7IColumnElRNS_5ArenaE
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
13
               Arena&) const override {
236
13
        auto& state = Base::data(place);
237
13
        const auto& other = Base::data(rhs);
238
        // A partial state without a k never saw any row, so it carries no information.
239
13
        if (other.k == State::NO_K) {
240
0
            return;
241
0
        }
242
13
        if (state.k == State::NO_K) {
243
0
            state.k = other.k;
244
13
        } 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
12
        if (state.k == 0) {
253
0
            merge_extreme(state, other);
254
0
            return;
255
0
        }
256
12
        merge_values(state, other);
257
12
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE5mergeEPcPKcRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE5mergeEPcPKcRNS_5ArenaE
Line
Count
Source
235
4
               Arena&) const override {
236
4
        auto& state = Base::data(place);
237
4
        const auto& other = Base::data(rhs);
238
        // A partial state without a k never saw any row, so it carries no information.
239
4
        if (other.k == State::NO_K) {
240
0
            return;
241
0
        }
242
4
        if (state.k == State::NO_K) {
243
0
            state.k = other.k;
244
4
        } 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
3
        if (state.k == 0) {
253
0
            merge_extreme(state, other);
254
0
            return;
255
0
        }
256
3
        merge_values(state, other);
257
3
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE5mergeEPcPKcRNS_5ArenaE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE5mergeEPcPKcRNS_5ArenaE
Line
Count
Source
235
7
               Arena&) const override {
236
7
        auto& state = Base::data(place);
237
7
        const auto& other = Base::data(rhs);
238
        // A partial state without a k never saw any row, so it carries no information.
239
7
        if (other.k == State::NO_K) {
240
0
            return;
241
0
        }
242
7
        if (state.k == State::NO_K) {
243
0
            state.k = other.k;
244
7
        } 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
7
        if (state.k == 0) {
253
0
            merge_extreme(state, other);
254
0
            return;
255
0
        }
256
7
        merge_values(state, other);
257
7
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE5mergeEPcPKcRNS_5ArenaE
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
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
0
            state.k = other.k;
244
2
        } 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_13PrimitiveTypeE6ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE5mergeEPcPKcRNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE5mergeEPcPKcRNS_5ArenaE
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
5
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
260
5
        const auto& state = Base::data(place);
261
        // The serialized form keeps the historical flag byte: it is derived from k in the state.
262
5
        buf.write_binary(state.k != State::NO_K);
263
5
        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
5
        DorisVector<int32_t> order;
267
5
        collect_in_order(state, order);
268
5
        auto sorted_values = remove_nullable(this->argument_types[0])->create_column();
269
5
        sorted_values->reserve(order.size());
270
5
        DorisVector<int64_t> sorted_counts;
271
5
        sorted_counts.reserve(order.size());
272
78
        for (int32_t slot : order) {
273
78
            insert_value(*sorted_values, value_of(state, slot));
274
78
            sorted_counts.push_back(state.slots[slot].count);
275
78
        }
276
5
        auto size = static_cast<int64_t>(sorted_counts.size());
277
5
        buf.write_binary(size);
278
5
        write_column(buf, *sorted_values);
279
5
        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
4
            buf.write(reinterpret_cast<const char*>(sorted_counts.data()),
283
4
                      sorted_counts.size() * sizeof(int64_t));
284
4
        }
285
5
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
259
4
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
260
4
        const auto& state = Base::data(place);
261
        // The serialized form keeps the historical flag byte: it is derived from k in the state.
262
4
        buf.write_binary(state.k != State::NO_K);
263
4
        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
4
        DorisVector<int32_t> order;
267
4
        collect_in_order(state, order);
268
4
        auto sorted_values = remove_nullable(this->argument_types[0])->create_column();
269
4
        sorted_values->reserve(order.size());
270
4
        DorisVector<int64_t> sorted_counts;
271
4
        sorted_counts.reserve(order.size());
272
70
        for (int32_t slot : order) {
273
70
            insert_value(*sorted_values, value_of(state, slot));
274
70
            sorted_counts.push_back(state.slots[slot].count);
275
70
        }
276
4
        auto size = static_cast<int64_t>(sorted_counts.size());
277
4
        buf.write_binary(size);
278
4
        write_column(buf, *sorted_values);
279
4
        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
3
            buf.write(reinterpret_cast<const char*>(sorted_counts.data()),
283
3
                      sorted_counts.size() * sizeof(int64_t));
284
3
        }
285
4
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE9serializeEPKcRNS_14BufferWritableE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE9serializeEPKcRNS_14BufferWritableE
Line
Count
Source
259
1
    void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override {
260
1
        const auto& state = Base::data(place);
261
        // The serialized form keeps the historical flag byte: it is derived from k in the state.
262
1
        buf.write_binary(state.k != State::NO_K);
263
1
        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
1
        DorisVector<int32_t> order;
267
1
        collect_in_order(state, order);
268
1
        auto sorted_values = remove_nullable(this->argument_types[0])->create_column();
269
1
        sorted_values->reserve(order.size());
270
1
        DorisVector<int64_t> sorted_counts;
271
1
        sorted_counts.reserve(order.size());
272
8
        for (int32_t slot : order) {
273
8
            insert_value(*sorted_values, value_of(state, slot));
274
8
            sorted_counts.push_back(state.slots[slot].count);
275
8
        }
276
1
        auto size = static_cast<int64_t>(sorted_counts.size());
277
1
        buf.write_binary(size);
278
1
        write_column(buf, *sorted_values);
279
1
        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
1
            buf.write(reinterpret_cast<const char*>(sorted_counts.data()),
283
1
                      sorted_counts.size() * sizeof(int64_t));
284
1
        }
285
1
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE9serializeEPKcRNS_14BufferWritableE
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
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE9serializeEPKcRNS_14BufferWritableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE9serializeEPKcRNS_14BufferWritableE
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
8
                     Arena&) const override {
289
8
        auto& state = Base::data(place);
290
8
        bool has_k = false;
291
8
        buf.read_binary(has_k);
292
8
        buf.read_binary(state.k);
293
8
        if (!has_k) {
294
1
            state.k = State::NO_K;
295
1
        }
296
8
        int64_t size = 0;
297
8
        buf.read_binary(size);
298
8
        auto values = read_column(buf);
299
8
        DCHECK_EQ(static_cast<int64_t>(values->size()), size);
300
8
        DorisVector<int64_t> counts(static_cast<size_t>(size));
301
8
        if (size != 0) {
302
7
            buf.read(reinterpret_cast<char*>(counts.data()), size * sizeof(int64_t));
303
7
        }
304
8
        DorisVector<Entry> entries;
305
8
        entries.reserve(static_cast<size_t>(size));
306
91
        for (int64_t row = 0; row != size; ++row) {
307
83
            entries.push_back(Entry {value_at(*values, static_cast<size_t>(row)), counts[row]});
308
83
        }
309
8
        assign_sorted(state, std::move(entries));
310
8
    }
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
6
                     Arena&) const override {
289
6
        auto& state = Base::data(place);
290
6
        bool has_k = false;
291
6
        buf.read_binary(has_k);
292
6
        buf.read_binary(state.k);
293
6
        if (!has_k) {
294
1
            state.k = State::NO_K;
295
1
        }
296
6
        int64_t size = 0;
297
6
        buf.read_binary(size);
298
6
        auto values = read_column(buf);
299
6
        DCHECK_EQ(static_cast<int64_t>(values->size()), size);
300
6
        DorisVector<int64_t> counts(static_cast<size_t>(size));
301
6
        if (size != 0) {
302
5
            buf.read(reinterpret_cast<char*>(counts.data()), size * sizeof(int64_t));
303
5
        }
304
6
        DorisVector<Entry> entries;
305
6
        entries.reserve(static_cast<size_t>(size));
306
79
        for (int64_t row = 0; row != size; ++row) {
307
73
            entries.push_back(Entry {value_at(*values, static_cast<size_t>(row)), counts[row]});
308
73
        }
309
6
        assign_sorted(state, std::move(entries));
310
6
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
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
1
                     Arena&) const override {
289
1
        auto& state = Base::data(place);
290
1
        bool has_k = false;
291
1
        buf.read_binary(has_k);
292
1
        buf.read_binary(state.k);
293
1
        if (!has_k) {
294
0
            state.k = State::NO_K;
295
0
        }
296
1
        int64_t size = 0;
297
1
        buf.read_binary(size);
298
1
        auto values = read_column(buf);
299
1
        DCHECK_EQ(static_cast<int64_t>(values->size()), size);
300
1
        DorisVector<int64_t> counts(static_cast<size_t>(size));
301
1
        if (size != 0) {
302
1
            buf.read(reinterpret_cast<char*>(counts.data()), size * sizeof(int64_t));
303
1
        }
304
1
        DorisVector<Entry> entries;
305
1
        entries.reserve(static_cast<size_t>(size));
306
9
        for (int64_t row = 0; row != size; ++row) {
307
8
            entries.push_back(Entry {value_at(*values, static_cast<size_t>(row)), counts[row]});
308
8
        }
309
1
        assign_sorted(state, std::move(entries));
310
1
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
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
1
                     Arena&) const override {
289
1
        auto& state = Base::data(place);
290
1
        bool has_k = false;
291
1
        buf.read_binary(has_k);
292
1
        buf.read_binary(state.k);
293
1
        if (!has_k) {
294
0
            state.k = State::NO_K;
295
0
        }
296
1
        int64_t size = 0;
297
1
        buf.read_binary(size);
298
1
        auto values = read_column(buf);
299
1
        DCHECK_EQ(static_cast<int64_t>(values->size()), size);
300
1
        DorisVector<int64_t> counts(static_cast<size_t>(size));
301
1
        if (size != 0) {
302
1
            buf.read(reinterpret_cast<char*>(counts.data()), size * sizeof(int64_t));
303
1
        }
304
1
        DorisVector<Entry> entries;
305
1
        entries.reserve(static_cast<size_t>(size));
306
3
        for (int64_t row = 0; row != size; ++row) {
307
2
            entries.push_back(Entry {value_at(*values, static_cast<size_t>(row)), counts[row]});
308
2
        }
309
1
        assign_sorted(state, std::move(entries));
310
1
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE
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
44
    void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override {
313
44
        const auto& state = Base::data(place);
314
44
        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
44
        auto& pair_nullable = assert_cast<ColumnNullable&>(result_array.get_data());
318
44
        auto& pair_column = assert_cast<ColumnStruct&>(pair_nullable.get_nested_column());
319
44
        auto& value_column = assert_cast<ColumnNullable&>(pair_column.get_column(0));
320
44
        auto& count_column = assert_cast<ColumnNullable&>(pair_column.get_column(1));
321
44
        DorisVector<int32_t> order;
322
44
        collect_in_order(state, order);
323
1.24k
        for (int32_t slot : order) {
324
1.24k
            insert_value(value_column.get_nested_column(), value_of(state, slot));
325
1.24k
            value_column.get_null_map_data().push_back(0);
326
1.24k
            assert_cast<ColumnInt64&>(count_column.get_nested_column())
327
1.24k
                    .get_data()
328
1.24k
                    .push_back(state.slots[slot].count);
329
1.24k
            count_column.get_null_map_data().push_back(0);
330
1.24k
            pair_nullable.get_null_map_data().push_back(0);
331
1.24k
        }
332
44
        result_array.get_offsets().push_back(pair_column.size());
333
44
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE18insert_result_intoEPKcRNS_7IColumnE
_ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Line
Count
Source
312
20
    void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override {
313
20
        const auto& state = Base::data(place);
314
20
        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
20
        auto& pair_nullable = assert_cast<ColumnNullable&>(result_array.get_data());
318
20
        auto& pair_column = assert_cast<ColumnStruct&>(pair_nullable.get_nested_column());
319
20
        auto& value_column = assert_cast<ColumnNullable&>(pair_column.get_column(0));
320
20
        auto& count_column = assert_cast<ColumnNullable&>(pair_column.get_column(1));
321
20
        DorisVector<int32_t> order;
322
20
        collect_in_order(state, order);
323
674
        for (int32_t slot : order) {
324
674
            insert_value(value_column.get_nested_column(), value_of(state, slot));
325
674
            value_column.get_null_map_data().push_back(0);
326
674
            assert_cast<ColumnInt64&>(count_column.get_nested_column())
327
674
                    .get_data()
328
674
                    .push_back(state.slots[slot].count);
329
674
            count_column.get_null_map_data().push_back(0);
330
674
            pair_nullable.get_null_map_data().push_back(0);
331
674
        }
332
20
        result_array.get_offsets().push_back(pair_column.size());
333
20
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE18insert_result_intoEPKcRNS_7IColumnE
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
11
    void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override {
313
11
        const auto& state = Base::data(place);
314
11
        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
11
        auto& pair_nullable = assert_cast<ColumnNullable&>(result_array.get_data());
318
11
        auto& pair_column = assert_cast<ColumnStruct&>(pair_nullable.get_nested_column());
319
11
        auto& value_column = assert_cast<ColumnNullable&>(pair_column.get_column(0));
320
11
        auto& count_column = assert_cast<ColumnNullable&>(pair_column.get_column(1));
321
11
        DorisVector<int32_t> order;
322
11
        collect_in_order(state, order);
323
36
        for (int32_t slot : order) {
324
36
            insert_value(value_column.get_nested_column(), value_of(state, slot));
325
36
            value_column.get_null_map_data().push_back(0);
326
36
            assert_cast<ColumnInt64&>(count_column.get_nested_column())
327
36
                    .get_data()
328
36
                    .push_back(state.slots[slot].count);
329
36
            count_column.get_null_map_data().push_back(0);
330
36
            pair_nullable.get_null_map_data().push_back(0);
331
36
        }
332
11
        result_array.get_offsets().push_back(pair_column.size());
333
11
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE18insert_result_intoEPKcRNS_7IColumnE
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
12
    void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override {
313
12
        const auto& state = Base::data(place);
314
12
        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
12
        auto& pair_nullable = assert_cast<ColumnNullable&>(result_array.get_data());
318
12
        auto& pair_column = assert_cast<ColumnStruct&>(pair_nullable.get_nested_column());
319
12
        auto& value_column = assert_cast<ColumnNullable&>(pair_column.get_column(0));
320
12
        auto& count_column = assert_cast<ColumnNullable&>(pair_column.get_column(1));
321
12
        DorisVector<int32_t> order;
322
12
        collect_in_order(state, order);
323
533
        for (int32_t slot : order) {
324
533
            insert_value(value_column.get_nested_column(), value_of(state, slot));
325
533
            value_column.get_null_map_data().push_back(0);
326
533
            assert_cast<ColumnInt64&>(count_column.get_nested_column())
327
533
                    .get_data()
328
533
                    .push_back(state.slots[slot].count);
329
533
            count_column.get_null_map_data().push_back(0);
330
533
            pair_nullable.get_null_map_data().push_back(0);
331
533
        }
332
12
        result_array.get_offsets().push_back(pair_column.size());
333
12
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE18insert_result_intoEPKcRNS_7IColumnE
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
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
2
        for (int32_t slot : order) {
324
2
            insert_value(value_column.get_nested_column(), value_of(state, slot));
325
2
            value_column.get_null_map_data().push_back(0);
326
2
            assert_cast<ColumnInt64&>(count_column.get_nested_column())
327
2
                    .get_data()
328
2
                    .push_back(state.slots[slot].count);
329
2
            count_column.get_null_map_data().push_back(0);
330
2
            pair_nullable.get_null_map_data().push_back(0);
331
2
        }
332
1
        result_array.get_offsets().push_back(pair_column.size());
333
1
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE18insert_result_intoEPKcRNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE18insert_result_intoEPKcRNS_7IColumnE
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
44
    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
44
        auto pair_type = std::make_shared<DataTypeStruct>(
340
44
                DataTypes {make_nullable(value_type),
341
44
                           make_nullable(std::make_shared<DataTypeInt64>())},
342
44
                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
44
        return std::make_shared<DataTypeArray>(make_nullable(pair_type));
346
44
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Line
Count
Source
335
20
    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
20
        auto pair_type = std::make_shared<DataTypeStruct>(
340
20
                DataTypes {make_nullable(value_type),
341
20
                           make_nullable(std::make_shared<DataTypeInt64>())},
342
20
                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
20
        return std::make_shared<DataTypeArray>(make_nullable(pair_type));
346
20
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
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
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_13PrimitiveTypeE11ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
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
12
    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
12
        auto pair_type = std::make_shared<DataTypeStruct>(
340
12
                DataTypes {make_nullable(value_type),
341
12
                           make_nullable(std::make_shared<DataTypeInt64>())},
342
12
                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
12
        return std::make_shared<DataTypeArray>(make_nullable(pair_type));
346
12
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
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
1
    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
1
        auto pair_type = std::make_shared<DataTypeStruct>(
340
1
                DataTypes {make_nullable(value_type),
341
1
                           make_nullable(std::make_shared<DataTypeInt64>())},
342
1
                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
1
        return std::make_shared<DataTypeArray>(make_nullable(pair_type));
346
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE16make_return_typeERKSt10shared_ptrIKNS_9IDataTypeEE
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
22.2k
    static ValueRef value_at(const IColumn& column, size_t row_num) {
351
22.2k
        if constexpr (IS_STRING) {
352
73
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column).get_data_at(
353
73
                    row_num);
354
22.1k
        } else {
355
22.1k
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column)
356
22.1k
                    .get_data()[row_num];
357
22.1k
        }
358
22.2k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE8value_atERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE8value_atERKNS_7IColumnEm
Line
Count
Source
350
12.0k
    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.0k
        } else {
355
12.0k
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column)
356
12.0k
                    .get_data()[row_num];
357
12.0k
        }
358
12.0k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE8value_atERKNS_7IColumnEm
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
68
    static ValueRef value_at(const IColumn& column, size_t row_num) {
351
68
        if constexpr (IS_STRING) {
352
68
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column).get_data_at(
353
68
                    row_num);
354
        } else {
355
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column)
356
                    .get_data()[row_num];
357
        }
358
68
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE8value_atERKNS_7IColumnEm
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.1k
    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.1k
        } else {
355
10.1k
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column)
356
10.1k
                    .get_data()[row_num];
357
10.1k
        }
358
10.1k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE8value_atERKNS_7IColumnEm
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
5
    static ValueRef value_at(const IColumn& column, size_t row_num) {
351
5
        if constexpr (IS_STRING) {
352
5
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column).get_data_at(
353
5
                    row_num);
354
        } else {
355
            return assert_cast<const ColumnType&, TypeCheckOnRelease::DISABLE>(column)
356
                    .get_data()[row_num];
357
        }
358
5
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE8value_atERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE8value_atERKNS_7IColumnEm
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
37.7k
    static int compare_values(ValueRef lhs, ValueRef rhs) {
364
37.7k
        if constexpr (IS_STRING) {
365
112
            return memcmp_small_allow_overflow15(
366
112
                    reinterpret_cast<const uint8_t*>(lhs.data), lhs.size,
367
112
                    reinterpret_cast<const uint8_t*>(rhs.data), rhs.size);
368
37.6k
        } else {
369
37.6k
            return Compare::compare(lhs, rhs);
370
37.6k
        }
371
37.7k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE14compare_valuesERKhS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE14compare_valuesERKaS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE14compare_valuesERKsS4_
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE14compare_valuesERKiS4_
Line
Count
Source
363
24.4k
    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.4k
        } else {
369
24.4k
            return Compare::compare(lhs, rhs);
370
24.4k
        }
371
24.4k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE14compare_valuesERKlS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE14compare_valuesERKnS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE14compare_valuesERKfS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE14compare_valuesERKdS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE14compare_valuesERKNS_7DecimalIiEES6_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE14compare_valuesERKNS_7DecimalIlEES6_
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
106
    static int compare_values(ValueRef lhs, ValueRef rhs) {
364
106
        if constexpr (IS_STRING) {
365
106
            return memcmp_small_allow_overflow15(
366
106
                    reinterpret_cast<const uint8_t*>(lhs.data), lhs.size,
367
106
                    reinterpret_cast<const uint8_t*>(rhs.data), rhs.size);
368
        } else {
369
            return Compare::compare(lhs, rhs);
370
        }
371
106
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE14compare_valuesERKNS_16VecDateTimeValueES5_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE14compare_valuesERKNS_16VecDateTimeValueES5_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE14compare_valuesERKNS_11DateV2ValueINS_15DateV2ValueTypeEEES7_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE14compare_valuesERKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEES7_
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
13.2k
    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
13.2k
        } else {
369
13.2k
            return Compare::compare(lhs, rhs);
370
13.2k
        }
371
13.2k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE14compare_valuesERKlS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE14compare_valuesERKnS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE14compare_valuesERKfS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE14compare_valuesERKdS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE14compare_valuesERKNS_7DecimalIiEES6_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE14compare_valuesERKNS_7DecimalIlEES6_
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
6
    static int compare_values(ValueRef lhs, ValueRef rhs) {
364
6
        if constexpr (IS_STRING) {
365
6
            return memcmp_small_allow_overflow15(
366
6
                    reinterpret_cast<const uint8_t*>(lhs.data), lhs.size,
367
6
                    reinterpret_cast<const uint8_t*>(rhs.data), rhs.size);
368
        } else {
369
            return Compare::compare(lhs, rhs);
370
        }
371
6
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE14compare_valuesERKNS_16VecDateTimeValueES5_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE14compare_valuesERKNS_16VecDateTimeValueES5_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE14compare_valuesERKNS_11DateV2ValueINS_15DateV2ValueTypeEEES7_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE14compare_valuesERKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEES7_
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
41.5k
    static ValueRef value_of(const State& state, int32_t slot) {
375
41.5k
        const Payload& payload = state.slots[slot].payload;
376
41.5k
        if constexpr (IS_STRING) {
377
212
            return StringRef(state.bytes.data() + payload.offset, payload.length);
378
41.3k
        } else {
379
41.3k
            return payload;
380
41.3k
        }
381
41.5k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_2EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_3EEEi
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_9EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_28EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_29EEEi
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
203
    static ValueRef value_of(const State& state, int32_t slot) {
375
203
        const Payload& payload = state.slots[slot].payload;
376
203
        if constexpr (IS_STRING) {
377
203
            return StringRef(state.bytes.data() + payload.offset, payload.length);
378
        } else {
379
            return payload;
380
        }
381
203
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_11EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_12EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_25EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE8value_ofERKNS_22AggregateTopKCountDataILS1_26EEEi
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
14.4k
    static ValueRef value_of(const State& state, int32_t slot) {
375
14.4k
        const Payload& payload = state.slots[slot].payload;
376
        if constexpr (IS_STRING) {
377
            return StringRef(state.bytes.data() + payload.offset, payload.length);
378
14.4k
        } else {
379
14.4k
            return payload;
380
14.4k
        }
381
14.4k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_6EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_7EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_8EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_9EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_28EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_29EEEi
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
9
    static ValueRef value_of(const State& state, int32_t slot) {
375
9
        const Payload& payload = state.slots[slot].payload;
376
9
        if constexpr (IS_STRING) {
377
9
            return StringRef(state.bytes.data() + payload.offset, payload.length);
378
        } else {
379
            return payload;
380
        }
381
9
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_11EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_12EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_25EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE8value_ofERKNS_22AggregateTopKCountDataILS1_26EEEi
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.06k
    static void set_value(State& state, int32_t slot, ValueRef value) {
385
3.06k
        if constexpr (IS_STRING) {
386
51
            Payload& payload = state.slots[slot].payload;
387
51
            payload.offset = state.bytes.size();
388
51
            payload.length = value.size;
389
51
            if (value.size != 0) {
390
51
                state.bytes.insert(value.data, value.data + value.size);
391
51
            }
392
51
            state.live_payload_bytes += value.size;
393
3.01k
        } else {
394
3.01k
            state.slots[slot].payload = value;
395
3.01k
        }
396
3.06k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_2EEEiRKh
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_3EEEiRKa
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_4EEEiRKs
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_5EEEiRKi
Line
Count
Source
384
2.33k
    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.33k
        } else {
394
2.33k
            state.slots[slot].payload = value;
395
2.33k
        }
396
2.33k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_6EEEiRKl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_7EEEiRKn
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_8EEEiRKf
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_9EEEiRKd
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_28EEEiRKNS_7DecimalIiEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_29EEEiRKNS_7DecimalIlEE
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
48
    static void set_value(State& state, int32_t slot, ValueRef value) {
385
48
        if constexpr (IS_STRING) {
386
48
            Payload& payload = state.slots[slot].payload;
387
48
            payload.offset = state.bytes.size();
388
48
            payload.length = value.size;
389
48
            if (value.size != 0) {
390
48
                state.bytes.insert(value.data, value.data + value.size);
391
48
            }
392
48
            state.live_payload_bytes += value.size;
393
        } else {
394
            state.slots[slot].payload = value;
395
        }
396
48
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE9set_valueERNS_22AggregateTopKCountDataILS1_26EEEiRKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEE
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
678
    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
678
        } else {
394
678
            state.slots[slot].payload = value;
395
678
        }
396
678
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_6EEEiRKl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_7EEEiRKn
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_8EEEiRKf
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_9EEEiRKd
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_28EEEiRKNS_7DecimalIiEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_29EEEiRKNS_7DecimalIlEE
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
3
    static void set_value(State& state, int32_t slot, ValueRef value) {
385
3
        if constexpr (IS_STRING) {
386
3
            Payload& payload = state.slots[slot].payload;
387
3
            payload.offset = state.bytes.size();
388
3
            payload.length = value.size;
389
3
            if (value.size != 0) {
390
3
                state.bytes.insert(value.data, value.data + value.size);
391
3
            }
392
3
            state.live_payload_bytes += value.size;
393
        } else {
394
            state.slots[slot].payload = value;
395
        }
396
3
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE9set_valueERNS_22AggregateTopKCountDataILS1_26EEEiRKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEE
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
2
    static void replace_value(State& state, int32_t slot, ValueRef value) {
401
2
        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
2
        set_value(state, slot, value);
407
2
    }
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
1
    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
1
        set_value(state, slot, value);
407
1
    }
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
1
    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
1
        set_value(state, slot, value);
407
1
    }
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.88k
    static void evict_value(State& state, int32_t slot) {
411
1.88k
        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
1.88k
    }
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.72k
    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.72k
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE11evict_valueERNS_22AggregateTopKCountDataILS1_29EEEi
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
11
    static void evict_value(State& state, int32_t slot) {
411
11
        if constexpr (IS_STRING) {
412
11
            const size_t length = state.slots[slot].payload.length;
413
11
            state.live_payload_bytes -= length;
414
11
            state.dead_payload_bytes += length;
415
11
        }
416
11
    }
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
142
    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
142
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_29EEEi
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
1
    static void evict_value(State& state, int32_t slot) {
411
1
        if constexpr (IS_STRING) {
412
1
            const size_t length = state.slots[slot].payload.length;
413
1
            state.live_payload_bytes -= length;
414
1
            state.dead_payload_bytes += length;
415
1
        }
416
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_11EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_12EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_25EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE11evict_valueERNS_22AggregateTopKCountDataILS1_26EEEi
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.0k
    static bool evicted_payload_exceeds_live(const State& state) {
420
22.0k
        if constexpr (IS_STRING) {
421
65
            return state.dead_payload_bytes > state.live_payload_bytes;
422
65
        }
423
0
        return false;
424
22.0k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_2EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_3EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_4EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_5EEE
Line
Count
Source
419
11.8k
    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
11.8k
        return false;
424
11.8k
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_9EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_28EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_29EEE
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
60
    static bool evicted_payload_exceeds_live(const State& state) {
420
60
        if constexpr (IS_STRING) {
421
60
            return state.dead_payload_bytes > state.live_payload_bytes;
422
60
        }
423
0
        return false;
424
60
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_26EEE
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.1k
    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.1k
        return false;
424
10.1k
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_9EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_28EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_29EEE
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
5
    static bool evicted_payload_exceeds_live(const State& state) {
420
5
        if constexpr (IS_STRING) {
421
5
            return state.dead_payload_bytes > state.live_payload_bytes;
422
5
        }
423
0
        return false;
424
5
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE28evicted_payload_exceeds_liveERKNS_22AggregateTopKCountDataILS1_26EEE
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.06k
    static Slot make_slot(int64_t count, uint32_t priority) {
427
3.06k
        Slot slot;
428
3.06k
        slot.count = count;
429
3.06k
        slot.priority = priority;
430
3.06k
        return slot;
431
3.06k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE9make_slotElj
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE9make_slotElj
Line
Count
Source
426
2.33k
    static Slot make_slot(int64_t count, uint32_t priority) {
427
2.33k
        Slot slot;
428
2.33k
        slot.count = count;
429
2.33k
        slot.priority = priority;
430
2.33k
        return slot;
431
2.33k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE9make_slotElj
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE9make_slotElj
Line
Count
Source
426
48
    static Slot make_slot(int64_t count, uint32_t priority) {
427
48
        Slot slot;
428
48
        slot.count = count;
429
48
        slot.priority = priority;
430
48
        return slot;
431
48
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE9make_slotElj
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
677
    static Slot make_slot(int64_t count, uint32_t priority) {
427
677
        Slot slot;
428
677
        slot.count = count;
429
677
        slot.priority = priority;
430
677
        return slot;
431
677
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE9make_slotElj
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE9make_slotElj
Line
Count
Source
426
3
    static Slot make_slot(int64_t count, uint32_t priority) {
427
3
        Slot slot;
428
3
        slot.count = count;
429
3
        slot.priority = priority;
430
3
        return slot;
431
3
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE9make_slotElj
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE9make_slotElj
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.32k
    static void insert_value(IColumn& column, ValueRef value) {
434
1.32k
        if constexpr (IS_STRING) {
435
46
            assert_cast<ColumnString&>(column).insert_data(value.data, value.size);
436
1.27k
        } else {
437
1.27k
            assert_cast<ColumnType&>(column).get_data().push_back(value);
438
1.27k
        }
439
1.32k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE12insert_valueERNS_7IColumnERKh
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE12insert_valueERNS_7IColumnERKa
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE12insert_valueERNS_7IColumnERKs
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE12insert_valueERNS_7IColumnERKi
Line
Count
Source
433
744
    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
744
        } else {
437
744
            assert_cast<ColumnType&>(column).get_data().push_back(value);
438
744
        }
439
744
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE12insert_valueERNS_7IColumnERKl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE12insert_valueERNS_7IColumnERKn
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE12insert_valueERNS_7IColumnERKf
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE12insert_valueERNS_7IColumnERKd
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE12insert_valueERNS_7IColumnERKNS_7DecimalIiEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE12insert_valueERNS_7IColumnERKNS_7DecimalIlEE
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
44
    static void insert_value(IColumn& column, ValueRef value) {
434
44
        if constexpr (IS_STRING) {
435
44
            assert_cast<ColumnString&>(column).insert_data(value.data, value.size);
436
        } else {
437
            assert_cast<ColumnType&>(column).get_data().push_back(value);
438
        }
439
44
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE12insert_valueERNS_7IColumnERKNS_16VecDateTimeValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE12insert_valueERNS_7IColumnERKNS_16VecDateTimeValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE12insert_valueERNS_7IColumnERKNS_11DateV2ValueINS_15DateV2ValueTypeEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE12insert_valueERNS_7IColumnERKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEE
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
533
    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
533
        } else {
437
533
            assert_cast<ColumnType&>(column).get_data().push_back(value);
438
533
        }
439
533
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE12insert_valueERNS_7IColumnERKl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE12insert_valueERNS_7IColumnERKn
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE12insert_valueERNS_7IColumnERKf
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE12insert_valueERNS_7IColumnERKd
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE12insert_valueERNS_7IColumnERKNS_7DecimalIiEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE12insert_valueERNS_7IColumnERKNS_7DecimalIlEE
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
2
    static void insert_value(IColumn& column, ValueRef value) {
434
2
        if constexpr (IS_STRING) {
435
2
            assert_cast<ColumnString&>(column).insert_data(value.data, value.size);
436
        } else {
437
            assert_cast<ColumnType&>(column).get_data().push_back(value);
438
        }
439
2
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE12insert_valueERNS_7IColumnERKNS_16VecDateTimeValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE12insert_valueERNS_7IColumnERKNS_16VecDateTimeValueE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE12insert_valueERNS_7IColumnERKNS_11DateV2ValueINS_15DateV2ValueTypeEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE12insert_valueERNS_7IColumnERKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEE
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
17.5k
    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
14.2k
    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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE12comes_beforeEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE12comes_beforeEi
Line
Count
Source
442
65
    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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE12comes_beforeEi
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
3.24k
    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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE12comes_beforeEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE12comes_beforeEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE12comes_beforeEi
Line
Count
Source
442
3
    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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE12comes_beforeEi
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.2k
    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.1k
    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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE8is_worseEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE8is_worseEi
Line
Count
Source
446
37
    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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE8is_worseEi
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE8is_worseEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE8is_worseEi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE8is_worseEi
Line
Count
Source
446
3
    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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE8is_worseEi
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
4.46k
    static uint32_t next_priority(State& state) {
451
4.46k
        uint32_t z = (state.rng += 0x9E3779B9U);
452
4.46k
        z = (z ^ (z >> 16)) * 0x21F0AAADU;
453
4.46k
        z = (z ^ (z >> 15)) * 0x735A2D97U;
454
4.46k
        return z ^ (z >> 15);
455
4.46k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_2EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_3EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_4EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_5EEE
Line
Count
Source
450
3.58k
    static uint32_t next_priority(State& state) {
451
3.58k
        uint32_t z = (state.rng += 0x9E3779B9U);
452
3.58k
        z = (z ^ (z >> 16)) * 0x21F0AAADU;
453
3.58k
        z = (z ^ (z >> 15)) * 0x735A2D97U;
454
3.58k
        return z ^ (z >> 15);
455
3.58k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_6EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_7EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_8EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_9EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_28EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_29EEE
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
82
    static uint32_t next_priority(State& state) {
451
82
        uint32_t z = (state.rng += 0x9E3779B9U);
452
82
        z = (z ^ (z >> 16)) * 0x21F0AAADU;
453
82
        z = (z ^ (z >> 15)) * 0x735A2D97U;
454
82
        return z ^ (z >> 15);
455
82
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_11EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_12EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_25EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE13next_priorityERNS_22AggregateTopKCountDataILS1_26EEE
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
786
    static uint32_t next_priority(State& state) {
451
786
        uint32_t z = (state.rng += 0x9E3779B9U);
452
786
        z = (z ^ (z >> 16)) * 0x21F0AAADU;
453
786
        z = (z ^ (z >> 15)) * 0x735A2D97U;
454
786
        return z ^ (z >> 15);
455
786
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_6EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_7EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_8EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_9EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_28EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_29EEE
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
3
    static uint32_t next_priority(State& state) {
451
3
        uint32_t z = (state.rng += 0x9E3779B9U);
452
3
        z = (z ^ (z >> 16)) * 0x21F0AAADU;
453
3
        z = (z ^ (z >> 15)) * 0x735A2D97U;
454
3
        return z ^ (z >> 15);
455
3
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_11EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_12EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_25EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE13next_priorityERNS_22AggregateTopKCountDataILS1_26EEE
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.13k
    static int compare_slots(const State& state, int32_t lhs, int32_t rhs) {
458
1.13k
        return compare_values(value_of(state, lhs), value_of(state, rhs));
459
1.13k
    }
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
592
    static int compare_slots(const State& state, int32_t lhs, int32_t rhs) {
458
592
        return compare_values(value_of(state, lhs), value_of(state, rhs));
459
592
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_6EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_7EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_8EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_9EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_28EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_29EEEii
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
20
    static int compare_slots(const State& state, int32_t lhs, int32_t rhs) {
458
20
        return compare_values(value_of(state, lhs), value_of(state, rhs));
459
20
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_11EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_12EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_25EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_26EEEii
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
524
    static int compare_slots(const State& state, int32_t lhs, int32_t rhs) {
458
524
        return compare_values(value_of(state, lhs), value_of(state, rhs));
459
524
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_6EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_7EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_8EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_9EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_28EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_29EEEii
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
1
    static int compare_slots(const State& state, int32_t lhs, int32_t rhs) {
458
1
        return compare_values(value_of(state, lhs), value_of(state, rhs));
459
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_11EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_12EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_25EEEii
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE13compare_slotsERKNS_22AggregateTopKCountDataILS1_26EEEii
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.14k
    static void check_slot_capacity(size_t size) {
469
3.14k
        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.14k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE19check_slot_capacityEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE19check_slot_capacityEm
Line
Count
Source
468
2.39k
    static void check_slot_capacity(size_t size) {
469
2.39k
        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.39k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE19check_slot_capacityEm
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
54
    static void check_slot_capacity(size_t size) {
469
54
        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
54
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE19check_slot_capacityEm
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
699
    static void check_slot_capacity(size_t size) {
469
699
        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
699
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE19check_slot_capacityEm
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
3
    static void check_slot_capacity(size_t size) {
469
3
        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
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE19check_slot_capacityEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE19check_slot_capacityEm
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.06k
    static int32_t append_slot(State& state, ValueRef value, int64_t count) {
478
3.06k
        check_slot_capacity(state.slots.size() + 1);
479
3.06k
        auto slot = static_cast<int32_t>(state.slots.size());
480
3.06k
        state.slots.push_back(make_slot(count, next_priority(state)));
481
3.06k
        set_value(state, slot, value);
482
3.06k
        ++state.live;
483
3.06k
        return slot;
484
3.06k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_2EEERKhl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_3EEERKal
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_4EEERKsl
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_5EEERKil
Line
Count
Source
477
2.33k
    static int32_t append_slot(State& state, ValueRef value, int64_t count) {
478
2.33k
        check_slot_capacity(state.slots.size() + 1);
479
2.33k
        auto slot = static_cast<int32_t>(state.slots.size());
480
2.33k
        state.slots.push_back(make_slot(count, next_priority(state)));
481
2.33k
        set_value(state, slot, value);
482
2.33k
        ++state.live;
483
2.33k
        return slot;
484
2.33k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_6EEERKll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_7EEERKnl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_8EEERKfl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_9EEERKdl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_28EEERKNS_7DecimalIiEEl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_29EEERKNS_7DecimalIlEEl
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
48
    static int32_t append_slot(State& state, ValueRef value, int64_t count) {
478
48
        check_slot_capacity(state.slots.size() + 1);
479
48
        auto slot = static_cast<int32_t>(state.slots.size());
480
48
        state.slots.push_back(make_slot(count, next_priority(state)));
481
48
        set_value(state, slot, value);
482
48
        ++state.live;
483
48
        return slot;
484
48
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE11append_slotERNS_22AggregateTopKCountDataILS1_26EEERKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEEl
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
677
    static int32_t append_slot(State& state, ValueRef value, int64_t count) {
478
677
        check_slot_capacity(state.slots.size() + 1);
479
677
        auto slot = static_cast<int32_t>(state.slots.size());
480
677
        state.slots.push_back(make_slot(count, next_priority(state)));
481
677
        set_value(state, slot, value);
482
677
        ++state.live;
483
677
        return slot;
484
677
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_6EEERKll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_7EEERKnl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_8EEERKfl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_9EEERKdl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_28EEERKNS_7DecimalIiEEl
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_29EEERKNS_7DecimalIlEEl
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
3
    static int32_t append_slot(State& state, ValueRef value, int64_t count) {
478
3
        check_slot_capacity(state.slots.size() + 1);
479
3
        auto slot = static_cast<int32_t>(state.slots.size());
480
3
        state.slots.push_back(make_slot(count, next_priority(state)));
481
3
        set_value(state, slot, value);
482
3
        ++state.live;
483
3
        return slot;
484
3
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE11append_slotERNS_22AggregateTopKCountDataILS1_26EEERKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEEl
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
3
    static int32_t append_slot(State& state, const IColumn& column, size_t row_num, int64_t count) {
487
3
        return append_slot(state, value_at(column, row_num), count);
488
3
    }
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
2
    static int32_t append_slot(State& state, const IColumn& column, size_t row_num, int64_t count) {
487
2
        return append_slot(state, value_at(column, row_num), count);
488
2
    }
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
1
    static int32_t append_slot(State& state, const IColumn& column, size_t row_num, int64_t count) {
487
1
        return append_slot(state, value_at(column, row_num), count);
488
1
    }
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.31k
    static int32_t rotate_right(State& state, int32_t node) {
493
2.31k
        int32_t pivot = state.slots[node].left;
494
2.31k
        state.slots[node].left = state.slots[pivot].right;
495
2.31k
        state.slots[pivot].right = node;
496
2.31k
        return pivot;
497
2.31k
    }
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.18k
    static int32_t rotate_right(State& state, int32_t node) {
493
2.18k
        int32_t pivot = state.slots[node].left;
494
2.18k
        state.slots[node].left = state.slots[pivot].right;
495
2.18k
        state.slots[pivot].right = node;
496
2.18k
        return pivot;
497
2.18k
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE12rotate_rightERNS_22AggregateTopKCountDataILS1_29EEEi
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
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_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
129
    static int32_t rotate_right(State& state, int32_t node) {
493
129
        int32_t pivot = state.slots[node].left;
494
129
        state.slots[node].left = state.slots[pivot].right;
495
129
        state.slots[pivot].right = node;
496
129
        return pivot;
497
129
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_6EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_7EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_8EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_9EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_28EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_29EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_20EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_30EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_35EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_10EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_11EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_12EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_25EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE12rotate_rightERNS_22AggregateTopKCountDataILS1_26EEEi
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
757
    static int32_t rotate_left(State& state, int32_t node) {
500
757
        int32_t pivot = state.slots[node].right;
501
757
        state.slots[node].right = state.slots[pivot].left;
502
757
        state.slots[pivot].left = node;
503
757
        return pivot;
504
757
    }
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
152
    static int32_t rotate_left(State& state, int32_t node) {
500
152
        int32_t pivot = state.slots[node].right;
501
152
        state.slots[node].right = state.slots[pivot].left;
502
152
        state.slots[pivot].left = node;
503
152
        return pivot;
504
152
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_6EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_7EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_8EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_9EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_28EEEi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE11rotate_leftERNS_22AggregateTopKCountDataILS1_29EEEi
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
18
    static int32_t rotate_left(State& state, int32_t node) {
500
18
        int32_t pivot = state.slots[node].right;
501
18
        state.slots[node].right = state.slots[pivot].left;
502
18
        state.slots[pivot].left = node;
503
18
        return pivot;
504
18
    }
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
586
    static int32_t rotate_left(State& state, int32_t node) {
500
586
        int32_t pivot = state.slots[node].right;
501
586
        state.slots[node].right = state.slots[pivot].left;
502
586
        state.slots[pivot].left = node;
503
586
        return pivot;
504
586
    }
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
1
    static int32_t rotate_left(State& state, int32_t node) {
500
1
        int32_t pivot = state.slots[node].right;
501
1
        state.slots[node].right = state.slots[pivot].left;
502
1
        state.slots[pivot].left = node;
503
1
        return pivot;
504
1
    }
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
20.6k
                                    int32_t* inserted_slot) {
513
20.6k
        if (node == State::NO_SLOT) {
514
3.06k
            *inserted_slot = append_slot(state, value, count);
515
3.06k
            return *inserted_slot;
516
3.06k
        }
517
17.5k
        int cmp = compare_values(value_of(state, node), value);
518
17.5k
        if (cmp == 0) {
519
11
            state.slots[node].count = checked_add(state.slots[node].count, count);
520
11
            return node;
521
11
        }
522
17.5k
        if (comes_before(cmp)) {
523
            // The stored value is the better one, so the input belongs in the right subtree.
524
3.46k
            state.slots[node].right =
525
3.46k
                    add_or_increment(state, state.slots[node].right, value, count, inserted_slot);
526
3.46k
            if (state.slots[state.slots[node].right].priority > state.slots[node].priority) {
527
757
                return rotate_left(state, node);
528
757
            }
529
14.0k
        } else {
530
14.0k
            state.slots[node].left =
531
14.0k
                    add_or_increment(state, state.slots[node].left, value, count, inserted_slot);
532
14.0k
            if (state.slots[state.slots[node].left].priority > state.slots[node].priority) {
533
2.31k
                return rotate_right(state, node);
534
2.31k
            }
535
14.0k
        }
536
14.4k
        return node;
537
17.5k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_2EEEiRKhlPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_3EEEiRKalPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_4EEEiRKslPi
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_5EEEiRKilPi
Line
Count
Source
512
16.5k
                                    int32_t* inserted_slot) {
513
16.5k
        if (node == State::NO_SLOT) {
514
2.33k
            *inserted_slot = append_slot(state, value, count);
515
2.33k
            return *inserted_slot;
516
2.33k
        }
517
14.2k
        int cmp = compare_values(value_of(state, node), value);
518
14.2k
        if (cmp == 0) {
519
5
            state.slots[node].count = checked_add(state.slots[node].count, count);
520
5
            return node;
521
5
        }
522
14.2k
        if (comes_before(cmp)) {
523
            // The stored value is the better one, so the input belongs in the right subtree.
524
578
            state.slots[node].right =
525
578
                    add_or_increment(state, state.slots[node].right, value, count, inserted_slot);
526
578
            if (state.slots[state.slots[node].right].priority > state.slots[node].priority) {
527
152
                return rotate_left(state, node);
528
152
            }
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.18k
                return rotate_right(state, node);
534
2.18k
            }
535
13.6k
        }
536
11.9k
        return node;
537
14.2k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_6EEEiRKllPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_7EEEiRKnlPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_8EEEiRKflPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_9EEEiRKdlPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_28EEEiRKNS_7DecimalIiEElPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_29EEEiRKNS_7DecimalIlEElPi
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
114
                                    int32_t* inserted_slot) {
513
114
        if (node == State::NO_SLOT) {
514
48
            *inserted_slot = append_slot(state, value, count);
515
48
            return *inserted_slot;
516
48
        }
517
66
        int cmp = compare_values(value_of(state, node), value);
518
66
        if (cmp == 0) {
519
3
            state.slots[node].count = checked_add(state.slots[node].count, count);
520
3
            return node;
521
3
        }
522
63
        if (comes_before(cmp)) {
523
            // The stored value is the better one, so the input belongs in the right subtree.
524
48
            state.slots[node].right =
525
48
                    add_or_increment(state, state.slots[node].right, value, count, inserted_slot);
526
48
            if (state.slots[state.slots[node].right].priority > state.slots[node].priority) {
527
18
                return rotate_left(state, node);
528
18
            }
529
48
        } else {
530
15
            state.slots[node].left =
531
15
                    add_or_increment(state, state.slots[node].left, value, count, inserted_slot);
532
15
            if (state.slots[state.slots[node].left].priority > state.slots[node].priority) {
533
2
                return rotate_right(state, node);
534
2
            }
535
15
        }
536
43
        return node;
537
63
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_26EEEiRKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEElPi
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
3.91k
                                    int32_t* inserted_slot) {
513
3.91k
        if (node == State::NO_SLOT) {
514
676
            *inserted_slot = append_slot(state, value, count);
515
676
            return *inserted_slot;
516
676
        }
517
3.23k
        int cmp = compare_values(value_of(state, node), value);
518
3.23k
        if (cmp == 0) {
519
3
            state.slots[node].count = checked_add(state.slots[node].count, count);
520
3
            return node;
521
3
        }
522
3.23k
        if (comes_before(cmp)) {
523
            // The stored value is the better one, so the input belongs in the right subtree.
524
2.84k
            state.slots[node].right =
525
2.84k
                    add_or_increment(state, state.slots[node].right, value, count, inserted_slot);
526
2.84k
            if (state.slots[state.slots[node].right].priority > state.slots[node].priority) {
527
586
                return rotate_left(state, node);
528
586
            }
529
2.84k
        } else {
530
394
            state.slots[node].left =
531
394
                    add_or_increment(state, state.slots[node].left, value, count, inserted_slot);
532
394
            if (state.slots[state.slots[node].left].priority > state.slots[node].priority) {
533
129
                return rotate_right(state, node);
534
129
            }
535
394
        }
536
2.52k
        return node;
537
3.23k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_6EEEiRKllPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_7EEEiRKnlPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_8EEEiRKflPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_9EEEiRKdlPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_28EEEiRKNS_7DecimalIiEElPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_29EEEiRKNS_7DecimalIlEElPi
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
6
                                    int32_t* inserted_slot) {
513
6
        if (node == State::NO_SLOT) {
514
3
            *inserted_slot = append_slot(state, value, count);
515
3
            return *inserted_slot;
516
3
        }
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
2
            state.slots[node].right =
525
2
                    add_or_increment(state, state.slots[node].right, value, count, inserted_slot);
526
2
            if (state.slots[state.slots[node].right].priority > state.slots[node].priority) {
527
1
                return rotate_left(state, node);
528
1
            }
529
2
        } 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
2
        return node;
537
3
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE16add_or_incrementERNS_22AggregateTopKCountDataILS1_26EEEiRKNS_11DateV2ValueINS_19DateTimeV2ValueTypeEEElPi
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.6k
    static int32_t erase_worst(State& state, int32_t node, int32_t* removed) {
543
11.6k
        if (state.slots[node].right == State::NO_SLOT) {
544
1.88k
            *removed = node;
545
1.88k
            return state.slots[node].left;
546
1.88k
        }
547
9.81k
        state.slots[node].right = erase_worst(state, state.slots[node].right, removed);
548
9.81k
        return node;
549
11.6k
    }
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
11.3k
    static int32_t erase_worst(State& state, int32_t node, int32_t* removed) {
543
11.3k
        if (state.slots[node].right == State::NO_SLOT) {
544
1.72k
            *removed = node;
545
1.72k
            return state.slots[node].left;
546
1.72k
        }
547
9.58k
        state.slots[node].right = erase_worst(state, state.slots[node].right, removed);
548
9.58k
        return node;
549
11.3k
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE11erase_worstERNS_22AggregateTopKCountDataILS1_29EEEiPi
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
23
    static int32_t erase_worst(State& state, int32_t node, int32_t* removed) {
543
23
        if (state.slots[node].right == State::NO_SLOT) {
544
11
            *removed = node;
545
11
            return state.slots[node].left;
546
11
        }
547
12
        state.slots[node].right = erase_worst(state, state.slots[node].right, removed);
548
12
        return node;
549
23
    }
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
360
    static int32_t erase_worst(State& state, int32_t node, int32_t* removed) {
543
360
        if (state.slots[node].right == State::NO_SLOT) {
544
142
            *removed = node;
545
142
            return state.slots[node].left;
546
142
        }
547
218
        state.slots[node].right = erase_worst(state, state.slots[node].right, removed);
548
218
        return node;
549
360
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_29EEEiPi
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
1
    static int32_t erase_worst(State& state, int32_t node, int32_t* removed) {
543
1
        if (state.slots[node].right == State::NO_SLOT) {
544
1
            *removed = node;
545
1
            return state.slots[node].left;
546
1
        }
547
0
        state.slots[node].right = erase_worst(state, state.slots[node].right, removed);
548
0
        return node;
549
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_11EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_12EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_25EEEiPi
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE11erase_worstERNS_22AggregateTopKCountDataILS1_26EEEiPi
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
1.95k
    static void refresh_worst(State& state) {
552
1.95k
        int32_t node = state.root;
553
11.7k
        while (node != State::NO_SLOT && state.slots[node].right != State::NO_SLOT) {
554
9.82k
            node = state.slots[node].right;
555
9.82k
        }
556
1.95k
        state.worst = node;
557
1.95k
    }
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.77k
    static void refresh_worst(State& state) {
552
1.77k
        int32_t node = state.root;
553
11.3k
        while (node != State::NO_SLOT && state.slots[node].right != State::NO_SLOT) {
554
9.59k
            node = state.slots[node].right;
555
9.59k
        }
556
1.77k
        state.worst = node;
557
1.77k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_6EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_7EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_8EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_9EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_28EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_29EEE
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
16
    static void refresh_worst(State& state) {
552
16
        int32_t node = state.root;
553
32
        while (node != State::NO_SLOT && state.slots[node].right != State::NO_SLOT) {
554
16
            node = state.slots[node].right;
555
16
        }
556
16
        state.worst = node;
557
16
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_11EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_12EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_25EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE13refresh_worstERNS_22AggregateTopKCountDataILS1_26EEE
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
162
    static void refresh_worst(State& state) {
552
162
        int32_t node = state.root;
553
380
        while (node != State::NO_SLOT && state.slots[node].right != State::NO_SLOT) {
554
218
            node = state.slots[node].right;
555
218
        }
556
162
        state.worst = node;
557
162
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_6EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_7EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_8EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_9EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_28EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_29EEE
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
1
    static void refresh_worst(State& state) {
552
1
        int32_t node = state.root;
553
2
        while (node != State::NO_SLOT && state.slots[node].right != State::NO_SLOT) {
554
1
            node = state.slots[node].right;
555
1
        }
556
1
        state.worst = node;
557
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_11EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_12EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_25EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE13refresh_worstERNS_22AggregateTopKCountDataILS1_26EEE
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
6
    static int32_t best_slot(const State& state) {
561
6
        int32_t node = state.root;
562
9
        while (node != State::NO_SLOT && state.slots[node].left != State::NO_SLOT) {
563
3
            node = state.slots[node].left;
564
3
        }
565
6
        return node;
566
6
    }
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
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_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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_29EEE
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
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_13PrimitiveTypeE11ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_11EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_12EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_25EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE9best_slotERKNS_22AggregateTopKCountDataILS1_26EEE
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
2
    static int32_t best_slot(const State& state) {
561
2
        int32_t node = state.root;
562
2
        while (node != State::NO_SLOT && state.slots[node].left != State::NO_SLOT) {
563
0
            node = state.slots[node].left;
564
0
        }
565
2
        return node;
566
2
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_29EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_20EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_30EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_35EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_10EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_11EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_12EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_25EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE9best_slotERKNS_22AggregateTopKCountDataILS1_26EEE
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
121
    static void collect_in_order(const State& state, DorisVector<int32_t>& slots) {
570
121
        slots.reserve(static_cast<size_t>(state.live));
571
121
        DorisVector<int32_t> stack;
572
121
        stack.reserve(64);
573
121
        int32_t node = state.root;
574
2.76k
        while (node != State::NO_SLOT || !stack.empty()) {
575
5.28k
            while (node != State::NO_SLOT) {
576
2.64k
                stack.push_back(node);
577
2.64k
                node = state.slots[node].left;
578
2.64k
            }
579
2.64k
            node = stack.back();
580
2.64k
            stack.pop_back();
581
            // Only live slots are reachable from the root; an evicted slot has no row count.
582
2.64k
            DCHECK_GE(state.slots[node].count, 0);
583
2.64k
            slots.push_back(node);
584
2.64k
            node = state.slots[node].right;
585
2.64k
        }
586
121
        DCHECK_EQ(static_cast<int64_t>(slots.size()), state.live);
587
121
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_2EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_3EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_4EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_5EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Line
Count
Source
569
70
    static void collect_in_order(const State& state, DorisVector<int32_t>& slots) {
570
70
        slots.reserve(static_cast<size_t>(state.live));
571
70
        DorisVector<int32_t> stack;
572
70
        stack.reserve(64);
573
70
        int32_t node = state.root;
574
1.99k
        while (node != State::NO_SLOT || !stack.empty()) {
575
3.85k
            while (node != State::NO_SLOT) {
576
1.92k
                stack.push_back(node);
577
1.92k
                node = state.slots[node].left;
578
1.92k
            }
579
1.92k
            node = stack.back();
580
1.92k
            stack.pop_back();
581
            // Only live slots are reachable from the root; an evicted slot has no row count.
582
1.92k
            DCHECK_GE(state.slots[node].count, 0);
583
1.92k
            slots.push_back(node);
584
1.92k
            node = state.slots[node].right;
585
1.92k
        }
586
        DCHECK_EQ(static_cast<int64_t>(slots.size()), state.live);
587
70
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_9EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_28EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_29EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
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
17
    static void collect_in_order(const State& state, DorisVector<int32_t>& slots) {
570
17
        slots.reserve(static_cast<size_t>(state.live));
571
17
        DorisVector<int32_t> stack;
572
17
        stack.reserve(64);
573
17
        int32_t node = state.root;
574
89
        while (node != State::NO_SLOT || !stack.empty()) {
575
144
            while (node != State::NO_SLOT) {
576
72
                stack.push_back(node);
577
72
                node = state.slots[node].left;
578
72
            }
579
72
            node = stack.back();
580
72
            stack.pop_back();
581
            // Only live slots are reachable from the root; an evicted slot has no row count.
582
72
            DCHECK_GE(state.slots[node].count, 0);
583
72
            slots.push_back(node);
584
72
            node = state.slots[node].right;
585
72
        }
586
        DCHECK_EQ(static_cast<int64_t>(slots.size()), state.live);
587
17
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_26EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
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
33
    static void collect_in_order(const State& state, DorisVector<int32_t>& slots) {
570
33
        slots.reserve(static_cast<size_t>(state.live));
571
33
        DorisVector<int32_t> stack;
572
33
        stack.reserve(64);
573
33
        int32_t node = state.root;
574
677
        while (node != State::NO_SLOT || !stack.empty()) {
575
1.28k
            while (node != State::NO_SLOT) {
576
644
                stack.push_back(node);
577
644
                node = state.slots[node].left;
578
644
            }
579
644
            node = stack.back();
580
644
            stack.pop_back();
581
            // Only live slots are reachable from the root; an evicted slot has no row count.
582
644
            DCHECK_GE(state.slots[node].count, 0);
583
644
            slots.push_back(node);
584
644
            node = state.slots[node].right;
585
644
        }
586
        DCHECK_EQ(static_cast<int64_t>(slots.size()), state.live);
587
33
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_9EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_28EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_29EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
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
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
3
        while (node != State::NO_SLOT || !stack.empty()) {
575
4
            while (node != State::NO_SLOT) {
576
2
                stack.push_back(node);
577
2
                node = state.slots[node].left;
578
2
            }
579
2
            node = stack.back();
580
2
            stack.pop_back();
581
            // Only live slots are reachable from the root; an evicted slot has no row count.
582
2
            DCHECK_GE(state.slots[node].count, 0);
583
2
            slots.push_back(node);
584
2
            node = state.slots[node].right;
585
2
        }
586
        DCHECK_EQ(static_cast<int64_t>(slots.size()), state.live);
587
1
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE16collect_in_orderERKNS_22AggregateTopKCountDataILS1_26EEERSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
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
75
    static void assign_sorted(State& state, DorisVector<Entry> values) {
592
75
        const size_t size = values.size();
593
75
        check_slot_capacity(size);
594
75
        state.slots.assign(size, Slot {});
595
1.46k
        for (size_t slot = 0; slot != size; ++slot) {
596
1.39k
            state.slots[slot].count = values[slot].count;
597
1.39k
        }
598
75
        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
5
            PaddedPODArray<char, 32> bytes;
602
5
            size_t live_bytes = 0;
603
39
            for (size_t slot = 0; slot != size; ++slot) {
604
34
                const StringRef value = values[slot].value;
605
34
                Payload& payload = state.slots[slot].payload;
606
34
                payload.offset = bytes.size();
607
34
                payload.length = value.size;
608
34
                if (value.size != 0) {
609
34
                    bytes.insert(value.data, value.data + value.size);
610
34
                }
611
34
                live_bytes += value.size;
612
34
            }
613
5
            state.bytes.swap(bytes);
614
5
            state.live_payload_bytes = live_bytes;
615
5
            state.dead_payload_bytes = 0;
616
70
        } else {
617
1.43k
            for (size_t slot = 0; slot != size; ++slot) {
618
1.36k
                state.slots[slot].payload = values[slot].value;
619
1.36k
            }
620
70
        }
621
75
        state.live = static_cast<uint32_t>(size);
622
75
        state.dead = 0;
623
75
        DorisVector<int32_t> stack;
624
75
        stack.reserve(size);
625
1.46k
        for (size_t slot = 0; slot != size; ++slot) {
626
1.39k
            state.slots[slot].priority = next_priority(state);
627
1.39k
            int32_t last = State::NO_SLOT;
628
2.61k
            while (!stack.empty() &&
629
2.61k
                   state.slots[stack.back()].priority < state.slots[slot].priority) {
630
1.22k
                last = stack.back();
631
1.22k
                stack.pop_back();
632
1.22k
            }
633
1.39k
            state.slots[slot].left = last;
634
1.39k
            if (!stack.empty()) {
635
1.23k
                state.slots[stack.back()].right = static_cast<int32_t>(slot);
636
1.23k
            }
637
1.39k
            stack.push_back(static_cast<int32_t>(slot));
638
1.39k
        }
639
75
        state.root = stack.empty() ? State::NO_SLOT : stack.front();
640
75
        refresh_worst(state);
641
75
    }
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
50
    static void assign_sorted(State& state, DorisVector<Entry> values) {
592
50
        const size_t size = values.size();
593
50
        check_slot_capacity(size);
594
50
        state.slots.assign(size, Slot {});
595
1.30k
        for (size_t slot = 0; slot != size; ++slot) {
596
1.25k
            state.slots[slot].count = values[slot].count;
597
1.25k
        }
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
50
        } else {
617
1.30k
            for (size_t slot = 0; slot != size; ++slot) {
618
1.25k
                state.slots[slot].payload = values[slot].value;
619
1.25k
            }
620
50
        }
621
50
        state.live = static_cast<uint32_t>(size);
622
50
        state.dead = 0;
623
50
        DorisVector<int32_t> stack;
624
50
        stack.reserve(size);
625
1.30k
        for (size_t slot = 0; slot != size; ++slot) {
626
1.25k
            state.slots[slot].priority = next_priority(state);
627
1.25k
            int32_t last = State::NO_SLOT;
628
2.38k
            while (!stack.empty() &&
629
2.38k
                   state.slots[stack.back()].priority < state.slots[slot].priority) {
630
1.13k
                last = stack.back();
631
1.13k
                stack.pop_back();
632
1.13k
            }
633
1.25k
            state.slots[slot].left = last;
634
1.25k
            if (!stack.empty()) {
635
1.15k
                state.slots[stack.back()].right = static_cast<int32_t>(slot);
636
1.15k
            }
637
1.25k
            stack.push_back(static_cast<int32_t>(slot));
638
1.25k
        }
639
50
        state.root = stack.empty() ? State::NO_SLOT : stack.front();
640
50
        refresh_worst(state);
641
50
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_9EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_28EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_29EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
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
5
    static void assign_sorted(State& state, DorisVector<Entry> values) {
592
5
        const size_t size = values.size();
593
5
        check_slot_capacity(size);
594
5
        state.slots.assign(size, Slot {});
595
39
        for (size_t slot = 0; slot != size; ++slot) {
596
34
            state.slots[slot].count = values[slot].count;
597
34
        }
598
5
        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
5
            PaddedPODArray<char, 32> bytes;
602
5
            size_t live_bytes = 0;
603
39
            for (size_t slot = 0; slot != size; ++slot) {
604
34
                const StringRef value = values[slot].value;
605
34
                Payload& payload = state.slots[slot].payload;
606
34
                payload.offset = bytes.size();
607
34
                payload.length = value.size;
608
34
                if (value.size != 0) {
609
34
                    bytes.insert(value.data, value.data + value.size);
610
34
                }
611
34
                live_bytes += value.size;
612
34
            }
613
5
            state.bytes.swap(bytes);
614
5
            state.live_payload_bytes = live_bytes;
615
5
            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
5
        state.live = static_cast<uint32_t>(size);
622
5
        state.dead = 0;
623
5
        DorisVector<int32_t> stack;
624
5
        stack.reserve(size);
625
39
        for (size_t slot = 0; slot != size; ++slot) {
626
34
            state.slots[slot].priority = next_priority(state);
627
34
            int32_t last = State::NO_SLOT;
628
61
            while (!stack.empty() &&
629
61
                   state.slots[stack.back()].priority < state.slots[slot].priority) {
630
27
                last = stack.back();
631
27
                stack.pop_back();
632
27
            }
633
34
            state.slots[slot].left = last;
634
34
            if (!stack.empty()) {
635
18
                state.slots[stack.back()].right = static_cast<int32_t>(slot);
636
18
            }
637
34
            stack.push_back(static_cast<int32_t>(slot));
638
34
        }
639
5
        state.root = stack.empty() ? State::NO_SLOT : stack.front();
640
5
        refresh_worst(state);
641
5
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE13assign_sortedERNS_22AggregateTopKCountDataILS1_26EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
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
20
    static void assign_sorted(State& state, DorisVector<Entry> values) {
592
20
        const size_t size = values.size();
593
20
        check_slot_capacity(size);
594
20
        state.slots.assign(size, Slot {});
595
129
        for (size_t slot = 0; slot != size; ++slot) {
596
109
            state.slots[slot].count = values[slot].count;
597
109
        }
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
20
        } else {
617
129
            for (size_t slot = 0; slot != size; ++slot) {
618
109
                state.slots[slot].payload = values[slot].value;
619
109
            }
620
20
        }
621
20
        state.live = static_cast<uint32_t>(size);
622
20
        state.dead = 0;
623
20
        DorisVector<int32_t> stack;
624
20
        stack.reserve(size);
625
129
        for (size_t slot = 0; slot != size; ++slot) {
626
109
            state.slots[slot].priority = next_priority(state);
627
109
            int32_t last = State::NO_SLOT;
628
175
            while (!stack.empty() &&
629
175
                   state.slots[stack.back()].priority < state.slots[slot].priority) {
630
66
                last = stack.back();
631
66
                stack.pop_back();
632
66
            }
633
109
            state.slots[slot].left = last;
634
109
            if (!stack.empty()) {
635
62
                state.slots[stack.back()].right = static_cast<int32_t>(slot);
636
62
            }
637
109
            stack.push_back(static_cast<int32_t>(slot));
638
109
        }
639
20
        state.root = stack.empty() ? State::NO_SLOT : stack.front();
640
20
        refresh_worst(state);
641
20
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_9EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_28EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_29EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_10EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE13assign_sortedERNS_22AggregateTopKCountDataILS1_26EEESt6vectorINS4_5EntryENS_18CustomStdAllocatorIS7_NS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEE
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
62
    static void compact(State& state) {
646
62
        DorisVector<int32_t> slots;
647
62
        collect_in_order(state, slots);
648
62
        DorisVector<Entry> values;
649
62
        values.reserve(slots.size());
650
1.30k
        for (int32_t slot : slots) {
651
1.30k
            values.push_back(Entry {value_of(state, slot), state.slots[slot].count});
652
1.30k
        }
653
62
        assign_sorted(state, std::move(values));
654
62
    }
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
17
    static void compact(State& state) {
646
17
        DorisVector<int32_t> slots;
647
17
        collect_in_order(state, slots);
648
17
        DorisVector<Entry> values;
649
17
        values.reserve(slots.size());
650
103
        for (int32_t slot : slots) {
651
103
            values.push_back(Entry {value_of(state, slot), state.slots[slot].count});
652
103
        }
653
17
        assign_sorted(state, std::move(values));
654
17
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE7compactERNS_22AggregateTopKCountDataILS1_29EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE7compactERNS_22AggregateTopKCountDataILS1_20EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE7compactERNS_22AggregateTopKCountDataILS1_30EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE7compactERNS_22AggregateTopKCountDataILS1_35EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE7compactERNS_22AggregateTopKCountDataILS1_10EEE
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.1k
    static void maybe_compact(State& state) {
660
22.1k
        if (state.dead > state.live || evicted_payload_exceeds_live(state)) {
661
62
            compact(state);
662
62
        }
663
22.1k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_2EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_3EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_4EEE
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_5EEE
Line
Count
Source
659
11.9k
    static void maybe_compact(State& state) {
660
11.9k
        if (state.dead > state.live || evicted_payload_exceeds_live(state)) {
661
42
            compact(state);
662
42
        }
663
11.9k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_6EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_7EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_8EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_9EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_28EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_29EEE
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
60
    static void maybe_compact(State& state) {
660
60
        if (state.dead > state.live || evicted_payload_exceeds_live(state)) {
661
3
            compact(state);
662
3
        }
663
60
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_11EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_12EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_25EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE13maybe_compactERNS_22AggregateTopKCountDataILS1_26EEE
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.1k
    static void maybe_compact(State& state) {
660
10.1k
        if (state.dead > state.live || evicted_payload_exceeds_live(state)) {
661
17
            compact(state);
662
17
        }
663
10.1k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_6EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_7EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_8EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_9EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_28EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_29EEE
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
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_13PrimitiveTypeE11ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_11EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_12EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_25EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE13maybe_compactERNS_22AggregateTopKCountDataILS1_26EEE
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.2k
    static void check_k(State& state, const IColumn& count_column, size_t row_num) {
666
20.2k
        const IColumn* nested = &count_column;
667
20.2k
        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
20.2k
        int64_t value =
676
20.2k
                assert_cast<const ColumnInt64&, TypeCheckOnRelease::DISABLE>(*nested).get_element(
677
20.2k
                        row_num);
678
20.2k
        if (state.k == State::NO_K) {
679
46
            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
46
            state.k = value;
686
20.2k
        } else {
687
            // k comes from the same constant expression on every row and every partial state.
688
20.2k
            DCHECK_EQ(state.k, value);
689
20.2k
        }
690
20.2k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_2EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_3EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_4EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE7check_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
17
            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
17
            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_13PrimitiveTypeE6ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_6EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_7EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_8EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_9EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_28EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_29EEERKNS_7IColumnEm
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
49
    static void check_k(State& state, const IColumn& count_column, size_t row_num) {
666
49
        const IColumn* nested = &count_column;
667
49
        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
49
        int64_t value =
676
49
                assert_cast<const ColumnInt64&, TypeCheckOnRelease::DISABLE>(*nested).get_element(
677
49
                        row_num);
678
49
        if (state.k == State::NO_K) {
679
17
            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
17
            state.k = value;
686
32
        } else {
687
            // k comes from the same constant expression on every row and every partial state.
688
            DCHECK_EQ(state.k, value);
689
32
        }
690
49
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_11EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_12EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_25EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE7check_kERNS_22AggregateTopKCountDataILS1_26EEERKNS_7IColumnEm
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.0k
    static void check_k(State& state, const IColumn& count_column, size_t row_num) {
666
10.0k
        const IColumn* nested = &count_column;
667
10.0k
        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
10.0k
        int64_t value =
676
10.0k
                assert_cast<const ColumnInt64&, TypeCheckOnRelease::DISABLE>(*nested).get_element(
677
10.0k
                        row_num);
678
10.0k
        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
10.0k
        } else {
687
            // k comes from the same constant expression on every row and every partial state.
688
            DCHECK_EQ(state.k, value);
689
10.0k
        }
690
10.0k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_6EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_7EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_8EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_9EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_28EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_29EEERKNS_7IColumnEm
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
4
    static void check_k(State& state, const IColumn& count_column, size_t row_num) {
666
4
        const IColumn* nested = &count_column;
667
4
        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
4
        int64_t value =
676
4
                assert_cast<const ColumnInt64&, TypeCheckOnRelease::DISABLE>(*nested).get_element(
677
4
                        row_num);
678
4
        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
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
4
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_11EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_12EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_25EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE7check_kERNS_22AggregateTopKCountDataILS1_26EEERKNS_7IColumnEm
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
16
    static int64_t checked_add(int64_t lhs, int64_t rhs) {
693
16
        int64_t result = 0;
694
16
        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
15
        return result;
698
16
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE11checked_addEll
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE11checked_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
1
            throw Exception(ErrorCode::INVALID_ARGUMENT, "min_topk/max_topk value count overflow");
696
1
        }
697
6
        return result;
698
7
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb1EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb1EE11checked_addEll
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb1EE11checked_addEll
Line
Count
Source
692
5
    static int64_t checked_add(int64_t lhs, int64_t rhs) {
693
5
        int64_t result = 0;
694
5
        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
5
        return result;
698
5
    }
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
4
    static int64_t checked_add(int64_t lhs, int64_t rhs) {
693
4
        int64_t result = 0;
694
4
        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
4
        return result;
698
4
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE11checked_addEll
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE11checked_addEll
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.2k
    static void add_value(State& state, const IColumn& column, size_t row_num) {
702
20.2k
        if (state.k == 0) {
703
7
            if (state.live == 0) {
704
3
                state.root = append_slot(state, column, row_num, 1);
705
3
                state.worst = state.root;
706
3
                return;
707
3
            }
708
4
            int cmp = compare_values(value_at(column, row_num), value_of(state, 0));
709
4
            if (cmp == 0) {
710
0
                state.slots[0].count = checked_add(state.slots[0].count, 1);
711
4
            } 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
2
                replace_value(state, 0, value_at(column, row_num));
715
2
                state.slots[0].count = 1;
716
2
            }
717
4
            return;
718
7
        }
719
720
        // Dead slots and evicted payload are reclaimed once they outnumber the live ones.
721
20.2k
        maybe_compact(state);
722
723
20.2k
        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.0k
            int cmp = compare_values(value_at(column, row_num), value_of(state, state.worst));
727
19.0k
            if (cmp == 0) {
728
4
                state.slots[state.worst].count = checked_add(state.slots[state.worst].count, 1);
729
4
                return;
730
4
            }
731
19.0k
            if (is_worse(cmp)) {
732
17.1k
                return;
733
17.1k
            }
734
19.0k
        }
735
736
3.06k
        int32_t inserted = State::NO_SLOT;
737
3.06k
        state.root = add_or_increment(state, state.root, value_at(column, row_num), 1, &inserted);
738
3.06k
        if (inserted == State::NO_SLOT) {
739
8
            return;
740
8
        }
741
3.06k
        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.17k
            if (state.worst == State::NO_SLOT ||
745
1.17k
                is_worse(compare_slots(state, inserted, state.worst))) {
746
641
                state.worst = inserted;
747
641
            }
748
1.17k
            return;
749
1.17k
        }
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.88k
        int32_t removed = State::NO_SLOT;
753
1.88k
        state.root = erase_worst(state, state.root, &removed);
754
1.88k
        DCHECK_EQ(removed, state.worst);
755
1.88k
        evict_value(state, removed);
756
1.88k
        state.slots[removed].count = State::DEAD_COUNT;
757
1.88k
        --state.live;
758
1.88k
        ++state.dead;
759
1.88k
        refresh_worst(state);
760
1.88k
        maybe_compact(state);
761
1.88k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_2EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_3EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_4EEERKNS_7IColumnEm
_ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE9add_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
4
            if (state.live == 0) {
704
2
                state.root = append_slot(state, column, row_num, 1);
705
2
                state.worst = state.root;
706
2
                return;
707
2
            }
708
2
            int cmp = compare_values(value_at(column, row_num), value_of(state, 0));
709
2
            if (cmp == 0) {
710
0
                state.slots[0].count = checked_add(state.slots[0].count, 1);
711
2
            } 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
2
            return;
718
4
        }
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.58k
            int cmp = compare_values(value_at(column, row_num), value_of(state, state.worst));
727
9.58k
            if (cmp == 0) {
728
2
                state.slots[state.worst].count = checked_add(state.slots[state.worst].count, 1);
729
2
                return;
730
2
            }
731
9.58k
            if (is_worse(cmp)) {
732
7.84k
                return;
733
7.84k
            }
734
9.58k
        }
735
736
2.34k
        int32_t inserted = State::NO_SLOT;
737
2.34k
        state.root = add_or_increment(state, state.root, value_at(column, row_num), 1, &inserted);
738
2.34k
        if (inserted == State::NO_SLOT) {
739
4
            return;
740
4
        }
741
2.33k
        if (state.live <= state.k) {
742
            // Not over capacity: the new entry competes with the cached worst for the eviction
743
            // candidate role.
744
607
            if (state.worst == State::NO_SLOT ||
745
607
                is_worse(compare_slots(state, inserted, state.worst))) {
746
91
                state.worst = inserted;
747
91
            }
748
607
            return;
749
607
        }
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.72k
        int32_t removed = State::NO_SLOT;
753
1.72k
        state.root = erase_worst(state, state.root, &removed);
754
        DCHECK_EQ(removed, state.worst);
755
1.72k
        evict_value(state, removed);
756
1.72k
        state.slots[removed].count = State::DEAD_COUNT;
757
1.72k
        --state.live;
758
1.72k
        ++state.dead;
759
1.72k
        refresh_worst(state);
760
1.72k
        maybe_compact(state);
761
1.72k
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_6EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_7EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_8EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_9EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_28EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_29EEERKNS_7IColumnEm
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
49
    static void add_value(State& state, const IColumn& column, size_t row_num) {
702
49
        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
49
        maybe_compact(state);
722
723
49
        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
13
            int cmp = compare_values(value_at(column, row_num), value_of(state, state.worst));
727
13
            if (cmp == 0) {
728
1
                state.slots[state.worst].count = checked_add(state.slots[state.worst].count, 1);
729
1
                return;
730
1
            }
731
12
            if (is_worse(cmp)) {
732
1
                return;
733
1
            }
734
12
        }
735
736
47
        int32_t inserted = State::NO_SLOT;
737
47
        state.root = add_or_increment(state, state.root, value_at(column, row_num), 1, &inserted);
738
47
        if (inserted == State::NO_SLOT) {
739
1
            return;
740
1
        }
741
46
        if (state.live <= state.k) {
742
            // Not over capacity: the new entry competes with the cached worst for the eviction
743
            // candidate role.
744
36
            if (state.worst == State::NO_SLOT ||
745
36
                is_worse(compare_slots(state, inserted, state.worst))) {
746
35
                state.worst = inserted;
747
35
            }
748
36
            return;
749
36
        }
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
10
        int32_t removed = State::NO_SLOT;
753
10
        state.root = erase_worst(state, state.root, &removed);
754
        DCHECK_EQ(removed, state.worst);
755
10
        evict_value(state, removed);
756
10
        state.slots[removed].count = State::DEAD_COUNT;
757
10
        --state.live;
758
10
        ++state.dead;
759
10
        refresh_worst(state);
760
10
        maybe_compact(state);
761
10
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_11EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_12EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_25EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE9add_valueERNS_22AggregateTopKCountDataILS1_26EEERKNS_7IColumnEm
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.0k
    static void add_value(State& state, const IColumn& column, size_t row_num) {
702
10.0k
        if (state.k == 0) {
703
3
            if (state.live == 0) {
704
1
                state.root = append_slot(state, column, row_num, 1);
705
1
                state.worst = state.root;
706
1
                return;
707
1
            }
708
2
            int cmp = compare_values(value_at(column, row_num), value_of(state, 0));
709
2
            if (cmp == 0) {
710
0
                state.slots[0].count = checked_add(state.slots[0].count, 1);
711
2
            } 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
2
            return;
718
3
        }
719
720
        // Dead slots and evicted payload are reclaimed once they outnumber the live ones.
721
10.0k
        maybe_compact(state);
722
723
10.0k
        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.48k
            int cmp = compare_values(value_at(column, row_num), value_of(state, state.worst));
727
9.48k
            if (cmp == 0) {
728
1
                state.slots[state.worst].count = checked_add(state.slots[state.worst].count, 1);
729
1
                return;
730
1
            }
731
9.48k
            if (is_worse(cmp)) {
732
9.33k
                return;
733
9.33k
            }
734
9.48k
        }
735
736
679
        int32_t inserted = State::NO_SLOT;
737
679
        state.root = add_or_increment(state, state.root, value_at(column, row_num), 1, &inserted);
738
679
        if (inserted == State::NO_SLOT) {
739
3
            return;
740
3
        }
741
676
        if (state.live <= state.k) {
742
            // Not over capacity: the new entry competes with the cached worst for the eviction
743
            // candidate role.
744
534
            if (state.worst == State::NO_SLOT ||
745
534
                is_worse(compare_slots(state, inserted, state.worst))) {
746
513
                state.worst = inserted;
747
513
            }
748
534
            return;
749
534
        }
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
142
        int32_t removed = State::NO_SLOT;
753
142
        state.root = erase_worst(state, state.root, &removed);
754
        DCHECK_EQ(removed, state.worst);
755
142
        evict_value(state, removed);
756
142
        state.slots[removed].count = State::DEAD_COUNT;
757
142
        --state.live;
758
142
        ++state.dead;
759
142
        refresh_worst(state);
760
142
        maybe_compact(state);
761
142
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_6EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_7EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_8EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_9EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_28EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_29EEERKNS_7IColumnEm
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
4
    static void add_value(State& state, const IColumn& column, size_t row_num) {
702
4
        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
4
        maybe_compact(state);
722
723
4
        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
2
            int cmp = compare_values(value_at(column, row_num), value_of(state, state.worst));
727
2
            if (cmp == 0) {
728
0
                state.slots[state.worst].count = checked_add(state.slots[state.worst].count, 1);
729
0
                return;
730
0
            }
731
2
            if (is_worse(cmp)) {
732
1
                return;
733
1
            }
734
2
        }
735
736
3
        int32_t inserted = State::NO_SLOT;
737
3
        state.root = add_or_increment(state, state.root, value_at(column, row_num), 1, &inserted);
738
3
        if (inserted == State::NO_SLOT) {
739
0
            return;
740
0
        }
741
3
        if (state.live <= state.k) {
742
            // Not over capacity: the new entry competes with the cached worst for the eviction
743
            // candidate role.
744
2
            if (state.worst == State::NO_SLOT ||
745
2
                is_worse(compare_slots(state, inserted, state.worst))) {
746
2
                state.worst = inserted;
747
2
            }
748
2
            return;
749
2
        }
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
        int32_t removed = State::NO_SLOT;
753
1
        state.root = erase_worst(state, state.root, &removed);
754
        DCHECK_EQ(removed, state.worst);
755
1
        evict_value(state, removed);
756
1
        state.slots[removed].count = State::DEAD_COUNT;
757
1
        --state.live;
758
1
        ++state.dead;
759
1
        refresh_worst(state);
760
1
        maybe_compact(state);
761
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_11EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_12EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_25EEERKNS_7IColumnEm
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE9add_valueERNS_22AggregateTopKCountDataILS1_26EEERKNS_7IColumnEm
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
0
    static void merge_extreme(State& state, const State& other) {
765
0
        if (other.live == 0) {
766
0
            return;
767
0
        }
768
0
        if (state.live == 0) {
769
0
            state.root = append_slot(state, value_of(other, 0), other.slots[0].count);
770
0
            state.worst = state.root;
771
0
            return;
772
0
        }
773
0
        int cmp = compare_values(value_of(state, 0), value_of(other, 0));
774
0
        if (cmp == 0) {
775
0
            state.slots[0].count = checked_add(state.slots[0].count, other.slots[0].count);
776
0
        } 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
0
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE2ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_2EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE3ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_3EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE4ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_4EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb1EE13merge_extremeERNS_22AggregateTopKCountDataILS1_5EEERKS4_
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_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE13merge_extremeERNS_22AggregateTopKCountDataILS1_5EEERKS4_
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
12
    static void merge_values(State& state, const State& other) {
789
12
        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
12
        if (other.live == 1) {
799
6
            const int32_t other_only = other.root;
800
6
            ValueRef value = value_of(other, other_only);
801
6
            if (state.live >= state.k &&
802
6
                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
5
            int32_t inserted = State::NO_SLOT;
807
5
            state.root = add_or_increment(state, state.root, value, other.slots[other_only].count,
808
5
                                          &inserted);
809
5
            if (inserted == State::NO_SLOT) {
810
2
                return;
811
2
            }
812
3
            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
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
3
        }
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
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
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
6
        }
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_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
3
    static void merge_values(State& state, const State& other) {
789
3
        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
3
        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
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
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
1
        }
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
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
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_13PrimitiveTypeE6ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_6EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_7EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_8EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_9EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_28EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_29EEERKS4_
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
7
    static void merge_values(State& state, const State& other) {
789
7
        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
7
        if (other.live == 1) {
799
5
            const int32_t other_only = other.root;
800
5
            ValueRef value = value_of(other, other_only);
801
5
            if (state.live >= state.k &&
802
5
                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
4
            int32_t inserted = State::NO_SLOT;
807
4
            state.root = add_or_increment(state, state.root, value, other.slots[other_only].count,
808
4
                                          &inserted);
809
4
            if (inserted == State::NO_SLOT) {
810
2
                return;
811
2
            }
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
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
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
2
        }
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
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
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
2
        }
852
1
        DorisVector<int32_t> lhs_slots;
853
1
        DorisVector<int32_t> rhs_slots;
854
1
        collect_in_order(state, lhs_slots);
855
1
        collect_in_order(other, rhs_slots);
856
1
        DorisVector<Entry> merged;
857
1
        merge_sorted_slots(state, lhs_slots, other, rhs_slots, static_cast<size_t>(state.k),
858
1
                           merged);
859
1
        check_slot_capacity(merged.size());
860
1
        assign_sorted(state, std::move(merged));
861
1
    }
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_11EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_12EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_25EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE12merge_valuesERNS_22AggregateTopKCountDataILS1_26EEERKS4_
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
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
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
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_13PrimitiveTypeE6ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_6EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_7EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_8EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_9EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_28EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_29EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_20EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_30EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_35EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_10EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_11EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_12EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_25EEERKS4_
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE12merge_valuesERNS_22AggregateTopKCountDataILS1_26EEERKS4_
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
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
0
                merged.push_back(Entry {value_of(other, rhs_slots[rhs_index]),
880
0
                                        other.slots[rhs_slots[rhs_index]].count});
881
0
                ++rhs_index;
882
10
            } else {
883
10
                ValueRef lhs_value = value_of(state, lhs_slots[lhs_index]);
884
10
                ValueRef rhs_value = value_of(other, rhs_slots[rhs_index]);
885
10
                int cmp = compare_values(lhs_value, rhs_value);
886
                // Both lists are ordered best-first (ascending for MIN, descending for MAX).
887
10
                const bool lhs_is_better = comes_before(cmp);
888
10
                if (lhs_is_better) {
889
5
                    merged.push_back(Entry {lhs_value, state.slots[lhs_slots[lhs_index]].count});
890
5
                    ++lhs_index;
891
5
                } else if (cmp != 0) {
892
                    // Not better and not equal: the right-hand value is better.
893
5
                    merged.push_back(Entry {rhs_value, other.slots[rhs_slots[rhs_index]].count});
894
5
                    ++rhs_index;
895
5
                } 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
10
            }
903
10
        }
904
5
    }
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
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
6
        while (merged.size() < limit &&
873
6
               (lhs_index < lhs_slots.size() || rhs_index < rhs_slots.size())) {
874
4
            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
4
            } else if (lhs_index == lhs_slots.size()) {
879
0
                merged.push_back(Entry {value_of(other, rhs_slots[rhs_index]),
880
0
                                        other.slots[rhs_slots[rhs_index]].count});
881
0
                ++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
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
4
        }
904
2
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_9EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_28EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_29EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
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
1
                                   size_t limit, DorisVector<Entry>& merged) {
869
1
        merged.reserve(std::min(limit, lhs_slots.size() + rhs_slots.size()));
870
1
        size_t lhs_index = 0;
871
1
        size_t rhs_index = 0;
872
3
        while (merged.size() < limit &&
873
3
               (lhs_index < lhs_slots.size() || rhs_index < rhs_slots.size())) {
874
2
            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
2
            } else if (lhs_index == lhs_slots.size()) {
879
0
                merged.push_back(Entry {value_of(other, rhs_slots[rhs_index]),
880
0
                                        other.slots[rhs_slots[rhs_index]].count});
881
0
                ++rhs_index;
882
2
            } else {
883
2
                ValueRef lhs_value = value_of(state, lhs_slots[lhs_index]);
884
2
                ValueRef rhs_value = value_of(other, rhs_slots[rhs_index]);
885
2
                int cmp = compare_values(lhs_value, rhs_value);
886
                // Both lists are ordered best-first (ascending for MIN, descending for MAX).
887
2
                const bool lhs_is_better = comes_before(cmp);
888
2
                if (lhs_is_better) {
889
1
                    merged.push_back(Entry {lhs_value, state.slots[lhs_slots[lhs_index]].count});
890
1
                    ++lhs_index;
891
1
                } 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
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
2
            }
903
2
        }
904
1
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_26EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
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
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
6
        while (merged.size() < limit &&
873
6
               (lhs_index < lhs_slots.size() || rhs_index < rhs_slots.size())) {
874
4
            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
4
            } else if (lhs_index == lhs_slots.size()) {
879
0
                merged.push_back(Entry {value_of(other, rhs_slots[rhs_index]),
880
0
                                        other.slots[rhs_slots[rhs_index]].count});
881
0
                ++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
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
4
        }
904
2
    }
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_9EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_28EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_29EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_10EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
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
Unexecuted instantiation: _ZN5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE18merge_sorted_slotsERKNS_22AggregateTopKCountDataILS1_26EEERKSt6vectorIiNS_18CustomStdAllocatorIiNS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEEEEES6_SF_mRS7_INS4_5EntryENS8_ISG_SB_EEE
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
5
    void write_column(BufferWritable& buf, const IColumn& column) const {
911
5
        const auto value_type = remove_nullable(this->argument_types[0]);
912
5
        int64_t capacity =
913
5
                value_type->get_uncompressed_serialized_bytes(column, IAggregateFunction::version);
914
5
        buf.write_binary(capacity);
915
5
        buf.resize(capacity);
916
5
        auto* pos = value_type->serialize(column, buf.data(), IAggregateFunction::version);
917
5
        DCHECK_LE(pos, buf.data() + capacity);
918
5
        buf.add_offset(capacity);
919
5
    }
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
4
    void write_column(BufferWritable& buf, const IColumn& column) const {
911
4
        const auto value_type = remove_nullable(this->argument_types[0]);
912
4
        int64_t capacity =
913
4
                value_type->get_uncompressed_serialized_bytes(column, IAggregateFunction::version);
914
4
        buf.write_binary(capacity);
915
4
        buf.resize(capacity);
916
4
        auto* pos = value_type->serialize(column, buf.data(), IAggregateFunction::version);
917
        DCHECK_LE(pos, buf.data() + capacity);
918
4
        buf.add_offset(capacity);
919
4
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
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
1
    void write_column(BufferWritable& buf, const IColumn& column) const {
911
1
        const auto value_type = remove_nullable(this->argument_types[0]);
912
1
        int64_t capacity =
913
1
                value_type->get_uncompressed_serialized_bytes(column, IAggregateFunction::version);
914
1
        buf.write_binary(capacity);
915
1
        buf.resize(capacity);
916
1
        auto* pos = value_type->serialize(column, buf.data(), IAggregateFunction::version);
917
        DCHECK_LE(pos, buf.data() + capacity);
918
1
        buf.add_offset(capacity);
919
1
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
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
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE5ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE12write_columnERNS_14BufferWritableERKNS_7IColumnE
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
8
    MutableColumnPtr read_column(BufferReadable& buf) const {
922
8
        const auto value_type = remove_nullable(this->argument_types[0]);
923
8
        int64_t capacity = 0;
924
8
        buf.read_binary(capacity);
925
8
        MutableColumnPtr column = value_type->create_column();
926
8
        const auto* pos = value_type->deserialize(buf.data(), &column, IAggregateFunction::version);
927
        DCHECK_LE(pos, buf.data() + capacity);
928
8
        buf.add_offset(capacity);
929
8
        return column;
930
8
    }
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
6
    MutableColumnPtr read_column(BufferReadable& buf) const {
922
6
        const auto value_type = remove_nullable(this->argument_types[0]);
923
6
        int64_t capacity = 0;
924
6
        buf.read_binary(capacity);
925
6
        MutableColumnPtr column = value_type->create_column();
926
6
        const auto* pos = value_type->deserialize(buf.data(), &column, IAggregateFunction::version);
927
        DCHECK_LE(pos, buf.data() + capacity);
928
6
        buf.add_offset(capacity);
929
6
        return column;
930
6
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb1EE11read_columnERNS_14BufferReadableE
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
1
    MutableColumnPtr read_column(BufferReadable& buf) const {
922
1
        const auto value_type = remove_nullable(this->argument_types[0]);
923
1
        int64_t capacity = 0;
924
1
        buf.read_binary(capacity);
925
1
        MutableColumnPtr column = value_type->create_column();
926
1
        const auto* pos = value_type->deserialize(buf.data(), &column, IAggregateFunction::version);
927
        DCHECK_LE(pos, buf.data() + capacity);
928
1
        buf.add_offset(capacity);
929
1
        return column;
930
1
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb1EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb1EE11read_columnERNS_14BufferReadableE
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
1
    MutableColumnPtr read_column(BufferReadable& buf) const {
922
1
        const auto value_type = remove_nullable(this->argument_types[0]);
923
1
        int64_t capacity = 0;
924
1
        buf.read_binary(capacity);
925
1
        MutableColumnPtr column = value_type->create_column();
926
1
        const auto* pos = value_type->deserialize(buf.data(), &column, IAggregateFunction::version);
927
        DCHECK_LE(pos, buf.data() + capacity);
928
1
        buf.add_offset(capacity);
929
1
        return column;
930
1
    }
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE6ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE7ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE8ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE9ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE28ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE29ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE20ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE30ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE35ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE10ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE11ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE12ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE25ELb0EE11read_columnERNS_14BufferReadableE
Unexecuted instantiation: _ZNK5doris21AggregateFunctionTopKILNS_13PrimitiveTypeE26ELb0EE11read_columnERNS_14BufferReadableE
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