Coverage Report

Created: 2026-09-10 07:21

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/storage/segment/bitshuffle_page.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 <glog/logging.h>
21
22
#include <algorithm>
23
#include <cstddef>
24
#include <cstdint>
25
#include <cstring>
26
#include <ostream>
27
#include <type_traits>
28
29
#include "common/cast_set.h"
30
#include "common/compiler_util.h" // IWYU pragma: keep
31
#include "common/status.h"
32
#include "core/column/column.h"
33
#include "core/data_type/data_type.h"
34
#include "core/types.h"
35
#include "storage/olap_common.h"
36
#include "storage/segment/bitshuffle_wrapper.h"
37
#include "storage/segment/common.h"
38
#include "storage/segment/options.h"
39
#include "storage/segment/page_builder.h"
40
#include "storage/segment/page_decoder.h"
41
#include "storage/types.h"
42
#include "util/alignment.h"
43
#include "util/coding.h"
44
#include "util/faststring.h"
45
#include "util/slice.h"
46
47
namespace doris {
48
namespace segment_v2 {
49
50
enum { BITSHUFFLE_PAGE_HEADER_SIZE = 16 };
51
52
void warn_with_bitshuffle_error(int64_t val);
53
54
// BitshufflePageBuilder bitshuffles and compresses the bits of fixed
55
// size type blocks with lz4.
56
//
57
// The page format is as follows:
58
//
59
// 1. Header: (16 bytes total)
60
//
61
//    <num_elements> [32-bit]
62
//      The number of elements encoded in the page.
63
//
64
//    <compressed_size> [32-bit]
65
//      The post-compression size of the page, including this header.
66
//
67
//    <padded_num_elements> [32-bit]
68
//      Padding is needed to meet the requirements of the bitshuffle
69
//      library such that the input/output is a multiple of 8. Some
70
//      ignored elements are appended to the end of the page if necessary
71
//      to meet this requirement.
72
//
73
//      This header field is the post-padding element count.
74
//
75
//    <elem_size_bytes> [32-bit]
76
//      The size of the elements, in bytes, as actually encoded. In the
77
//      case that all of the data in a page can fit into a smaller
78
//      integer type, then we may choose to encode that smaller type
79
//      to save CPU costs.
80
//
81
//      This is currently only implemented in the UINT32 page type.
82
//
83
//   NOTE: all on-disk ints are encoded little-endian
84
//
85
// 2. Element data
86
//
87
//    The header is followed by the bitshuffle-compressed element data.
88
//
89
template <FieldType Type>
90
class BitshufflePageBuilder : public PageBuilderHelper<BitshufflePageBuilder<Type>> {
91
public:
92
    using Self = BitshufflePageBuilder<Type>;
93
    friend class PageBuilderHelper<Self>;
94
95
743k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
36.0k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
9.37k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
357k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
120k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
11.9k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
95
62.8k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
Line
Count
Source
95
1
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
95
6.40k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
95
7.48k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
335
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
37.5k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
95
44.1k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE4initEv
Line
Count
Source
95
338
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
432
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
95
7.47k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
336
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
95
9.67k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
95
12.0k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
95
16.9k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
95
1.20k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
95
714
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
95
710
    Status init() override { return reset(); }
96
97
140M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
38.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
9.41k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
140M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
343k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
11.7k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
63.2k
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12is_page_fullEv
Line
Count
Source
97
6.18k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
97
8.81k
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12is_page_fullEv
Line
Count
Source
97
351
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
44.5k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
43.9k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE12is_page_fullEv
Line
Count
Source
97
279
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
97
495
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
Line
Count
Source
97
7.61k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
97
243
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
97
5.16k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
24.2k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
97
17.9k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Line
Count
Source
97
1.38k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Line
Count
Source
97
616
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
97
628
    bool is_page_full() override { return _remain_element_capacity == 0; }
98
99
1.29M
    Status add(const uint8_t* vals, size_t* count) override {
100
1.29M
        return add_internal<false>(vals, count);
101
1.29M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
38.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
38.3k
        return add_internal<false>(vals, count);
101
38.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
9.41k
    Status add(const uint8_t* vals, size_t* count) override {
100
9.41k
        return add_internal<false>(vals, count);
101
9.41k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
99
662k
    Status add(const uint8_t* vals, size_t* count) override {
100
662k
        return add_internal<false>(vals, count);
101
662k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
343k
    Status add(const uint8_t* vals, size_t* count) override {
100
343k
        return add_internal<false>(vals, count);
101
343k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
11.7k
    Status add(const uint8_t* vals, size_t* count) override {
100
11.7k
        return add_internal<false>(vals, count);
101
11.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
63.2k
    Status add(const uint8_t* vals, size_t* count) override {
100
63.2k
        return add_internal<false>(vals, count);
101
63.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
99
6.18k
    Status add(const uint8_t* vals, size_t* count) override {
100
6.18k
        return add_internal<false>(vals, count);
101
6.18k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
99
8.81k
    Status add(const uint8_t* vals, size_t* count) override {
100
8.81k
        return add_internal<false>(vals, count);
101
8.81k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
351
    Status add(const uint8_t* vals, size_t* count) override {
100
351
        return add_internal<false>(vals, count);
101
351
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
44.5k
    Status add(const uint8_t* vals, size_t* count) override {
100
44.5k
        return add_internal<false>(vals, count);
101
44.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
43.9k
    Status add(const uint8_t* vals, size_t* count) override {
100
43.9k
        return add_internal<false>(vals, count);
101
43.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE3addEPKhPm
Line
Count
Source
99
279
    Status add(const uint8_t* vals, size_t* count) override {
100
279
        return add_internal<false>(vals, count);
101
279
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
99
495
    Status add(const uint8_t* vals, size_t* count) override {
100
495
        return add_internal<false>(vals, count);
101
495
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
Line
Count
Source
99
7.61k
    Status add(const uint8_t* vals, size_t* count) override {
100
7.61k
        return add_internal<false>(vals, count);
101
7.61k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
243
    Status add(const uint8_t* vals, size_t* count) override {
100
243
        return add_internal<false>(vals, count);
101
243
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
99
5.16k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.16k
        return add_internal<false>(vals, count);
101
5.16k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
24.2k
    Status add(const uint8_t* vals, size_t* count) override {
100
24.2k
        return add_internal<false>(vals, count);
101
24.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
99
17.9k
    Status add(const uint8_t* vals, size_t* count) override {
100
17.9k
        return add_internal<false>(vals, count);
101
17.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Line
Count
Source
99
1.38k
    Status add(const uint8_t* vals, size_t* count) override {
100
1.38k
        return add_internal<false>(vals, count);
101
1.38k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Line
Count
Source
99
616
    Status add(const uint8_t* vals, size_t* count) override {
100
616
        return add_internal<false>(vals, count);
101
616
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
99
628
    Status add(const uint8_t* vals, size_t* count) override {
100
628
        return add_internal<false>(vals, count);
101
628
    }
102
103
140M
    Status single_add(const uint8_t* vals, size_t* count) {
104
140M
        return add_internal<true>(vals, count);
105
140M
    }
106
107
    template <bool single>
108
138M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
138M
        DCHECK(!_finished);
110
138M
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
138M
        uint32_t to_add = cast_set<UInt32>(
126
138M
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
138M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
138M
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
138M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
141M
        _count += to_add;
134
141M
        _remain_element_capacity -= to_add;
135
141M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
141M
        *num_written = to_add;
138
141M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
140M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
140M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
140M
                        *reinterpret_cast<const uint32_t*>(vals);
149
140M
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
140M
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
0
        memcpy(&_data[orig_size], vals, to_add_size);
158
141M
        return Status::OK();
159
138M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
38.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
38.3k
        DCHECK(!_finished);
110
38.3k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
38.3k
        uint32_t to_add = cast_set<UInt32>(
126
38.3k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
38.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
38.3k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
38.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
38.3k
        _count += to_add;
134
38.3k
        _remain_element_capacity -= to_add;
135
38.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
38.3k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
38.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
38.3k
        return Status::OK();
159
38.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
9.41k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
9.41k
        DCHECK(!_finished);
110
9.41k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
9.41k
        uint32_t to_add = cast_set<UInt32>(
126
9.41k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
9.41k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
9.41k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
9.41k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
9.41k
        _count += to_add;
134
9.41k
        _remain_element_capacity -= to_add;
135
9.41k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
9.41k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
9.41k
        memcpy(&_data[orig_size], vals, to_add_size);
158
9.41k
        return Status::OK();
159
9.41k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
662k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
662k
        DCHECK(!_finished);
110
662k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
662k
        uint32_t to_add = cast_set<UInt32>(
126
662k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
662k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
662k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
662k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
662k
        _count += to_add;
134
662k
        _remain_element_capacity -= to_add;
135
662k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
662k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
662k
        memcpy(&_data[orig_size], vals, to_add_size);
158
662k
        return Status::OK();
159
662k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
343k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
343k
        DCHECK(!_finished);
110
343k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
343k
        uint32_t to_add = cast_set<UInt32>(
126
343k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
343k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
343k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
343k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
343k
        _count += to_add;
134
343k
        _remain_element_capacity -= to_add;
135
343k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
343k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
343k
        memcpy(&_data[orig_size], vals, to_add_size);
158
343k
        return Status::OK();
159
343k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
11.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
11.7k
        DCHECK(!_finished);
110
11.7k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
11.7k
        uint32_t to_add = cast_set<UInt32>(
126
11.7k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
11.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
11.7k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
11.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
11.7k
        _count += to_add;
134
11.7k
        _remain_element_capacity -= to_add;
135
11.7k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
11.7k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
11.7k
        memcpy(&_data[orig_size], vals, to_add_size);
158
11.7k
        return Status::OK();
159
11.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
63.2k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
63.2k
        DCHECK(!_finished);
110
63.2k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
63.2k
        uint32_t to_add = cast_set<UInt32>(
126
63.2k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
63.2k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
63.2k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
63.2k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
63.2k
        _count += to_add;
134
63.2k
        _remain_element_capacity -= to_add;
135
63.2k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
63.2k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
63.2k
        memcpy(&_data[orig_size], vals, to_add_size);
158
63.2k
        return Status::OK();
159
63.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
6.18k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
6.18k
        DCHECK(!_finished);
110
6.18k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
6.18k
        uint32_t to_add = cast_set<UInt32>(
126
6.18k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
6.18k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
6.18k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
6.18k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
6.18k
        _count += to_add;
134
6.18k
        _remain_element_capacity -= to_add;
135
6.18k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
6.18k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
6.18k
        memcpy(&_data[orig_size], vals, to_add_size);
158
6.18k
        return Status::OK();
159
6.18k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
8.81k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
8.81k
        DCHECK(!_finished);
110
8.81k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
8.81k
        uint32_t to_add = cast_set<UInt32>(
126
8.81k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
8.81k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
8.81k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
8.81k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
8.81k
        _count += to_add;
134
8.81k
        _remain_element_capacity -= to_add;
135
8.81k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
8.81k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
8.81k
        memcpy(&_data[orig_size], vals, to_add_size);
158
8.81k
        return Status::OK();
159
8.81k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
351
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
351
        DCHECK(!_finished);
110
351
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
351
        uint32_t to_add = cast_set<UInt32>(
126
351
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
351
        int to_add_size = to_add * SIZE_OF_TYPE;
129
351
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
351
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
351
        _count += to_add;
134
351
        _remain_element_capacity -= to_add;
135
351
        _raw_data_size += to_add_size;
136
        // return added number through count
137
351
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
351
        memcpy(&_data[orig_size], vals, to_add_size);
158
351
        return Status::OK();
159
351
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
44.5k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
44.5k
        DCHECK(!_finished);
110
44.5k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
44.5k
        uint32_t to_add = cast_set<UInt32>(
126
44.5k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
44.5k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
44.5k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
44.5k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
44.5k
        _count += to_add;
134
44.5k
        _remain_element_capacity -= to_add;
135
44.5k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
44.5k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
44.5k
        memcpy(&_data[orig_size], vals, to_add_size);
158
44.5k
        return Status::OK();
159
44.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
43.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
43.9k
        DCHECK(!_finished);
110
43.9k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
43.9k
        uint32_t to_add = cast_set<UInt32>(
126
43.9k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
43.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
43.9k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
43.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
43.9k
        _count += to_add;
134
43.9k
        _remain_element_capacity -= to_add;
135
43.9k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
43.9k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
43.9k
        memcpy(&_data[orig_size], vals, to_add_size);
158
43.9k
        return Status::OK();
159
43.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
279
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
279
        DCHECK(!_finished);
110
279
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
279
        uint32_t to_add = cast_set<UInt32>(
126
279
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
279
        int to_add_size = to_add * SIZE_OF_TYPE;
129
279
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
279
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
279
        _count += to_add;
134
279
        _remain_element_capacity -= to_add;
135
279
        _raw_data_size += to_add_size;
136
        // return added number through count
137
279
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
279
        memcpy(&_data[orig_size], vals, to_add_size);
158
279
        return Status::OK();
159
279
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
495
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
495
        DCHECK(!_finished);
110
495
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
495
        uint32_t to_add = cast_set<UInt32>(
126
495
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
495
        int to_add_size = to_add * SIZE_OF_TYPE;
129
495
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
495
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
495
        _count += to_add;
134
495
        _remain_element_capacity -= to_add;
135
495
        _raw_data_size += to_add_size;
136
        // return added number through count
137
495
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
495
        memcpy(&_data[orig_size], vals, to_add_size);
158
495
        return Status::OK();
159
495
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
7.61k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
7.61k
        DCHECK(!_finished);
110
7.61k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
7.61k
        uint32_t to_add = cast_set<UInt32>(
126
7.61k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
7.61k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
7.61k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
7.61k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
7.61k
        _count += to_add;
134
7.61k
        _remain_element_capacity -= to_add;
135
7.61k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
7.61k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
7.61k
        memcpy(&_data[orig_size], vals, to_add_size);
158
7.61k
        return Status::OK();
159
7.61k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
243
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
243
        DCHECK(!_finished);
110
243
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
243
        uint32_t to_add = cast_set<UInt32>(
126
243
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
243
        int to_add_size = to_add * SIZE_OF_TYPE;
129
243
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
243
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
243
        _count += to_add;
134
243
        _remain_element_capacity -= to_add;
135
243
        _raw_data_size += to_add_size;
136
        // return added number through count
137
243
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
243
        memcpy(&_data[orig_size], vals, to_add_size);
158
243
        return Status::OK();
159
243
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
5.16k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.16k
        DCHECK(!_finished);
110
5.16k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
5.16k
        uint32_t to_add = cast_set<UInt32>(
126
5.16k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
5.16k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.16k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
5.16k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.16k
        _count += to_add;
134
5.16k
        _remain_element_capacity -= to_add;
135
5.16k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.16k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
5.16k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.16k
        return Status::OK();
159
5.16k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
24.2k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
24.2k
        DCHECK(!_finished);
110
24.2k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
24.2k
        uint32_t to_add = cast_set<UInt32>(
126
24.2k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
24.2k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
24.2k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
24.2k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
24.2k
        _count += to_add;
134
24.2k
        _remain_element_capacity -= to_add;
135
24.2k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
24.2k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
24.2k
        memcpy(&_data[orig_size], vals, to_add_size);
158
24.2k
        return Status::OK();
159
24.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
17.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
17.9k
        DCHECK(!_finished);
110
17.9k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
17.9k
        uint32_t to_add = cast_set<UInt32>(
126
17.9k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
17.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
17.9k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
17.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
17.9k
        _count += to_add;
134
17.9k
        _remain_element_capacity -= to_add;
135
17.9k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
17.9k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
17.9k
        memcpy(&_data[orig_size], vals, to_add_size);
158
17.9k
        return Status::OK();
159
17.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
1.38k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
1.38k
        DCHECK(!_finished);
110
1.38k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
1.38k
        uint32_t to_add = cast_set<UInt32>(
126
1.38k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
1.38k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
1.38k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
1.38k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
1.38k
        _count += to_add;
134
1.38k
        _remain_element_capacity -= to_add;
135
1.38k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
1.38k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
1.38k
        memcpy(&_data[orig_size], vals, to_add_size);
158
1.38k
        return Status::OK();
159
1.38k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
616
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
616
        DCHECK(!_finished);
110
616
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
616
        uint32_t to_add = cast_set<UInt32>(
126
616
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
616
        int to_add_size = to_add * SIZE_OF_TYPE;
129
616
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
616
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
616
        _count += to_add;
134
616
        _remain_element_capacity -= to_add;
135
616
        _raw_data_size += to_add_size;
136
        // return added number through count
137
616
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
616
        memcpy(&_data[orig_size], vals, to_add_size);
158
616
        return Status::OK();
159
616
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
628
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
628
        DCHECK(!_finished);
110
628
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
628
        uint32_t to_add = cast_set<UInt32>(
126
628
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
628
        int to_add_size = to_add * SIZE_OF_TYPE;
129
628
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
628
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
628
        _count += to_add;
134
628
        _remain_element_capacity -= to_add;
135
628
        _raw_data_size += to_add_size;
136
        // return added number through count
137
628
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
628
        memcpy(&_data[orig_size], vals, to_add_size);
158
628
        return Status::OK();
159
628
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
136M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
136M
        DCHECK(!_finished);
110
136M
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
136M
        uint32_t to_add = cast_set<UInt32>(
126
136M
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
136M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
136M
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
136M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
140M
        _count += to_add;
134
140M
        _remain_element_capacity -= to_add;
135
140M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
140M
        *num_written = to_add;
138
140M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
140M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
140M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
140M
                        *reinterpret_cast<const uint32_t*>(vals);
149
140M
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
140M
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
0
        memcpy(&_data[orig_size], vals, to_add_size);
158
140M
        return Status::OK();
159
136M
    }
160
161
744k
    Status finish(OwnedSlice* slice) override {
162
744k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
745k
        return Status::OK();
164
744k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
35.5k
    Status finish(OwnedSlice* slice) override {
162
35.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
35.6k
        return Status::OK();
164
35.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
8.93k
    Status finish(OwnedSlice* slice) override {
162
8.93k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
8.93k
        return Status::OK();
164
8.93k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
349k
    Status finish(OwnedSlice* slice) override {
162
349k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
349k
        return Status::OK();
164
349k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
124k
    Status finish(OwnedSlice* slice) override {
162
124k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
124k
        return Status::OK();
164
124k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
11.8k
    Status finish(OwnedSlice* slice) override {
162
11.8k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
11.8k
        return Status::OK();
164
11.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
62.7k
    Status finish(OwnedSlice* slice) override {
162
62.7k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
62.7k
        return Status::OK();
164
62.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
5.97k
    Status finish(OwnedSlice* slice) override {
162
5.97k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
5.97k
        return Status::OK();
164
5.97k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7.64k
    Status finish(OwnedSlice* slice) override {
162
7.64k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.64k
        return Status::OK();
164
7.64k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
346
    Status finish(OwnedSlice* slice) override {
162
346
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
346
        return Status::OK();
164
346
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
38.1k
    Status finish(OwnedSlice* slice) override {
162
38.1k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
38.1k
        return Status::OK();
164
38.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
43.1k
    Status finish(OwnedSlice* slice) override {
162
43.1k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
43.1k
        return Status::OK();
164
43.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
273
    Status finish(OwnedSlice* slice) override {
162
273
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
273
        return Status::OK();
164
273
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
585
    Status finish(OwnedSlice* slice) override {
162
585
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
585
        return Status::OK();
164
585
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7.69k
    Status finish(OwnedSlice* slice) override {
162
7.69k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.70k
        return Status::OK();
164
7.69k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
245
    Status finish(OwnedSlice* slice) override {
162
245
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
245
        return Status::OK();
164
245
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
9.68k
    Status finish(OwnedSlice* slice) override {
162
9.68k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
9.68k
        return Status::OK();
164
9.68k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
18.6k
    Status finish(OwnedSlice* slice) override {
162
18.6k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
18.6k
        return Status::OK();
164
18.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
17.1k
    Status finish(OwnedSlice* slice) override {
162
17.1k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
17.1k
        return Status::OK();
164
17.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
1.11k
    Status finish(OwnedSlice* slice) override {
162
1.11k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
1.11k
        return Status::OK();
164
1.11k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
622
    Status finish(OwnedSlice* slice) override {
162
622
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
622
        return Status::OK();
164
622
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
619
    Status finish(OwnedSlice* slice) override {
162
619
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
619
        return Status::OK();
164
619
    }
165
166
1.78M
    Status reset() override {
167
1.78M
        RETURN_IF_CATCH_EXCEPTION({
168
1.78M
            size_t block_size = _options.data_page_size;
169
1.78M
            _count = 0;
170
1.78M
            _raw_data_size = 0;
171
1.78M
            _data.clear();
172
1.78M
            _data.reserve(block_size);
173
1.78M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.78M
                    << "buffer must be naturally-aligned";
175
1.78M
            _buffer.clear();
176
1.78M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.78M
            _finished = false;
178
1.78M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.78M
        });
180
1.79M
        return Status::OK();
181
1.78M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
71.6k
    Status reset() override {
167
71.6k
        RETURN_IF_CATCH_EXCEPTION({
168
71.6k
            size_t block_size = _options.data_page_size;
169
71.6k
            _count = 0;
170
71.6k
            _raw_data_size = 0;
171
71.6k
            _data.clear();
172
71.6k
            _data.reserve(block_size);
173
71.6k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
71.6k
                    << "buffer must be naturally-aligned";
175
71.6k
            _buffer.clear();
176
71.6k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
71.6k
            _finished = false;
178
71.6k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
71.6k
        });
180
71.7k
        return Status::OK();
181
71.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
166
18.3k
    Status reset() override {
167
18.3k
        RETURN_IF_CATCH_EXCEPTION({
168
18.3k
            size_t block_size = _options.data_page_size;
169
18.3k
            _count = 0;
170
18.3k
            _raw_data_size = 0;
171
18.3k
            _data.clear();
172
18.3k
            _data.reserve(block_size);
173
18.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
18.3k
                    << "buffer must be naturally-aligned";
175
18.3k
            _buffer.clear();
176
18.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
18.3k
            _finished = false;
178
18.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
18.3k
        });
180
18.3k
        return Status::OK();
181
18.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
166
1.00M
    Status reset() override {
167
1.00M
        RETURN_IF_CATCH_EXCEPTION({
168
1.00M
            size_t block_size = _options.data_page_size;
169
1.00M
            _count = 0;
170
1.00M
            _raw_data_size = 0;
171
1.00M
            _data.clear();
172
1.00M
            _data.reserve(block_size);
173
1.00M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.00M
                    << "buffer must be naturally-aligned";
175
1.00M
            _buffer.clear();
176
1.00M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.00M
            _finished = false;
178
1.00M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.00M
        });
180
1.00M
        return Status::OK();
181
1.00M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
244k
    Status reset() override {
167
244k
        RETURN_IF_CATCH_EXCEPTION({
168
244k
            size_t block_size = _options.data_page_size;
169
244k
            _count = 0;
170
244k
            _raw_data_size = 0;
171
244k
            _data.clear();
172
244k
            _data.reserve(block_size);
173
244k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
244k
                    << "buffer must be naturally-aligned";
175
244k
            _buffer.clear();
176
244k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
244k
            _finished = false;
178
244k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
244k
        });
180
245k
        return Status::OK();
181
244k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
166
23.7k
    Status reset() override {
167
23.7k
        RETURN_IF_CATCH_EXCEPTION({
168
23.7k
            size_t block_size = _options.data_page_size;
169
23.7k
            _count = 0;
170
23.7k
            _raw_data_size = 0;
171
23.7k
            _data.clear();
172
23.7k
            _data.reserve(block_size);
173
23.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
23.7k
                    << "buffer must be naturally-aligned";
175
23.7k
            _buffer.clear();
176
23.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
23.7k
            _finished = false;
178
23.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
23.7k
        });
180
23.8k
        return Status::OK();
181
23.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
166
125k
    Status reset() override {
167
125k
        RETURN_IF_CATCH_EXCEPTION({
168
125k
            size_t block_size = _options.data_page_size;
169
125k
            _count = 0;
170
125k
            _raw_data_size = 0;
171
125k
            _data.clear();
172
125k
            _data.reserve(block_size);
173
125k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
125k
                    << "buffer must be naturally-aligned";
175
125k
            _buffer.clear();
176
125k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
125k
            _finished = false;
178
125k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
125k
        });
180
125k
        return Status::OK();
181
125k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
Line
Count
Source
166
1
    Status reset() override {
167
1
        RETURN_IF_CATCH_EXCEPTION({
168
1
            size_t block_size = _options.data_page_size;
169
1
            _count = 0;
170
1
            _raw_data_size = 0;
171
1
            _data.clear();
172
1
            _data.reserve(block_size);
173
1
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1
                    << "buffer must be naturally-aligned";
175
1
            _buffer.clear();
176
1
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1
            _finished = false;
178
1
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1
        });
180
1
        return Status::OK();
181
1
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
166
12.3k
    Status reset() override {
167
12.3k
        RETURN_IF_CATCH_EXCEPTION({
168
12.3k
            size_t block_size = _options.data_page_size;
169
12.3k
            _count = 0;
170
12.3k
            _raw_data_size = 0;
171
12.3k
            _data.clear();
172
12.3k
            _data.reserve(block_size);
173
12.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
12.3k
                    << "buffer must be naturally-aligned";
175
12.3k
            _buffer.clear();
176
12.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
12.3k
            _finished = false;
178
12.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
12.3k
        });
180
12.3k
        return Status::OK();
181
12.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
166
15.1k
    Status reset() override {
167
15.1k
        RETURN_IF_CATCH_EXCEPTION({
168
15.1k
            size_t block_size = _options.data_page_size;
169
15.1k
            _count = 0;
170
15.1k
            _raw_data_size = 0;
171
15.1k
            _data.clear();
172
15.1k
            _data.reserve(block_size);
173
15.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
15.1k
                    << "buffer must be naturally-aligned";
175
15.1k
            _buffer.clear();
176
15.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
15.1k
            _finished = false;
178
15.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
15.1k
        });
180
15.1k
        return Status::OK();
181
15.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
166
681
    Status reset() override {
167
681
        RETURN_IF_CATCH_EXCEPTION({
168
681
            size_t block_size = _options.data_page_size;
169
681
            _count = 0;
170
681
            _raw_data_size = 0;
171
681
            _data.clear();
172
681
            _data.reserve(block_size);
173
681
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
681
                    << "buffer must be naturally-aligned";
175
681
            _buffer.clear();
176
681
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
681
            _finished = false;
178
681
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
681
        });
180
681
        return Status::OK();
181
681
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
166
75.7k
    Status reset() override {
167
75.7k
        RETURN_IF_CATCH_EXCEPTION({
168
75.7k
            size_t block_size = _options.data_page_size;
169
75.7k
            _count = 0;
170
75.7k
            _raw_data_size = 0;
171
75.7k
            _data.clear();
172
75.7k
            _data.reserve(block_size);
173
75.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
75.7k
                    << "buffer must be naturally-aligned";
175
75.7k
            _buffer.clear();
176
75.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
75.7k
            _finished = false;
178
75.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
75.7k
        });
180
75.8k
        return Status::OK();
181
75.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
166
87.3k
    Status reset() override {
167
87.3k
        RETURN_IF_CATCH_EXCEPTION({
168
87.3k
            size_t block_size = _options.data_page_size;
169
87.3k
            _count = 0;
170
87.3k
            _raw_data_size = 0;
171
87.3k
            _data.clear();
172
87.3k
            _data.reserve(block_size);
173
87.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
87.3k
                    << "buffer must be naturally-aligned";
175
87.3k
            _buffer.clear();
176
87.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
87.3k
            _finished = false;
178
87.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
87.3k
        });
180
87.4k
        return Status::OK();
181
87.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE5resetEv
Line
Count
Source
166
610
    Status reset() override {
167
610
        RETURN_IF_CATCH_EXCEPTION({
168
610
            size_t block_size = _options.data_page_size;
169
610
            _count = 0;
170
610
            _raw_data_size = 0;
171
610
            _data.clear();
172
610
            _data.reserve(block_size);
173
610
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
610
                    << "buffer must be naturally-aligned";
175
610
            _buffer.clear();
176
610
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
610
            _finished = false;
178
610
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
610
        });
180
612
        return Status::OK();
181
610
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
166
1.01k
    Status reset() override {
167
1.01k
        RETURN_IF_CATCH_EXCEPTION({
168
1.01k
            size_t block_size = _options.data_page_size;
169
1.01k
            _count = 0;
170
1.01k
            _raw_data_size = 0;
171
1.01k
            _data.clear();
172
1.01k
            _data.reserve(block_size);
173
1.01k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.01k
                    << "buffer must be naturally-aligned";
175
1.01k
            _buffer.clear();
176
1.01k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.01k
            _finished = false;
178
1.01k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.01k
        });
180
1.01k
        return Status::OK();
181
1.01k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
Line
Count
Source
166
15.1k
    Status reset() override {
167
15.1k
        RETURN_IF_CATCH_EXCEPTION({
168
15.1k
            size_t block_size = _options.data_page_size;
169
15.1k
            _count = 0;
170
15.1k
            _raw_data_size = 0;
171
15.1k
            _data.clear();
172
15.1k
            _data.reserve(block_size);
173
15.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
15.1k
                    << "buffer must be naturally-aligned";
175
15.1k
            _buffer.clear();
176
15.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
15.1k
            _finished = false;
178
15.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
15.1k
        });
180
15.4k
        return Status::OK();
181
15.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
166
581
    Status reset() override {
167
581
        RETURN_IF_CATCH_EXCEPTION({
168
581
            size_t block_size = _options.data_page_size;
169
581
            _count = 0;
170
581
            _raw_data_size = 0;
171
581
            _data.clear();
172
581
            _data.reserve(block_size);
173
581
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
581
                    << "buffer must be naturally-aligned";
175
581
            _buffer.clear();
176
581
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
581
            _finished = false;
178
581
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
581
        });
180
581
        return Status::OK();
181
581
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
166
19.3k
    Status reset() override {
167
19.3k
        RETURN_IF_CATCH_EXCEPTION({
168
19.3k
            size_t block_size = _options.data_page_size;
169
19.3k
            _count = 0;
170
19.3k
            _raw_data_size = 0;
171
19.3k
            _data.clear();
172
19.3k
            _data.reserve(block_size);
173
19.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
19.3k
                    << "buffer must be naturally-aligned";
175
19.3k
            _buffer.clear();
176
19.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
19.3k
            _finished = false;
178
19.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
19.3k
        });
180
19.3k
        return Status::OK();
181
19.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
30.7k
    Status reset() override {
167
30.7k
        RETURN_IF_CATCH_EXCEPTION({
168
30.7k
            size_t block_size = _options.data_page_size;
169
30.7k
            _count = 0;
170
30.7k
            _raw_data_size = 0;
171
30.7k
            _data.clear();
172
30.7k
            _data.reserve(block_size);
173
30.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
30.7k
                    << "buffer must be naturally-aligned";
175
30.7k
            _buffer.clear();
176
30.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
30.7k
            _finished = false;
178
30.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
30.7k
        });
180
30.7k
        return Status::OK();
181
30.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
166
34.1k
    Status reset() override {
167
34.1k
        RETURN_IF_CATCH_EXCEPTION({
168
34.1k
            size_t block_size = _options.data_page_size;
169
34.1k
            _count = 0;
170
34.1k
            _raw_data_size = 0;
171
34.1k
            _data.clear();
172
34.1k
            _data.reserve(block_size);
173
34.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
34.1k
                    << "buffer must be naturally-aligned";
175
34.1k
            _buffer.clear();
176
34.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
34.1k
            _finished = false;
178
34.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
34.1k
        });
180
34.1k
        return Status::OK();
181
34.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Line
Count
Source
166
2.32k
    Status reset() override {
167
2.32k
        RETURN_IF_CATCH_EXCEPTION({
168
2.32k
            size_t block_size = _options.data_page_size;
169
2.32k
            _count = 0;
170
2.32k
            _raw_data_size = 0;
171
2.32k
            _data.clear();
172
2.32k
            _data.reserve(block_size);
173
2.32k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
2.32k
                    << "buffer must be naturally-aligned";
175
2.32k
            _buffer.clear();
176
2.32k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
2.32k
            _finished = false;
178
2.32k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
2.32k
        });
180
2.32k
        return Status::OK();
181
2.32k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Line
Count
Source
166
1.33k
    Status reset() override {
167
1.33k
        RETURN_IF_CATCH_EXCEPTION({
168
1.33k
            size_t block_size = _options.data_page_size;
169
1.33k
            _count = 0;
170
1.33k
            _raw_data_size = 0;
171
1.33k
            _data.clear();
172
1.33k
            _data.reserve(block_size);
173
1.33k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.33k
                    << "buffer must be naturally-aligned";
175
1.33k
            _buffer.clear();
176
1.33k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.33k
            _finished = false;
178
1.33k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.33k
        });
180
1.33k
        return Status::OK();
181
1.33k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
166
1.32k
    Status reset() override {
167
1.32k
        RETURN_IF_CATCH_EXCEPTION({
168
1.32k
            size_t block_size = _options.data_page_size;
169
1.32k
            _count = 0;
170
1.32k
            _raw_data_size = 0;
171
1.32k
            _data.clear();
172
1.32k
            _data.reserve(block_size);
173
1.32k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.32k
                    << "buffer must be naturally-aligned";
175
1.32k
            _buffer.clear();
176
1.32k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.32k
            _finished = false;
178
1.32k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.32k
        });
180
1.33k
        return Status::OK();
181
1.32k
    }
182
183
4
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5countEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
183
4
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5countEv
184
185
34.4k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
185
3.16k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
185
835
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
19.0k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
2.01k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
1.37k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
888
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
234
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
185
268
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4sizeEv
Line
Count
Source
185
112
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4sizeEv
Line
Count
Source
185
1.65k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
2.33k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE4sizeEv
Line
Count
Source
185
10
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4sizeEv
Line
Count
Source
185
119
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4sizeEv
Line
Count
Source
185
112
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4sizeEv
Line
Count
Source
185
104
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4sizeEv
Line
Count
Source
185
254
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
185
393
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
185
1.21k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4sizeEv
Line
Count
Source
185
106
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4sizeEv
Line
Count
Source
185
128
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4sizeEv
Line
Count
Source
185
112
    uint64_t size() const override { return _buffer.size(); }
186
187
453k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
35.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
8.93k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
58.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
124k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
187
11.8k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
62.7k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
187
5.97k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
7.64k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE17get_raw_data_sizeEv
Line
Count
Source
187
346
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
187
38.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
187
43.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE17get_raw_data_sizeEv
Line
Count
Source
187
273
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
187
585
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
Line
Count
Source
187
7.70k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
187
245
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
187
9.68k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
18.6k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
187
17.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE17get_raw_data_sizeEv
Line
Count
Source
187
1.11k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Line
Count
Source
187
621
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
187
619
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
741k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
36.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.37k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
355k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
120k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
11.8k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
62.6k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
6.40k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
7.47k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
335
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
37.5k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
44.1k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
337
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
432
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
7.42k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
336
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.67k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
12.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
16.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1.20k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
713
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
708
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
192
193
744k
    OwnedSlice _finish(int final_size_of_type) {
194
744k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
744k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
744k
        int padding_elems = num_elems_after_padding - _count;
199
744k
        int padding_bytes = padding_elems * final_size_of_type;
200
22.5M
        for (int i = 0; i < padding_bytes; i++) {
201
21.7M
            _data.push_back(0);
202
21.7M
        }
203
204
        // reserve enough place for compression
205
744k
        _buffer.resize(
206
744k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
744k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
744k
        int64_t bytes =
210
744k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
744k
                                         num_elems_after_padding, final_size_of_type, 0);
212
744k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
744k
        encode_fixed32_le(&_buffer[0], _count);
222
744k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
744k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
744k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
744k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
744k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
744k
        return _buffer.build();
229
744k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
35.6k
    OwnedSlice _finish(int final_size_of_type) {
194
35.6k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
35.6k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
35.6k
        int padding_elems = num_elems_after_padding - _count;
199
35.6k
        int padding_bytes = padding_elems * final_size_of_type;
200
223k
        for (int i = 0; i < padding_bytes; i++) {
201
187k
            _data.push_back(0);
202
187k
        }
203
204
        // reserve enough place for compression
205
35.6k
        _buffer.resize(
206
35.6k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
35.6k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
35.6k
        int64_t bytes =
210
35.6k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
35.6k
                                         num_elems_after_padding, final_size_of_type, 0);
212
35.6k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
35.6k
        encode_fixed32_le(&_buffer[0], _count);
222
35.6k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
35.6k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
35.6k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
35.6k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
35.6k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
35.6k
        return _buffer.build();
229
35.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
8.93k
    OwnedSlice _finish(int final_size_of_type) {
194
8.93k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
8.93k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
8.93k
        int padding_elems = num_elems_after_padding - _count;
199
8.93k
        int padding_bytes = padding_elems * final_size_of_type;
200
90.6k
        for (int i = 0; i < padding_bytes; i++) {
201
81.7k
            _data.push_back(0);
202
81.7k
        }
203
204
        // reserve enough place for compression
205
8.93k
        _buffer.resize(
206
8.93k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
8.93k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
8.93k
        int64_t bytes =
210
8.93k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
8.93k
                                         num_elems_after_padding, final_size_of_type, 0);
212
8.93k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
8.93k
        encode_fixed32_le(&_buffer[0], _count);
222
8.93k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
8.93k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
8.93k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
8.93k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
8.93k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
8.93k
        return _buffer.build();
229
8.93k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
349k
    OwnedSlice _finish(int final_size_of_type) {
194
349k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
349k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
349k
        int padding_elems = num_elems_after_padding - _count;
199
349k
        int padding_bytes = padding_elems * final_size_of_type;
200
6.71M
        for (int i = 0; i < padding_bytes; i++) {
201
6.36M
            _data.push_back(0);
202
6.36M
        }
203
204
        // reserve enough place for compression
205
349k
        _buffer.resize(
206
349k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
349k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
349k
        int64_t bytes =
210
349k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
349k
                                         num_elems_after_padding, final_size_of_type, 0);
212
349k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
349k
        encode_fixed32_le(&_buffer[0], _count);
222
349k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
349k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
349k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
349k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
349k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
349k
        return _buffer.build();
229
349k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
124k
    OwnedSlice _finish(int final_size_of_type) {
194
124k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
124k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
124k
        int padding_elems = num_elems_after_padding - _count;
199
124k
        int padding_bytes = padding_elems * final_size_of_type;
200
6.22M
        for (int i = 0; i < padding_bytes; i++) {
201
6.10M
            _data.push_back(0);
202
6.10M
        }
203
204
        // reserve enough place for compression
205
124k
        _buffer.resize(
206
124k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
124k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
124k
        int64_t bytes =
210
124k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
124k
                                         num_elems_after_padding, final_size_of_type, 0);
212
124k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
124k
        encode_fixed32_le(&_buffer[0], _count);
222
124k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
124k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
124k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
124k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
124k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
124k
        return _buffer.build();
229
124k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
11.8k
    OwnedSlice _finish(int final_size_of_type) {
194
11.8k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
11.8k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
11.8k
        int padding_elems = num_elems_after_padding - _count;
199
11.8k
        int padding_bytes = padding_elems * final_size_of_type;
200
756k
        for (int i = 0; i < padding_bytes; i++) {
201
744k
            _data.push_back(0);
202
744k
        }
203
204
        // reserve enough place for compression
205
11.8k
        _buffer.resize(
206
11.8k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
11.8k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
11.8k
        int64_t bytes =
210
11.8k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
11.8k
                                         num_elems_after_padding, final_size_of_type, 0);
212
11.8k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
11.8k
        encode_fixed32_le(&_buffer[0], _count);
222
11.8k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
11.8k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
11.8k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
11.8k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
11.8k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
11.8k
        return _buffer.build();
229
11.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
62.7k
    OwnedSlice _finish(int final_size_of_type) {
194
62.7k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
62.7k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
62.7k
        int padding_elems = num_elems_after_padding - _count;
199
62.7k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.00M
        for (int i = 0; i < padding_bytes; i++) {
201
2.94M
            _data.push_back(0);
202
2.94M
        }
203
204
        // reserve enough place for compression
205
62.7k
        _buffer.resize(
206
62.7k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
62.7k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
62.7k
        int64_t bytes =
210
62.7k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
62.7k
                                         num_elems_after_padding, final_size_of_type, 0);
212
62.7k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
62.7k
        encode_fixed32_le(&_buffer[0], _count);
222
62.7k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
62.7k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
62.7k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
62.7k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
62.7k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
62.7k
        return _buffer.build();
229
62.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
5.97k
    OwnedSlice _finish(int final_size_of_type) {
194
5.97k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
5.97k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
5.97k
        int padding_elems = num_elems_after_padding - _count;
199
5.97k
        int padding_bytes = padding_elems * final_size_of_type;
200
130k
        for (int i = 0; i < padding_bytes; i++) {
201
124k
            _data.push_back(0);
202
124k
        }
203
204
        // reserve enough place for compression
205
5.97k
        _buffer.resize(
206
5.97k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
5.97k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
5.97k
        int64_t bytes =
210
5.97k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
5.97k
                                         num_elems_after_padding, final_size_of_type, 0);
212
5.97k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
5.97k
        encode_fixed32_le(&_buffer[0], _count);
222
5.97k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
5.97k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
5.97k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
5.97k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
5.97k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
5.97k
        return _buffer.build();
229
5.97k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
7.64k
    OwnedSlice _finish(int final_size_of_type) {
194
7.64k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.64k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.64k
        int padding_elems = num_elems_after_padding - _count;
199
7.64k
        int padding_bytes = padding_elems * final_size_of_type;
200
303k
        for (int i = 0; i < padding_bytes; i++) {
201
296k
            _data.push_back(0);
202
296k
        }
203
204
        // reserve enough place for compression
205
7.64k
        _buffer.resize(
206
7.64k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.64k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.64k
        int64_t bytes =
210
7.64k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.64k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.64k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
7.64k
        encode_fixed32_le(&_buffer[0], _count);
222
7.64k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.64k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.64k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.64k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.64k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.64k
        return _buffer.build();
229
7.64k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
346
    OwnedSlice _finish(int final_size_of_type) {
194
346
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
346
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
346
        int padding_elems = num_elems_after_padding - _count;
199
346
        int padding_bytes = padding_elems * final_size_of_type;
200
5.18k
        for (int i = 0; i < padding_bytes; i++) {
201
4.84k
            _data.push_back(0);
202
4.84k
        }
203
204
        // reserve enough place for compression
205
346
        _buffer.resize(
206
346
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
346
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
346
        int64_t bytes =
210
346
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
346
                                         num_elems_after_padding, final_size_of_type, 0);
212
346
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
346
        encode_fixed32_le(&_buffer[0], _count);
222
346
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
346
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
346
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
346
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
346
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
346
        return _buffer.build();
229
346
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
193
38.1k
    OwnedSlice _finish(int final_size_of_type) {
194
38.1k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
38.1k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
38.1k
        int padding_elems = num_elems_after_padding - _count;
199
38.1k
        int padding_bytes = padding_elems * final_size_of_type;
200
810k
        for (int i = 0; i < padding_bytes; i++) {
201
772k
            _data.push_back(0);
202
772k
        }
203
204
        // reserve enough place for compression
205
38.1k
        _buffer.resize(
206
38.1k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
38.1k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
38.1k
        int64_t bytes =
210
38.1k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
38.1k
                                         num_elems_after_padding, final_size_of_type, 0);
212
38.1k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
38.1k
        encode_fixed32_le(&_buffer[0], _count);
222
38.1k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
38.1k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
38.1k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
38.1k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
38.1k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
38.1k
        return _buffer.build();
229
38.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
193
43.1k
    OwnedSlice _finish(int final_size_of_type) {
194
43.1k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
43.1k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
43.1k
        int padding_elems = num_elems_after_padding - _count;
199
43.1k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.81M
        for (int i = 0; i < padding_bytes; i++) {
201
1.77M
            _data.push_back(0);
202
1.77M
        }
203
204
        // reserve enough place for compression
205
43.1k
        _buffer.resize(
206
43.1k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
43.1k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
43.1k
        int64_t bytes =
210
43.1k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
43.1k
                                         num_elems_after_padding, final_size_of_type, 0);
212
43.1k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
43.1k
        encode_fixed32_le(&_buffer[0], _count);
222
43.1k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
43.1k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
43.1k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
43.1k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
43.1k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
43.1k
        return _buffer.build();
229
43.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE7_finishEi
Line
Count
Source
193
273
    OwnedSlice _finish(int final_size_of_type) {
194
273
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
273
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
273
        int padding_elems = num_elems_after_padding - _count;
199
273
        int padding_bytes = padding_elems * final_size_of_type;
200
11.6k
        for (int i = 0; i < padding_bytes; i++) {
201
11.3k
            _data.push_back(0);
202
11.3k
        }
203
204
        // reserve enough place for compression
205
273
        _buffer.resize(
206
273
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
273
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
273
        int64_t bytes =
210
273
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
273
                                         num_elems_after_padding, final_size_of_type, 0);
212
273
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
273
        encode_fixed32_le(&_buffer[0], _count);
222
273
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
273
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
273
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
273
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
273
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
273
        return _buffer.build();
229
273
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
193
585
    OwnedSlice _finish(int final_size_of_type) {
194
585
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
585
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
585
        int padding_elems = num_elems_after_padding - _count;
199
585
        int padding_bytes = padding_elems * final_size_of_type;
200
13.2k
        for (int i = 0; i < padding_bytes; i++) {
201
12.6k
            _data.push_back(0);
202
12.6k
        }
203
204
        // reserve enough place for compression
205
585
        _buffer.resize(
206
585
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
585
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
585
        int64_t bytes =
210
585
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
585
                                         num_elems_after_padding, final_size_of_type, 0);
212
585
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
585
        encode_fixed32_le(&_buffer[0], _count);
222
585
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
585
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
585
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
585
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
585
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
585
        return _buffer.build();
229
585
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
Line
Count
Source
193
7.70k
    OwnedSlice _finish(int final_size_of_type) {
194
7.70k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.70k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.70k
        int padding_elems = num_elems_after_padding - _count;
199
7.70k
        int padding_bytes = padding_elems * final_size_of_type;
200
401k
        for (int i = 0; i < padding_bytes; i++) {
201
394k
            _data.push_back(0);
202
394k
        }
203
204
        // reserve enough place for compression
205
7.70k
        _buffer.resize(
206
7.70k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.70k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.70k
        int64_t bytes =
210
7.70k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.70k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.70k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
7.70k
        encode_fixed32_le(&_buffer[0], _count);
222
7.70k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.70k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.70k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.70k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.70k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.70k
        return _buffer.build();
229
7.70k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
193
245
    OwnedSlice _finish(int final_size_of_type) {
194
245
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
245
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
245
        int padding_elems = num_elems_after_padding - _count;
199
245
        int padding_bytes = padding_elems * final_size_of_type;
200
15.0k
        for (int i = 0; i < padding_bytes; i++) {
201
14.8k
            _data.push_back(0);
202
14.8k
        }
203
204
        // reserve enough place for compression
205
245
        _buffer.resize(
206
245
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
245
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
245
        int64_t bytes =
210
245
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
245
                                         num_elems_after_padding, final_size_of_type, 0);
212
245
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
245
        encode_fixed32_le(&_buffer[0], _count);
222
245
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
245
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
245
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
245
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
245
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
245
        return _buffer.build();
229
245
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
193
9.68k
    OwnedSlice _finish(int final_size_of_type) {
194
9.68k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
9.68k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
9.68k
        int padding_elems = num_elems_after_padding - _count;
199
9.68k
        int padding_bytes = padding_elems * final_size_of_type;
200
117k
        for (int i = 0; i < padding_bytes; i++) {
201
107k
            _data.push_back(0);
202
107k
        }
203
204
        // reserve enough place for compression
205
9.68k
        _buffer.resize(
206
9.68k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
9.68k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
9.68k
        int64_t bytes =
210
9.68k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
9.68k
                                         num_elems_after_padding, final_size_of_type, 0);
212
9.68k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
9.68k
        encode_fixed32_le(&_buffer[0], _count);
222
9.68k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
9.68k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
9.68k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
9.68k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
9.68k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
9.68k
        return _buffer.build();
229
9.68k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
18.6k
    OwnedSlice _finish(int final_size_of_type) {
194
18.6k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
18.6k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
18.6k
        int padding_elems = num_elems_after_padding - _count;
199
18.6k
        int padding_bytes = padding_elems * final_size_of_type;
200
487k
        for (int i = 0; i < padding_bytes; i++) {
201
468k
            _data.push_back(0);
202
468k
        }
203
204
        // reserve enough place for compression
205
18.6k
        _buffer.resize(
206
18.6k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
18.6k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
18.6k
        int64_t bytes =
210
18.6k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
18.6k
                                         num_elems_after_padding, final_size_of_type, 0);
212
18.6k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
18.6k
        encode_fixed32_le(&_buffer[0], _count);
222
18.6k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
18.6k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
18.6k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
18.6k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
18.6k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
18.6k
        return _buffer.build();
229
18.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
193
17.1k
    OwnedSlice _finish(int final_size_of_type) {
194
17.1k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
17.1k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
17.1k
        int padding_elems = num_elems_after_padding - _count;
199
17.1k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.14M
        for (int i = 0; i < padding_bytes; i++) {
201
1.13M
            _data.push_back(0);
202
1.13M
        }
203
204
        // reserve enough place for compression
205
17.1k
        _buffer.resize(
206
17.1k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
17.1k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
17.1k
        int64_t bytes =
210
17.1k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
17.1k
                                         num_elems_after_padding, final_size_of_type, 0);
212
17.1k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
17.1k
        encode_fixed32_le(&_buffer[0], _count);
222
17.1k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
17.1k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
17.1k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
17.1k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
17.1k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
17.1k
        return _buffer.build();
229
17.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE7_finishEi
Line
Count
Source
193
1.11k
    OwnedSlice _finish(int final_size_of_type) {
194
1.11k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
1.11k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
1.11k
        int padding_elems = num_elems_after_padding - _count;
199
1.11k
        int padding_bytes = padding_elems * final_size_of_type;
200
173k
        for (int i = 0; i < padding_bytes; i++) {
201
172k
            _data.push_back(0);
202
172k
        }
203
204
        // reserve enough place for compression
205
1.11k
        _buffer.resize(
206
1.11k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
1.11k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
1.11k
        int64_t bytes =
210
1.11k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
1.11k
                                         num_elems_after_padding, final_size_of_type, 0);
212
1.11k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
1.11k
        encode_fixed32_le(&_buffer[0], _count);
222
1.11k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
1.11k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
1.11k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
1.11k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
1.11k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
1.11k
        return _buffer.build();
229
1.11k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Line
Count
Source
193
622
    OwnedSlice _finish(int final_size_of_type) {
194
622
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
622
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
622
        int padding_elems = num_elems_after_padding - _count;
199
622
        int padding_bytes = padding_elems * final_size_of_type;
200
12.7k
        for (int i = 0; i < padding_bytes; i++) {
201
12.1k
            _data.push_back(0);
202
12.1k
        }
203
204
        // reserve enough place for compression
205
622
        _buffer.resize(
206
622
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
622
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
622
        int64_t bytes =
210
622
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
622
                                         num_elems_after_padding, final_size_of_type, 0);
212
622
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
622
        encode_fixed32_le(&_buffer[0], _count);
222
622
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
622
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
622
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
622
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
622
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
622
        return _buffer.build();
229
622
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
193
619
    OwnedSlice _finish(int final_size_of_type) {
194
619
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
619
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
619
        int padding_elems = num_elems_after_padding - _count;
199
619
        int padding_bytes = padding_elems * final_size_of_type;
200
50.6k
        for (int i = 0; i < padding_bytes; i++) {
201
50.0k
            _data.push_back(0);
202
50.0k
        }
203
204
        // reserve enough place for compression
205
619
        _buffer.resize(
206
619
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
619
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
619
        int64_t bytes =
210
619
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
619
                                         num_elems_after_padding, final_size_of_type, 0);
212
619
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
619
        encode_fixed32_le(&_buffer[0], _count);
222
619
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
619
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
619
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
619
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
619
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
619
        return _buffer.build();
229
619
    }
230
231
    using CppType = typename TypeTraits<Type>::CppType;
232
233
    CppType cell(int idx) const {
234
        DCHECK_GE(idx, 0);
235
        CppType ret;
236
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
237
        return ret;
238
    }
239
240
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
241
    PageBuilderOptions _options;
242
    uint32_t _count;
243
    uint32_t _remain_element_capacity;
244
    bool _finished;
245
    faststring _data;
246
    faststring _buffer;
247
    uint64_t _raw_data_size = 0;
248
};
249
250
inline Status parse_bit_shuffle_header(const Slice& data, size_t& num_elements,
251
                                       size_t& compressed_size, size_t& num_element_after_padding,
252
1.64M
                                       int& size_of_element) {
253
1.64M
    if (data.size < BITSHUFFLE_PAGE_HEADER_SIZE) {
254
0
        return Status::InternalError("file corruption: invalid data size:{}, header size:{}",
255
0
                                     data.size, BITSHUFFLE_PAGE_HEADER_SIZE);
256
0
    }
257
258
1.64M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
1.64M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
1.64M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
1.64M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
1.64M
    if (num_element_after_padding != ALIGN_UP(num_elements, 8)) {
263
0
        return Status::InternalError(
264
0
                "num of element information corrupted,"
265
0
                " _num_element_after_padding:{}, _num_elements:{}, expected_padding:{},"
266
0
                " compressed_size:{}, size_of_element:{}, data_size:{}",
267
0
                num_element_after_padding, num_elements, ALIGN_UP(num_elements, 8), compressed_size,
268
0
                size_of_element, data.size);
269
0
    }
270
1.64M
    switch (size_of_element) {
271
104k
    case 1:
272
123k
    case 2:
273
125k
    case 3:
274
1.13M
    case 4:
275
1.57M
    case 8:
276
1.57M
    case 12:
277
1.64M
    case 16:
278
1.64M
    case 32:
279
1.64M
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
1.64M
    }
283
1.64M
    return Status::OK();
284
1.64M
}
285
286
template <FieldType Type>
287
class BitShufflePageDecoder : public PageDecoder {
288
public:
289
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
290
1.02M
            : _data(data),
291
1.02M
              _options(options),
292
1.02M
              _parsed(false),
293
1.02M
              _num_elements(0),
294
1.02M
              _num_element_after_padding(0),
295
1.02M
              _size_of_element(0),
296
1.02M
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
69.2k
            : _data(data),
291
69.2k
              _options(options),
292
69.2k
              _parsed(false),
293
69.2k
              _num_elements(0),
294
69.2k
              _num_element_after_padding(0),
295
69.2k
              _size_of_element(0),
296
69.2k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
11.3k
            : _data(data),
291
11.3k
              _options(options),
292
11.3k
              _parsed(false),
293
11.3k
              _num_elements(0),
294
11.3k
              _num_element_after_padding(0),
295
11.3k
              _size_of_element(0),
296
11.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
527k
            : _data(data),
291
527k
              _options(options),
292
527k
              _parsed(false),
293
527k
              _num_elements(0),
294
527k
              _num_element_after_padding(0),
295
527k
              _size_of_element(0),
296
527k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
48.2k
            : _data(data),
291
48.2k
              _options(options),
292
48.2k
              _parsed(false),
293
48.2k
              _num_elements(0),
294
48.2k
              _num_element_after_padding(0),
295
48.2k
              _size_of_element(0),
296
48.2k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
16.0k
            : _data(data),
291
16.0k
              _options(options),
292
16.0k
              _parsed(false),
293
16.0k
              _num_elements(0),
294
16.0k
              _num_element_after_padding(0),
295
16.0k
              _size_of_element(0),
296
16.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
86.3k
            : _data(data),
291
86.3k
              _options(options),
292
86.3k
              _parsed(false),
293
86.3k
              _num_elements(0),
294
86.3k
              _num_element_after_padding(0),
295
86.3k
              _size_of_element(0),
296
86.3k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
8.91k
            : _data(data),
291
8.91k
              _options(options),
292
8.91k
              _parsed(false),
293
8.91k
              _num_elements(0),
294
8.91k
              _num_element_after_padding(0),
295
8.91k
              _size_of_element(0),
296
8.91k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
13.1k
            : _data(data),
291
13.1k
              _options(options),
292
13.1k
              _parsed(false),
293
13.1k
              _num_elements(0),
294
13.1k
              _num_element_after_padding(0),
295
13.1k
              _size_of_element(0),
296
13.1k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.89k
            : _data(data),
291
1.89k
              _options(options),
292
1.89k
              _parsed(false),
293
1.89k
              _num_elements(0),
294
1.89k
              _num_element_after_padding(0),
295
1.89k
              _size_of_element(0),
296
1.89k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
59.5k
            : _data(data),
291
59.5k
              _options(options),
292
59.5k
              _parsed(false),
293
59.5k
              _num_elements(0),
294
59.5k
              _num_element_after_padding(0),
295
59.5k
              _size_of_element(0),
296
59.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
67.4k
            : _data(data),
291
67.4k
              _options(options),
292
67.4k
              _parsed(false),
293
67.4k
              _num_elements(0),
294
67.4k
              _num_element_after_padding(0),
295
67.4k
              _size_of_element(0),
296
67.4k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
3.16k
            : _data(data),
291
3.16k
              _options(options),
292
3.16k
              _parsed(false),
293
3.16k
              _num_elements(0),
294
3.16k
              _num_element_after_padding(0),
295
3.16k
              _size_of_element(0),
296
3.16k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
2.74k
            : _data(data),
291
2.74k
              _options(options),
292
2.74k
              _parsed(false),
293
2.74k
              _num_elements(0),
294
2.74k
              _num_element_after_padding(0),
295
2.74k
              _size_of_element(0),
296
2.74k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
16.6k
            : _data(data),
291
16.6k
              _options(options),
292
16.6k
              _parsed(false),
293
16.6k
              _num_elements(0),
294
16.6k
              _num_element_after_padding(0),
295
16.6k
              _size_of_element(0),
296
16.6k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.39k
            : _data(data),
291
1.39k
              _options(options),
292
1.39k
              _parsed(false),
293
1.39k
              _num_elements(0),
294
1.39k
              _num_element_after_padding(0),
295
1.39k
              _size_of_element(0),
296
1.39k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
15.3k
            : _data(data),
291
15.3k
              _options(options),
292
15.3k
              _parsed(false),
293
15.3k
              _num_elements(0),
294
15.3k
              _num_element_after_padding(0),
295
15.3k
              _size_of_element(0),
296
15.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
39.7k
            : _data(data),
291
39.7k
              _options(options),
292
39.7k
              _parsed(false),
293
39.7k
              _num_elements(0),
294
39.7k
              _num_element_after_padding(0),
295
39.7k
              _size_of_element(0),
296
39.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
30.3k
            : _data(data),
291
30.3k
              _options(options),
292
30.3k
              _parsed(false),
293
30.3k
              _num_elements(0),
294
30.3k
              _num_element_after_padding(0),
295
30.3k
              _size_of_element(0),
296
30.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.71k
            : _data(data),
291
1.71k
              _options(options),
292
1.71k
              _parsed(false),
293
1.71k
              _num_elements(0),
294
1.71k
              _num_element_after_padding(0),
295
1.71k
              _size_of_element(0),
296
1.71k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
929
            : _data(data),
291
929
              _options(options),
292
929
              _parsed(false),
293
929
              _num_elements(0),
294
929
              _num_element_after_padding(0),
295
929
              _size_of_element(0),
296
929
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
968
            : _data(data),
291
968
              _options(options),
292
968
              _parsed(false),
293
968
              _num_elements(0),
294
968
              _num_element_after_padding(0),
295
968
              _size_of_element(0),
296
968
              _cur_index(0) {}
297
298
1.02M
    Status init() override {
299
1.02M
        CHECK(!_parsed);
300
1.02M
        size_t unused;
301
1.02M
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.02M
                                                 _num_element_after_padding, _size_of_element));
303
304
1.02M
        if (_data.size !=
305
1.02M
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.02M
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.02M
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.02M
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.02M
        _parsed = true;
325
1.02M
        return Status::OK();
326
1.02M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
69.2k
    Status init() override {
299
69.2k
        CHECK(!_parsed);
300
69.2k
        size_t unused;
301
69.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
69.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
69.2k
        if (_data.size !=
305
69.2k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
69.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
69.2k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
69.2k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
69.2k
        _parsed = true;
325
69.2k
        return Status::OK();
326
69.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
11.3k
    Status init() override {
299
11.3k
        CHECK(!_parsed);
300
11.3k
        size_t unused;
301
11.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
11.3k
                                                 _num_element_after_padding, _size_of_element));
303
304
11.3k
        if (_data.size !=
305
11.3k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
11.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
11.3k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
11.3k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
11.3k
        _parsed = true;
325
11.3k
        return Status::OK();
326
11.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
298
526k
    Status init() override {
299
526k
        CHECK(!_parsed);
300
526k
        size_t unused;
301
526k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
526k
                                                 _num_element_after_padding, _size_of_element));
303
304
526k
        if (_data.size !=
305
526k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
526k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
526k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
526k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
526k
        _parsed = true;
325
526k
        return Status::OK();
326
526k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
48.2k
    Status init() override {
299
48.2k
        CHECK(!_parsed);
300
48.2k
        size_t unused;
301
48.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
48.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
48.2k
        if (_data.size !=
305
48.2k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
48.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
48.2k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
48.2k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
48.2k
        _parsed = true;
325
48.2k
        return Status::OK();
326
48.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
298
16.0k
    Status init() override {
299
16.0k
        CHECK(!_parsed);
300
16.0k
        size_t unused;
301
16.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
16.0k
                                                 _num_element_after_padding, _size_of_element));
303
304
16.0k
        if (_data.size !=
305
16.0k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
16.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
16.0k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
16.0k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
16.0k
        _parsed = true;
325
16.0k
        return Status::OK();
326
16.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
298
86.3k
    Status init() override {
299
86.3k
        CHECK(!_parsed);
300
86.3k
        size_t unused;
301
86.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
86.3k
                                                 _num_element_after_padding, _size_of_element));
303
304
86.3k
        if (_data.size !=
305
86.3k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
86.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
86.3k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
86.3k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
86.3k
        _parsed = true;
325
86.3k
        return Status::OK();
326
86.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
298
8.91k
    Status init() override {
299
8.91k
        CHECK(!_parsed);
300
8.91k
        size_t unused;
301
8.91k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
8.91k
                                                 _num_element_after_padding, _size_of_element));
303
304
8.91k
        if (_data.size !=
305
8.91k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
8.91k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
8.91k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
8.91k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
8.91k
        _parsed = true;
325
8.91k
        return Status::OK();
326
8.91k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
298
13.1k
    Status init() override {
299
13.1k
        CHECK(!_parsed);
300
13.1k
        size_t unused;
301
13.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
13.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
13.1k
        if (_data.size !=
305
13.1k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
13.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
13.1k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
13.1k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
13.1k
        _parsed = true;
325
13.1k
        return Status::OK();
326
13.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
1.89k
    Status init() override {
299
1.89k
        CHECK(!_parsed);
300
1.89k
        size_t unused;
301
1.89k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.89k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.89k
        if (_data.size !=
305
1.89k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.89k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.89k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.89k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.89k
        _parsed = true;
325
1.89k
        return Status::OK();
326
1.89k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
59.4k
    Status init() override {
299
59.4k
        CHECK(!_parsed);
300
59.4k
        size_t unused;
301
59.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
59.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
59.4k
        if (_data.size !=
305
59.4k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
59.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
59.4k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
59.4k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
59.4k
        _parsed = true;
325
59.4k
        return Status::OK();
326
59.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
298
67.4k
    Status init() override {
299
67.4k
        CHECK(!_parsed);
300
67.4k
        size_t unused;
301
67.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
67.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
67.4k
        if (_data.size !=
305
67.4k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
67.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
67.4k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
67.4k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
67.4k
        _parsed = true;
325
67.4k
        return Status::OK();
326
67.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE4initEv
Line
Count
Source
298
3.16k
    Status init() override {
299
3.16k
        CHECK(!_parsed);
300
3.16k
        size_t unused;
301
3.16k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
3.16k
                                                 _num_element_after_padding, _size_of_element));
303
304
3.16k
        if (_data.size !=
305
3.16k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
3.16k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
3.16k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
3.16k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
3.16k
        _parsed = true;
325
3.16k
        return Status::OK();
326
3.16k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
298
2.74k
    Status init() override {
299
2.74k
        CHECK(!_parsed);
300
2.74k
        size_t unused;
301
2.74k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
2.74k
                                                 _num_element_after_padding, _size_of_element));
303
304
2.74k
        if (_data.size !=
305
2.74k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
2.74k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
2.74k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
2.74k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
2.74k
        _parsed = true;
325
2.74k
        return Status::OK();
326
2.74k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
298
16.6k
    Status init() override {
299
16.6k
        CHECK(!_parsed);
300
16.6k
        size_t unused;
301
16.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
16.6k
                                                 _num_element_after_padding, _size_of_element));
303
304
16.6k
        if (_data.size !=
305
16.6k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
16.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
16.6k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
16.6k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
16.6k
        _parsed = true;
325
16.6k
        return Status::OK();
326
16.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
298
1.39k
    Status init() override {
299
1.39k
        CHECK(!_parsed);
300
1.39k
        size_t unused;
301
1.39k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.39k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.39k
        if (_data.size !=
305
1.39k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.39k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.39k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.39k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.39k
        _parsed = true;
325
1.39k
        return Status::OK();
326
1.39k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
298
15.3k
    Status init() override {
299
15.3k
        CHECK(!_parsed);
300
15.3k
        size_t unused;
301
15.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
15.3k
                                                 _num_element_after_padding, _size_of_element));
303
304
15.3k
        if (_data.size !=
305
15.3k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
15.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
15.3k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
15.3k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
15.3k
        _parsed = true;
325
15.3k
        return Status::OK();
326
15.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
298
39.7k
    Status init() override {
299
39.7k
        CHECK(!_parsed);
300
39.7k
        size_t unused;
301
39.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
39.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
39.7k
        if (_data.size !=
305
39.7k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
39.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
39.7k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
39.7k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
39.7k
        _parsed = true;
325
39.7k
        return Status::OK();
326
39.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
298
30.3k
    Status init() override {
299
30.3k
        CHECK(!_parsed);
300
30.3k
        size_t unused;
301
30.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
30.3k
                                                 _num_element_after_padding, _size_of_element));
303
304
30.3k
        if (_data.size !=
305
30.3k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
30.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
30.3k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
30.3k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
30.3k
        _parsed = true;
325
30.3k
        return Status::OK();
326
30.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
298
1.71k
    Status init() override {
299
1.71k
        CHECK(!_parsed);
300
1.71k
        size_t unused;
301
1.71k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.71k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.71k
        if (_data.size !=
305
1.71k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.71k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.71k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.71k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.71k
        _parsed = true;
325
1.71k
        return Status::OK();
326
1.71k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
298
929
    Status init() override {
299
929
        CHECK(!_parsed);
300
929
        size_t unused;
301
929
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
929
                                                 _num_element_after_padding, _size_of_element));
303
304
929
        if (_data.size !=
305
929
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
929
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
929
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
929
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
929
        _parsed = true;
325
929
        return Status::OK();
326
929
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
298
968
    Status init() override {
299
968
        CHECK(!_parsed);
300
968
        size_t unused;
301
968
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
968
                                                 _num_element_after_padding, _size_of_element));
303
304
968
        if (_data.size !=
305
968
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
968
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
968
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
968
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
968
        _parsed = true;
325
968
        return Status::OK();
326
968
    }
327
328
    // If the page only contains null, then _num_elements == 0, and the nullmap has
329
    // some value. But in _seek_columns --> seek_to_ordinal --> _seek_to_pos_in_page
330
    // in this call stack it will pass pos == 0 to this method. Although we can add some
331
    // code such as check if the count == 0, then skip seek, but there are other method such
332
    // as init will also call seek with pos == 0. And the seek is useless when _num_elements
333
    // == 0, because next batch will return empty in this method.
334
4.42M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
4.42M
        if (_num_elements == 0) [[unlikely]] {
337
3.02k
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
3.02k
        }
342
343
4.42M
        DCHECK_LE(pos, _num_elements);
344
4.42M
        _cur_index = pos;
345
4.42M
        return Status::OK();
346
4.42M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
331k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
331k
        if (_num_elements == 0) [[unlikely]] {
337
352
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
352
        }
342
343
331k
        DCHECK_LE(pos, _num_elements);
344
331k
        _cur_index = pos;
345
331k
        return Status::OK();
346
331k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
237k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
237k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
237k
        DCHECK_LE(pos, _num_elements);
344
237k
        _cur_index = pos;
345
237k
        return Status::OK();
346
237k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.90M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
1.90M
        if (_num_elements == 0) [[unlikely]] {
337
1.53k
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
1.53k
        }
342
343
1.90M
        DCHECK_LE(pos, _num_elements);
344
1.90M
        _cur_index = pos;
345
1.90M
        return Status::OK();
346
1.90M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
154k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
154k
        if (_num_elements == 0) [[unlikely]] {
337
484
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
484
        }
342
343
154k
        DCHECK_LE(pos, _num_elements);
344
154k
        _cur_index = pos;
345
154k
        return Status::OK();
346
154k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
334
125k
    Status seek_to_position_in_page(size_t pos) override {
335
125k
        DCHECK(_parsed) << "Must call init()";
336
125k
        if (_num_elements == 0) [[unlikely]] {
337
6
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
6
        }
342
343
125k
        DCHECK_LE(pos, _num_elements);
344
125k
        _cur_index = pos;
345
125k
        return Status::OK();
346
125k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
334
11.8k
    Status seek_to_position_in_page(size_t pos) override {
335
11.8k
        DCHECK(_parsed) << "Must call init()";
336
11.8k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
11.8k
        DCHECK_LE(pos, _num_elements);
344
11.8k
        _cur_index = pos;
345
11.8k
        return Status::OK();
346
11.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
242k
    Status seek_to_position_in_page(size_t pos) override {
335
242k
        DCHECK(_parsed) << "Must call init()";
336
242k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
242k
        DCHECK_LE(pos, _num_elements);
344
242k
        _cur_index = pos;
345
242k
        return Status::OK();
346
242k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
334
214k
    Status seek_to_position_in_page(size_t pos) override {
335
214k
        DCHECK(_parsed) << "Must call init()";
336
214k
        if (_num_elements == 0) [[unlikely]] {
337
5
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
5
        }
342
343
214k
        DCHECK_LE(pos, _num_elements);
344
214k
        _cur_index = pos;
345
214k
        return Status::OK();
346
214k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
334
233k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
233k
        if (_num_elements == 0) [[unlikely]] {
337
4
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
4
        }
342
343
233k
        DCHECK_LE(pos, _num_elements);
344
233k
        _cur_index = pos;
345
233k
        return Status::OK();
346
233k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
334
522k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
522k
        if (_num_elements == 0) [[unlikely]] {
337
197
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
197
        }
342
343
522k
        DCHECK_LE(pos, _num_elements);
344
522k
        _cur_index = pos;
345
522k
        return Status::OK();
346
522k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
334
75.1k
    Status seek_to_position_in_page(size_t pos) override {
335
75.1k
        DCHECK(_parsed) << "Must call init()";
336
75.1k
        if (_num_elements == 0) [[unlikely]] {
337
14
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
14
        }
342
343
75.1k
        DCHECK_LE(pos, _num_elements);
344
75.1k
        _cur_index = pos;
345
75.1k
        return Status::OK();
346
75.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.07k
    Status seek_to_position_in_page(size_t pos) override {
335
1.07k
        DCHECK(_parsed) << "Must call init()";
336
1.07k
        if (_num_elements == 0) [[unlikely]] {
337
8
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
8
        }
342
343
1.07k
        DCHECK_LE(pos, _num_elements);
344
1.07k
        _cur_index = pos;
345
1.07k
        return Status::OK();
346
1.07k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
213k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
213k
        if (_num_elements == 0) [[unlikely]] {
337
16
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
16
        }
342
343
213k
        DCHECK_LE(pos, _num_elements);
344
213k
        _cur_index = pos;
345
213k
        return Status::OK();
346
213k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
334
7.53k
    Status seek_to_position_in_page(size_t pos) override {
335
7.53k
        DCHECK(_parsed) << "Must call init()";
336
7.53k
        if (_num_elements == 0) [[unlikely]] {
337
354
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
354
        }
342
343
7.53k
        DCHECK_LE(pos, _num_elements);
344
7.53k
        _cur_index = pos;
345
7.53k
        return Status::OK();
346
7.53k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
Line
Count
Source
334
44
    Status seek_to_position_in_page(size_t pos) override {
335
44
        DCHECK(_parsed) << "Must call init()";
336
44
        if (_num_elements == 0) [[unlikely]] {
337
4
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
4
        }
342
343
44
        DCHECK_LE(pos, _num_elements);
344
44
        _cur_index = pos;
345
44
        return Status::OK();
346
44
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Line
Count
Source
334
899
    Status seek_to_position_in_page(size_t pos) override {
335
899
        DCHECK(_parsed) << "Must call init()";
336
899
        if (_num_elements == 0) [[unlikely]] {
337
26
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
26
        }
342
343
899
        DCHECK_LE(pos, _num_elements);
344
899
        _cur_index = pos;
345
899
        return Status::OK();
346
899
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
334
17.1k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
17.1k
        if (_num_elements == 0) [[unlikely]] {
337
12
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
12
        }
342
343
17.1k
        DCHECK_LE(pos, _num_elements);
344
17.1k
        _cur_index = pos;
345
17.1k
        return Status::OK();
346
17.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Line
Count
Source
334
128k
    Status seek_to_position_in_page(size_t pos) override {
335
128k
        DCHECK(_parsed) << "Must call init()";
336
128k
        if (_num_elements == 0) [[unlikely]] {
337
10
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
10
        }
342
343
128k
        DCHECK_LE(pos, _num_elements);
344
128k
        _cur_index = pos;
345
128k
        return Status::OK();
346
128k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.93k
    Status seek_to_position_in_page(size_t pos) override {
335
1.93k
        DCHECK(_parsed) << "Must call init()";
336
1.93k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
1.93k
        DCHECK_LE(pos, _num_elements);
344
1.93k
        _cur_index = pos;
345
1.93k
        return Status::OK();
346
1.93k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE24seek_to_position_in_pageEm
Line
Count
Source
334
25
    Status seek_to_position_in_page(size_t pos) override {
335
25
        DCHECK(_parsed) << "Must call init()";
336
25
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
25
        DCHECK_LE(pos, _num_elements);
344
25
        _cur_index = pos;
345
25
        return Status::OK();
346
25
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE24seek_to_position_in_pageEm
Line
Count
Source
334
30
    Status seek_to_position_in_page(size_t pos) override {
335
30
        DCHECK(_parsed) << "Must call init()";
336
30
        if (_num_elements == 0) [[unlikely]] {
337
1
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
1
        }
342
343
30
        DCHECK_LE(pos, _num_elements);
344
30
        _cur_index = pos;
345
30
        return Status::OK();
346
30
    }
347
348
0
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
349
0
        DCHECK(_parsed) << "Must call init() firstly";
350
351
0
        if (_num_elements == 0) {
352
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
353
0
        }
354
355
0
        size_t left = 0;
356
0
        size_t right = _num_elements;
357
358
0
        void* mid_value = nullptr;
359
360
        // find the first value >= target. after loop,
361
        // - left == index of first value >= target when found
362
        // - left == _num_elements when not found (all values < target)
363
0
        while (left < right) {
364
0
            size_t mid = left + (right - left) / 2;
365
0
            mid_value = get_data(mid);
366
0
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
367
0
                left = mid + 1;
368
0
            } else {
369
0
                right = mid;
370
0
            }
371
0
        }
372
0
        if (left >= _num_elements) {
373
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
374
0
        }
375
0
        void* find_value = get_data(left);
376
0
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
377
0
            *exact_match = true;
378
0
        } else {
379
0
            *exact_match = false;
380
0
        }
381
382
0
        _cur_index = left;
383
0
        return Status::OK();
384
0
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE22seek_at_or_after_valueEPKvPb
385
386
    template <bool forward_index = true>
387
1.72M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.72M
        DCHECK(_parsed);
389
1.72M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.72M
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.72M
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.72M
        *n = max_fetch;
398
1.72M
        if constexpr (forward_index) {
399
1.51M
            _cur_index += max_fetch;
400
1.51M
        }
401
402
1.72M
        return Status::OK();
403
1.72M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
207k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
207k
        DCHECK(_parsed);
389
208k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
207k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
207k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
207k
        *n = max_fetch;
398
207k
        if constexpr (forward_index) {
399
207k
            _cur_index += max_fetch;
400
207k
        }
401
402
207k
        return Status::OK();
403
207k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
12.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
12.7k
        DCHECK(_parsed);
389
12.7k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
12.7k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
12.7k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
12.7k
        *n = max_fetch;
398
12.7k
        if constexpr (forward_index) {
399
12.7k
            _cur_index += max_fetch;
400
12.7k
        }
401
402
12.7k
        return Status::OK();
403
12.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
506k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
506k
        DCHECK(_parsed);
389
506k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
506k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
506k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
506k
        *n = max_fetch;
398
506k
        if constexpr (forward_index) {
399
506k
            _cur_index += max_fetch;
400
506k
        }
401
402
506k
        return Status::OK();
403
506k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
54.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
54.6k
        DCHECK(_parsed);
389
54.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
54.6k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
54.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
54.6k
        *n = max_fetch;
398
54.6k
        if constexpr (forward_index) {
399
54.6k
            _cur_index += max_fetch;
400
54.6k
        }
401
402
54.6k
        return Status::OK();
403
54.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
14.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
14.2k
        DCHECK(_parsed);
389
14.2k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
14.2k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
14.2k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
14.2k
        *n = max_fetch;
398
14.2k
        if constexpr (forward_index) {
399
14.2k
            _cur_index += max_fetch;
400
14.2k
        }
401
402
14.2k
        return Status::OK();
403
14.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
154k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
154k
        DCHECK(_parsed);
389
155k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
154k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
154k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
154k
        *n = max_fetch;
398
154k
        if constexpr (forward_index) {
399
154k
            _cur_index += max_fetch;
400
154k
        }
401
402
154k
        return Status::OK();
403
154k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
213k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
213k
        DCHECK(_parsed);
389
213k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
213k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
213k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
213k
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
213k
        return Status::OK();
403
213k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
6.48k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
6.48k
        DCHECK(_parsed);
389
6.48k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
6.48k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
6.48k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
6.48k
        *n = max_fetch;
398
6.48k
        if constexpr (forward_index) {
399
6.48k
            _cur_index += max_fetch;
400
6.48k
        }
401
402
6.48k
        return Status::OK();
403
6.48k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
10.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
10.6k
        DCHECK(_parsed);
389
10.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
10.6k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
10.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
10.6k
        *n = max_fetch;
398
10.6k
        if constexpr (forward_index) {
399
10.6k
            _cur_index += max_fetch;
400
10.6k
        }
401
402
10.6k
        return Status::OK();
403
10.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
10.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
10.0k
        DCHECK(_parsed);
389
10.0k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
10.0k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
10.0k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
10.0k
        *n = max_fetch;
398
10.0k
        if constexpr (forward_index) {
399
10.0k
            _cur_index += max_fetch;
400
10.0k
        }
401
402
10.0k
        return Status::OK();
403
10.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
382k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
382k
        DCHECK(_parsed);
389
382k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
382k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
382k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
382k
        *n = max_fetch;
398
382k
        if constexpr (forward_index) {
399
382k
            _cur_index += max_fetch;
400
382k
        }
401
402
382k
        return Status::OK();
403
382k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
69.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
69.4k
        DCHECK(_parsed);
389
69.4k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
69.4k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
69.4k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
69.4k
        *n = max_fetch;
398
69.4k
        if constexpr (forward_index) {
399
69.4k
            _cur_index += max_fetch;
400
69.4k
        }
401
402
69.4k
        return Status::OK();
403
69.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
2.29k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
2.29k
        DCHECK(_parsed);
389
2.29k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
2.29k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
2.29k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
2.29k
        *n = max_fetch;
398
2.29k
        if constexpr (forward_index) {
399
2.29k
            _cur_index += max_fetch;
400
2.29k
        }
401
402
2.29k
        return Status::OK();
403
2.29k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
1.84k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.84k
        DCHECK(_parsed);
389
1.84k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.84k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.84k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.84k
        *n = max_fetch;
398
1.84k
        if constexpr (forward_index) {
399
1.84k
            _cur_index += max_fetch;
400
1.84k
        }
401
402
1.84k
        return Status::OK();
403
1.84k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
8.62k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
8.62k
        DCHECK(_parsed);
389
8.62k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
8.62k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
8.62k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
8.62k
        *n = max_fetch;
398
8.62k
        if constexpr (forward_index) {
399
8.62k
            _cur_index += max_fetch;
400
8.62k
        }
401
402
8.62k
        return Status::OK();
403
8.62k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
1.26k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.26k
        DCHECK(_parsed);
389
1.26k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.26k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.26k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.26k
        *n = max_fetch;
398
1.26k
        if constexpr (forward_index) {
399
1.26k
            _cur_index += max_fetch;
400
1.26k
        }
401
402
1.26k
        return Status::OK();
403
1.26k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
9.76k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
9.76k
        DCHECK(_parsed);
389
9.76k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
9.76k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
9.76k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
9.76k
        *n = max_fetch;
398
9.76k
        if constexpr (forward_index) {
399
9.76k
            _cur_index += max_fetch;
400
9.76k
        }
401
402
9.76k
        return Status::OK();
403
9.76k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
29.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
29.1k
        DCHECK(_parsed);
389
29.1k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
29.1k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
29.1k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
29.1k
        *n = max_fetch;
398
29.1k
        if constexpr (forward_index) {
399
29.1k
            _cur_index += max_fetch;
400
29.1k
        }
401
402
29.1k
        return Status::OK();
403
29.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
22.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
22.1k
        DCHECK(_parsed);
389
22.1k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
22.1k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
22.1k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
22.1k
        *n = max_fetch;
398
22.1k
        if constexpr (forward_index) {
399
22.1k
            _cur_index += max_fetch;
400
22.1k
        }
401
402
22.1k
        return Status::OK();
403
22.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.12k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.12k
        DCHECK(_parsed);
389
3.12k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.12k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.12k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.12k
        *n = max_fetch;
398
3.12k
        if constexpr (forward_index) {
399
3.12k
            _cur_index += max_fetch;
400
3.12k
        }
401
402
3.12k
        return Status::OK();
403
3.12k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
637
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
637
        DCHECK(_parsed);
389
637
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
637
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
637
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
637
        *n = max_fetch;
398
637
        if constexpr (forward_index) {
399
637
            _cur_index += max_fetch;
400
637
        }
401
402
637
        return Status::OK();
403
637
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
659
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
659
        DCHECK(_parsed);
389
659
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
659
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
659
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
659
        *n = max_fetch;
398
659
        if constexpr (forward_index) {
399
659
            _cur_index += max_fetch;
400
659
        }
401
402
659
        return Status::OK();
403
659
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
404
405
1.50M
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
207k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
12.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
506k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
54.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
14.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
154k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
6.48k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
10.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
10.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
382k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
69.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
2.29k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
1.84k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
8.62k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
1.26k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
9.76k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
29.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
22.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
3.12k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
637
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
659
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
406
407
    Status read_by_rowids(const rowid_t* rowids, ordinal_t page_first_ordinal, size_t* n,
408
319k
                          MutableColumnPtr& dst) override {
409
319k
        DCHECK(_parsed);
410
319k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
319k
        auto total = *n;
416
319k
        auto read_count = 0;
417
319k
        _buffer.resize(total);
418
121M
        for (size_t i = 0; i < total; ++i) {
419
121M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
121M
            if (UNLIKELY(ord >= _num_elements)) {
421
13.4k
                break;
422
13.4k
            }
423
424
121M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
121M
        }
426
427
319k
        if (LIKELY(read_count > 0)) {
428
319k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
319k
        }
430
431
319k
        *n = read_count;
432
319k
        return Status::OK();
433
319k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
24.4k
                          MutableColumnPtr& dst) override {
409
24.4k
        DCHECK(_parsed);
410
24.4k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
24.4k
        auto total = *n;
416
24.4k
        auto read_count = 0;
417
24.4k
        _buffer.resize(total);
418
1.71M
        for (size_t i = 0; i < total; ++i) {
419
1.69M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.69M
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
1.69M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.69M
        }
426
427
24.4k
        if (LIKELY(read_count > 0)) {
428
24.4k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
24.4k
        }
430
431
24.4k
        *n = read_count;
432
24.4k
        return Status::OK();
433
24.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4.98k
                          MutableColumnPtr& dst) override {
409
4.98k
        DCHECK(_parsed);
410
4.98k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.98k
        auto total = *n;
416
4.98k
        auto read_count = 0;
417
4.98k
        _buffer.resize(total);
418
624k
        for (size_t i = 0; i < total; ++i) {
419
619k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
619k
            if (UNLIKELY(ord >= _num_elements)) {
421
13
                break;
422
13
            }
423
424
619k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
619k
        }
426
427
4.98k
        if (LIKELY(read_count > 0)) {
428
4.98k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.98k
        }
430
431
4.98k
        *n = read_count;
432
4.98k
        return Status::OK();
433
4.98k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
81.6k
                          MutableColumnPtr& dst) override {
409
81.6k
        DCHECK(_parsed);
410
81.6k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
81.6k
        auto total = *n;
416
81.6k
        auto read_count = 0;
417
81.6k
        _buffer.resize(total);
418
35.2M
        for (size_t i = 0; i < total; ++i) {
419
35.1M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
35.1M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.56k
                break;
422
1.56k
            }
423
424
35.1M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
35.1M
        }
426
427
81.6k
        if (LIKELY(read_count > 0)) {
428
81.6k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
81.6k
        }
430
431
81.6k
        *n = read_count;
432
81.6k
        return Status::OK();
433
81.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
35.0k
                          MutableColumnPtr& dst) override {
409
35.0k
        DCHECK(_parsed);
410
35.0k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
35.0k
        auto total = *n;
416
35.0k
        auto read_count = 0;
417
35.0k
        _buffer.resize(total);
418
23.5M
        for (size_t i = 0; i < total; ++i) {
419
23.5M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
23.5M
            if (UNLIKELY(ord >= _num_elements)) {
421
2.09k
                break;
422
2.09k
            }
423
424
23.5M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
23.5M
        }
426
427
35.1k
        if (LIKELY(read_count > 0)) {
428
35.1k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
35.1k
        }
430
431
35.0k
        *n = read_count;
432
35.0k
        return Status::OK();
433
35.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
7.24k
                          MutableColumnPtr& dst) override {
409
7.24k
        DCHECK(_parsed);
410
7.24k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
7.24k
        auto total = *n;
416
7.24k
        auto read_count = 0;
417
7.24k
        _buffer.resize(total);
418
1.32M
        for (size_t i = 0; i < total; ++i) {
419
1.32M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.32M
            if (UNLIKELY(ord >= _num_elements)) {
421
553
                break;
422
553
            }
423
424
1.32M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.32M
        }
426
427
7.24k
        if (LIKELY(read_count > 0)) {
428
7.24k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
7.24k
        }
430
431
7.24k
        *n = read_count;
432
7.24k
        return Status::OK();
433
7.24k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
26.3k
                          MutableColumnPtr& dst) override {
409
26.3k
        DCHECK(_parsed);
410
26.3k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
26.3k
        auto total = *n;
416
26.3k
        auto read_count = 0;
417
26.3k
        _buffer.resize(total);
418
545k
        for (size_t i = 0; i < total; ++i) {
419
519k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
519k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
519k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
519k
        }
426
427
26.3k
        if (LIKELY(read_count > 0)) {
428
26.3k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
26.3k
        }
430
431
26.3k
        *n = read_count;
432
26.3k
        return Status::OK();
433
26.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4.75k
                          MutableColumnPtr& dst) override {
409
4.75k
        DCHECK(_parsed);
410
4.75k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.75k
        auto total = *n;
416
4.75k
        auto read_count = 0;
417
4.75k
        _buffer.resize(total);
418
1.21M
        for (size_t i = 0; i < total; ++i) {
419
1.20M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.20M
            if (UNLIKELY(ord >= _num_elements)) {
421
31
                break;
422
31
            }
423
424
1.20M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.20M
        }
426
427
4.75k
        if (LIKELY(read_count > 0)) {
428
4.75k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.75k
        }
430
431
4.75k
        *n = read_count;
432
4.75k
        return Status::OK();
433
4.75k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
8.97k
                          MutableColumnPtr& dst) override {
409
8.97k
        DCHECK(_parsed);
410
8.97k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
8.97k
        auto total = *n;
416
8.97k
        auto read_count = 0;
417
8.97k
        _buffer.resize(total);
418
4.22M
        for (size_t i = 0; i < total; ++i) {
419
4.21M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
4.21M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.42k
                break;
422
1.42k
            }
423
424
4.21M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
4.21M
        }
426
427
8.97k
        if (LIKELY(read_count > 0)) {
428
8.97k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
8.97k
        }
430
431
8.97k
        *n = read_count;
432
8.97k
        return Status::OK();
433
8.97k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1.43k
                          MutableColumnPtr& dst) override {
409
1.43k
        DCHECK(_parsed);
410
1.43k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.43k
        auto total = *n;
416
1.43k
        auto read_count = 0;
417
1.43k
        _buffer.resize(total);
418
501k
        for (size_t i = 0; i < total; ++i) {
419
499k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
499k
            if (UNLIKELY(ord >= _num_elements)) {
421
15
                break;
422
15
            }
423
424
499k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
499k
        }
426
427
1.43k
        if (LIKELY(read_count > 0)) {
428
1.43k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.43k
        }
430
431
1.43k
        *n = read_count;
432
1.43k
        return Status::OK();
433
1.43k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
28.8k
                          MutableColumnPtr& dst) override {
409
28.8k
        DCHECK(_parsed);
410
28.8k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
28.8k
        auto total = *n;
416
28.8k
        auto read_count = 0;
417
28.8k
        _buffer.resize(total);
418
7.43M
        for (size_t i = 0; i < total; ++i) {
419
7.40M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
7.40M
            if (UNLIKELY(ord >= _num_elements)) {
421
635
                break;
422
635
            }
423
424
7.40M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
7.40M
        }
426
427
28.9k
        if (LIKELY(read_count > 0)) {
428
28.9k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
28.9k
        }
430
431
28.8k
        *n = read_count;
432
28.8k
        return Status::OK();
433
28.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
32.2k
                          MutableColumnPtr& dst) override {
409
32.2k
        DCHECK(_parsed);
410
32.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
32.2k
        auto total = *n;
416
32.2k
        auto read_count = 0;
417
32.2k
        _buffer.resize(total);
418
9.84M
        for (size_t i = 0; i < total; ++i) {
419
9.81M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.81M
            if (UNLIKELY(ord >= _num_elements)) {
421
210
                break;
422
210
            }
423
424
9.81M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.81M
        }
426
427
32.2k
        if (LIKELY(read_count > 0)) {
428
32.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
32.2k
        }
430
431
32.2k
        *n = read_count;
432
32.2k
        return Status::OK();
433
32.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1.17k
                          MutableColumnPtr& dst) override {
409
1.17k
        DCHECK(_parsed);
410
1.17k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.17k
        auto total = *n;
416
1.17k
        auto read_count = 0;
417
1.17k
        _buffer.resize(total);
418
4.01k
        for (size_t i = 0; i < total; ++i) {
419
2.83k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
2.83k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
2.83k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
2.83k
        }
426
427
1.17k
        if (LIKELY(read_count > 0)) {
428
1.17k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.17k
        }
430
431
1.17k
        *n = read_count;
432
1.17k
        return Status::OK();
433
1.17k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1.85k
                          MutableColumnPtr& dst) override {
409
1.85k
        DCHECK(_parsed);
410
1.85k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.85k
        auto total = *n;
416
1.85k
        auto read_count = 0;
417
1.85k
        _buffer.resize(total);
418
503k
        for (size_t i = 0; i < total; ++i) {
419
501k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
501k
            if (UNLIKELY(ord >= _num_elements)) {
421
249
                break;
422
249
            }
423
424
501k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
501k
        }
426
427
1.85k
        if (LIKELY(read_count > 0)) {
428
1.85k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.85k
        }
430
431
1.85k
        *n = read_count;
432
1.85k
        return Status::OK();
433
1.85k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.1k
                          MutableColumnPtr& dst) override {
409
13.1k
        DCHECK(_parsed);
410
13.1k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.1k
        auto total = *n;
416
13.1k
        auto read_count = 0;
417
13.1k
        _buffer.resize(total);
418
27.8k
        for (size_t i = 0; i < total; ++i) {
419
14.7k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.7k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
14.7k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.7k
        }
426
427
13.1k
        if (LIKELY(read_count > 0)) {
428
13.1k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.1k
        }
430
431
13.1k
        *n = read_count;
432
13.1k
        return Status::OK();
433
13.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
155
                          MutableColumnPtr& dst) override {
409
155
        DCHECK(_parsed);
410
155
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
155
        auto total = *n;
416
155
        auto read_count = 0;
417
155
        _buffer.resize(total);
418
315
        for (size_t i = 0; i < total; ++i) {
419
160
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
160
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
160
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
160
        }
426
427
155
        if (LIKELY(read_count > 0)) {
428
155
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
155
        }
430
431
155
        *n = read_count;
432
155
        return Status::OK();
433
155
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4.56k
                          MutableColumnPtr& dst) override {
409
4.56k
        DCHECK(_parsed);
410
4.56k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.56k
        auto total = *n;
416
4.56k
        auto read_count = 0;
417
4.56k
        _buffer.resize(total);
418
19.0k
        for (size_t i = 0; i < total; ++i) {
419
14.5k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.5k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
14.5k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.5k
        }
426
427
4.56k
        if (LIKELY(read_count > 0)) {
428
4.56k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.56k
        }
430
431
4.56k
        *n = read_count;
432
4.56k
        return Status::OK();
433
4.56k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
27.8k
                          MutableColumnPtr& dst) override {
409
27.8k
        DCHECK(_parsed);
410
27.8k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
27.8k
        auto total = *n;
416
27.8k
        auto read_count = 0;
417
27.8k
        _buffer.resize(total);
418
25.6M
        for (size_t i = 0; i < total; ++i) {
419
25.6M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
25.6M
            if (UNLIKELY(ord >= _num_elements)) {
421
5.93k
                break;
422
5.93k
            }
423
424
25.6M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
25.6M
        }
426
427
27.8k
        if (LIKELY(read_count > 0)) {
428
27.8k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
27.8k
        }
430
431
27.8k
        *n = read_count;
432
27.8k
        return Status::OK();
433
27.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.3k
                          MutableColumnPtr& dst) override {
409
13.3k
        DCHECK(_parsed);
410
13.3k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.3k
        auto total = *n;
416
13.3k
        auto read_count = 0;
417
13.3k
        _buffer.resize(total);
418
9.01M
        for (size_t i = 0; i < total; ++i) {
419
9.00M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.00M
            if (UNLIKELY(ord >= _num_elements)) {
421
722
                break;
422
722
            }
423
424
9.00M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.00M
        }
426
427
13.3k
        if (LIKELY(read_count > 0)) {
428
13.3k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.3k
        }
430
431
13.3k
        *n = read_count;
432
13.3k
        return Status::OK();
433
13.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
960
                          MutableColumnPtr& dst) override {
409
960
        DCHECK(_parsed);
410
960
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
960
        auto total = *n;
416
960
        auto read_count = 0;
417
960
        _buffer.resize(total);
418
2.77k
        for (size_t i = 0; i < total; ++i) {
419
1.81k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.81k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
1.81k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.81k
        }
426
427
960
        if (LIKELY(read_count > 0)) {
428
960
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
960
        }
430
431
960
        *n = read_count;
432
960
        return Status::OK();
433
960
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
289
                          MutableColumnPtr& dst) override {
409
289
        DCHECK(_parsed);
410
289
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
289
        auto total = *n;
416
289
        auto read_count = 0;
417
289
        _buffer.resize(total);
418
822
        for (size_t i = 0; i < total; ++i) {
419
533
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
533
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
533
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
533
        }
426
427
289
        if (LIKELY(read_count > 0)) {
428
289
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
289
        }
430
431
289
        *n = read_count;
432
289
        return Status::OK();
433
289
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
321
                          MutableColumnPtr& dst) override {
409
321
        DCHECK(_parsed);
410
321
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
321
        auto total = *n;
416
321
        auto read_count = 0;
417
321
        _buffer.resize(total);
418
1.15k
        for (size_t i = 0; i < total; ++i) {
419
836
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
836
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
836
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
836
        }
426
427
321
        if (LIKELY(read_count > 0)) {
428
321
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
321
        }
430
431
321
        *n = read_count;
432
321
        return Status::OK();
433
321
    }
434
435
213k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
213k
        return next_batch<false>(n, dst);
437
213k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
435
213k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
213k
        return next_batch<false>(n, dst);
437
213k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
438
439
4
    size_t count() const override { return _num_elements; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE5countEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
439
4
    size_t count() const override { return _num_elements; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE5countEv
440
441
4.02M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
441
235k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
441
233k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
2.00M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
122k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
441
119k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE13current_indexEv
Line
Count
Source
441
240k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
209k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
441
226k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
441
242k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
441
45.4k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE13current_indexEv
Line
Count
Source
441
280
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
441
212k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Line
Count
Source
441
1.07k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE13current_indexEv
Line
Count
Source
441
8
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE13current_indexEv
Line
Count
Source
441
3.42k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
441
1.00k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
441
123k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE13current_indexEv
Line
Count
Source
441
307
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE13current_indexEv
Line
Count
Source
441
41
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
Line
Count
Source
441
47
    size_t current_index() const override { return _cur_index; }
442
443
123M
    char* get_data(size_t index) const {
444
123M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
123M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
1.90M
    char* get_data(size_t index) const {
444
1.90M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.90M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
443
632k
    char* get_data(size_t index) const {
444
632k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
632k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
36.6M
    char* get_data(size_t index) const {
444
36.6M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
36.6M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
443
23.6M
    char* get_data(size_t index) const {
444
23.6M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
23.6M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
1.33M
    char* get_data(size_t index) const {
444
1.33M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.33M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
887k
    char* get_data(size_t index) const {
444
887k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
887k
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
1.21M
    char* get_data(size_t index) const {
444
1.21M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.21M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
4.22M
    char* get_data(size_t index) const {
444
4.22M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
4.22M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
509k
    char* get_data(size_t index) const {
444
509k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
509k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
7.78M
    char* get_data(size_t index) const {
444
7.78M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
7.78M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
443
9.88M
    char* get_data(size_t index) const {
444
9.88M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.88M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE8get_dataEm
Line
Count
Source
443
5.13k
    char* get_data(size_t index) const {
444
5.13k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
5.13k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
443
503k
    char* get_data(size_t index) const {
444
503k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
503k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
443
23.3k
    char* get_data(size_t index) const {
444
23.3k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
23.3k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
443
1.42k
    char* get_data(size_t index) const {
444
1.42k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.42k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
443
24.2k
    char* get_data(size_t index) const {
444
24.2k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
24.2k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
443
25.7M
    char* get_data(size_t index) const {
444
25.7M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
25.7M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
9.02M
    char* get_data(size_t index) const {
444
9.02M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.02M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
443
4.93k
    char* get_data(size_t index) const {
444
4.93k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
4.93k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Line
Count
Source
443
1.16k
    char* get_data(size_t index) const {
444
1.16k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.16k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
Line
Count
Source
443
1.49k
    char* get_data(size_t index) const {
444
1.49k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.49k
    }
446
447
private:
448
    void _copy_next_values(size_t n, void* data) {
449
        memcpy(data, get_data(_cur_index), n * SIZE_OF_TYPE);
450
    }
451
452
    using CppType = typename TypeTraits<Type>::CppType;
453
454
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
455
456
    Slice _data;
457
    PageDecoderOptions _options;
458
    bool _parsed;
459
    size_t _num_elements;
460
    size_t _num_element_after_padding;
461
462
    int _size_of_element;
463
    size_t _cur_index;
464
465
    std::vector<std::conditional_t<std::is_same_v<CppType, bool>, uint8_t, CppType>> _buffer;
466
467
    friend class BinaryDictPageDecoder;
468
};
469
470
} // namespace segment_v2
471
} // namespace doris