Coverage Report

Created: 2026-06-03 15:43

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
749k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
348k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
37.6k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
5.52k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
126k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
8.30k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
95
67.6k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
95
11.7k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
95
18.9k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
184
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
36.1k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
95
41.2k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
285
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
95
7.08k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
191
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
95
9.49k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
95
11.8k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
95
15.7k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
95
1.15k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
95
786
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
95
698
    Status init() override { return reset(); }
96
97
143M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
142M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
38.1k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
5.94k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
201k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
8.64k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
67.9k
    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
11.5k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
97
21.0k
    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
191
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
76.7k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
75.8k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
97
339
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
Line
Count
Source
97
7.02k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
97
98
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
97
5.00k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
26.0k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
97
21.7k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Line
Count
Source
97
1.37k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Line
Count
Source
97
25.7k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
97
3.12k
    bool is_page_full() override { return _remain_element_capacity == 0; }
98
99
1.20M
    Status add(const uint8_t* vals, size_t* count) override {
100
1.20M
        return add_internal<false>(vals, count);
101
1.20M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
99
611k
    Status add(const uint8_t* vals, size_t* count) override {
100
611k
        return add_internal<false>(vals, count);
101
611k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
38.1k
    Status add(const uint8_t* vals, size_t* count) override {
100
38.1k
        return add_internal<false>(vals, count);
101
38.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
5.94k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.94k
        return add_internal<false>(vals, count);
101
5.94k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
201k
    Status add(const uint8_t* vals, size_t* count) override {
100
201k
        return add_internal<false>(vals, count);
101
201k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
8.64k
    Status add(const uint8_t* vals, size_t* count) override {
100
8.64k
        return add_internal<false>(vals, count);
101
8.64k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
67.9k
    Status add(const uint8_t* vals, size_t* count) override {
100
67.9k
        return add_internal<false>(vals, count);
101
67.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
99
11.5k
    Status add(const uint8_t* vals, size_t* count) override {
100
11.5k
        return add_internal<false>(vals, count);
101
11.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
99
21.0k
    Status add(const uint8_t* vals, size_t* count) override {
100
21.0k
        return add_internal<false>(vals, count);
101
21.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
191
    Status add(const uint8_t* vals, size_t* count) override {
100
191
        return add_internal<false>(vals, count);
101
191
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
76.7k
    Status add(const uint8_t* vals, size_t* count) override {
100
76.7k
        return add_internal<false>(vals, count);
101
76.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
75.8k
    Status add(const uint8_t* vals, size_t* count) override {
100
75.8k
        return add_internal<false>(vals, count);
101
75.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
99
339
    Status add(const uint8_t* vals, size_t* count) override {
100
339
        return add_internal<false>(vals, count);
101
339
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
Line
Count
Source
99
7.02k
    Status add(const uint8_t* vals, size_t* count) override {
100
7.02k
        return add_internal<false>(vals, count);
101
7.02k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
98
    Status add(const uint8_t* vals, size_t* count) override {
100
98
        return add_internal<false>(vals, count);
101
98
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
99
5.00k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.00k
        return add_internal<false>(vals, count);
101
5.00k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
26.0k
    Status add(const uint8_t* vals, size_t* count) override {
100
26.0k
        return add_internal<false>(vals, count);
101
26.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
99
21.7k
    Status add(const uint8_t* vals, size_t* count) override {
100
21.7k
        return add_internal<false>(vals, count);
101
21.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Line
Count
Source
99
1.37k
    Status add(const uint8_t* vals, size_t* count) override {
100
1.37k
        return add_internal<false>(vals, count);
101
1.37k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Line
Count
Source
99
25.7k
    Status add(const uint8_t* vals, size_t* count) override {
100
25.7k
        return add_internal<false>(vals, count);
101
25.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
99
3.12k
    Status add(const uint8_t* vals, size_t* count) override {
100
3.12k
        return add_internal<false>(vals, count);
101
3.12k
    }
102
103
144M
    Status single_add(const uint8_t* vals, size_t* count) {
104
144M
        return add_internal<true>(vals, count);
105
144M
    }
106
107
    template <bool single>
108
145M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
145M
        DCHECK(!_finished);
110
145M
        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
145M
        uint32_t to_add = cast_set<UInt32>(
126
145M
                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
145M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
145M
        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
145M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
145M
        _count += to_add;
134
145M
        _remain_element_capacity -= to_add;
135
145M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
145M
        *num_written = to_add;
138
145M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
143M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
143M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
143M
                        *reinterpret_cast<const uint32_t*>(vals);
149
143M
                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
143M
        }
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
145M
        return Status::OK();
159
145M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
611k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
611k
        DCHECK(!_finished);
110
611k
        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
611k
        uint32_t to_add = cast_set<UInt32>(
126
611k
                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
611k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
611k
        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
611k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
611k
        _count += to_add;
134
611k
        _remain_element_capacity -= to_add;
135
611k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
611k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
611k
        memcpy(&_data[orig_size], vals, to_add_size);
158
611k
        return Status::OK();
159
611k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
144M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
144M
        DCHECK(!_finished);
110
144M
        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
144M
        uint32_t to_add = cast_set<UInt32>(
126
144M
                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
144M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
144M
        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
144M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
143M
        _count += to_add;
134
143M
        _remain_element_capacity -= to_add;
135
143M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
143M
        *num_written = to_add;
138
143M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
143M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
143M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
143M
                        *reinterpret_cast<const uint32_t*>(vals);
149
143M
                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
143M
        }
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
143M
        return Status::OK();
159
144M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
38.1k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
38.1k
        DCHECK(!_finished);
110
38.1k
        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.1k
        uint32_t to_add = cast_set<UInt32>(
126
38.1k
                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.1k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
38.1k
        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.1k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
38.1k
        _count += to_add;
134
38.1k
        _remain_element_capacity -= to_add;
135
38.1k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
38.1k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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.1k
        memcpy(&_data[orig_size], vals, to_add_size);
158
38.1k
        return Status::OK();
159
38.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
5.94k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.94k
        DCHECK(!_finished);
110
5.94k
        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.94k
        uint32_t to_add = cast_set<UInt32>(
126
5.94k
                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.94k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.94k
        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.94k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.94k
        _count += to_add;
134
5.94k
        _remain_element_capacity -= to_add;
135
5.94k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.94k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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.94k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.94k
        return Status::OK();
159
5.94k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
201k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
201k
        DCHECK(!_finished);
110
201k
        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
201k
        uint32_t to_add = cast_set<UInt32>(
126
201k
                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
201k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
201k
        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
201k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
201k
        _count += to_add;
134
201k
        _remain_element_capacity -= to_add;
135
201k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
201k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
201k
        memcpy(&_data[orig_size], vals, to_add_size);
158
201k
        return Status::OK();
159
201k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
8.64k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
8.64k
        DCHECK(!_finished);
110
8.64k
        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.64k
        uint32_t to_add = cast_set<UInt32>(
126
8.64k
                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.64k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
8.64k
        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.64k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
8.64k
        _count += to_add;
134
8.64k
        _remain_element_capacity -= to_add;
135
8.64k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
8.64k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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.64k
        memcpy(&_data[orig_size], vals, to_add_size);
158
8.64k
        return Status::OK();
159
8.64k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
67.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
67.9k
        DCHECK(!_finished);
110
67.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
67.9k
        uint32_t to_add = cast_set<UInt32>(
126
67.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
67.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
67.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
67.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
67.9k
        _count += to_add;
134
67.9k
        _remain_element_capacity -= to_add;
135
67.9k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
67.9k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
67.9k
        memcpy(&_data[orig_size], vals, to_add_size);
158
67.9k
        return Status::OK();
159
67.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
11.5k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
11.5k
        DCHECK(!_finished);
110
11.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
11.5k
        uint32_t to_add = cast_set<UInt32>(
126
11.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
11.5k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
11.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
11.5k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
11.5k
        _count += to_add;
134
11.5k
        _remain_element_capacity -= to_add;
135
11.5k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
11.5k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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.5k
        memcpy(&_data[orig_size], vals, to_add_size);
158
11.5k
        return Status::OK();
159
11.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
21.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
21.0k
        DCHECK(!_finished);
110
21.0k
        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
21.0k
        uint32_t to_add = cast_set<UInt32>(
126
21.0k
                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
21.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
21.0k
        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
21.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
21.0k
        _count += to_add;
134
21.0k
        _remain_element_capacity -= to_add;
135
21.0k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
21.0k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
21.0k
        memcpy(&_data[orig_size], vals, to_add_size);
158
21.0k
        return Status::OK();
159
21.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
191
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
191
        DCHECK(!_finished);
110
191
        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
191
        uint32_t to_add = cast_set<UInt32>(
126
191
                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
191
        int to_add_size = to_add * SIZE_OF_TYPE;
129
191
        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
191
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
191
        _count += to_add;
134
191
        _remain_element_capacity -= to_add;
135
191
        _raw_data_size += to_add_size;
136
        // return added number through count
137
191
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
191
        memcpy(&_data[orig_size], vals, to_add_size);
158
191
        return Status::OK();
159
191
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
76.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
76.7k
        DCHECK(!_finished);
110
76.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
76.7k
        uint32_t to_add = cast_set<UInt32>(
126
76.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
76.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
76.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
76.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
76.7k
        _count += to_add;
134
76.7k
        _remain_element_capacity -= to_add;
135
76.7k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
76.7k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
76.7k
        memcpy(&_data[orig_size], vals, to_add_size);
158
76.7k
        return Status::OK();
159
76.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
75.8k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
75.8k
        DCHECK(!_finished);
110
75.8k
        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
75.8k
        uint32_t to_add = cast_set<UInt32>(
126
75.8k
                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
75.8k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
75.8k
        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
75.8k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
75.8k
        _count += to_add;
134
75.8k
        _remain_element_capacity -= to_add;
135
75.8k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
75.8k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
75.8k
        memcpy(&_data[orig_size], vals, to_add_size);
158
75.8k
        return Status::OK();
159
75.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
339
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
339
        DCHECK(!_finished);
110
339
        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
339
        uint32_t to_add = cast_set<UInt32>(
126
339
                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
339
        int to_add_size = to_add * SIZE_OF_TYPE;
129
339
        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
339
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
339
        _count += to_add;
134
339
        _remain_element_capacity -= to_add;
135
339
        _raw_data_size += to_add_size;
136
        // return added number through count
137
339
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
339
        memcpy(&_data[orig_size], vals, to_add_size);
158
339
        return Status::OK();
159
339
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
7.02k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
7.02k
        DCHECK(!_finished);
110
7.02k
        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.02k
        uint32_t to_add = cast_set<UInt32>(
126
7.02k
                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.02k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
7.02k
        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.02k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
7.02k
        _count += to_add;
134
7.02k
        _remain_element_capacity -= to_add;
135
7.02k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
7.02k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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.02k
        memcpy(&_data[orig_size], vals, to_add_size);
158
7.02k
        return Status::OK();
159
7.02k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
98
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
98
        DCHECK(!_finished);
110
98
        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
98
        uint32_t to_add = cast_set<UInt32>(
126
98
                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
98
        int to_add_size = to_add * SIZE_OF_TYPE;
129
98
        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
98
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
98
        _count += to_add;
134
98
        _remain_element_capacity -= to_add;
135
98
        _raw_data_size += to_add_size;
136
        // return added number through count
137
98
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
98
        memcpy(&_data[orig_size], vals, to_add_size);
158
98
        return Status::OK();
159
98
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
5.00k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.00k
        DCHECK(!_finished);
110
5.00k
        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.00k
        uint32_t to_add = cast_set<UInt32>(
126
5.00k
                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.00k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.00k
        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.00k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.00k
        _count += to_add;
134
5.00k
        _remain_element_capacity -= to_add;
135
5.00k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.00k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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.00k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.00k
        return Status::OK();
159
5.00k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
26.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
26.0k
        DCHECK(!_finished);
110
26.0k
        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
26.0k
        uint32_t to_add = cast_set<UInt32>(
126
26.0k
                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
26.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
26.0k
        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
26.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
26.0k
        _count += to_add;
134
26.0k
        _remain_element_capacity -= to_add;
135
26.0k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
26.0k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
26.0k
        memcpy(&_data[orig_size], vals, to_add_size);
158
26.0k
        return Status::OK();
159
26.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
21.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
21.7k
        DCHECK(!_finished);
110
21.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
21.7k
        uint32_t to_add = cast_set<UInt32>(
126
21.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
21.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
21.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
21.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
21.7k
        _count += to_add;
134
21.7k
        _remain_element_capacity -= to_add;
135
21.7k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
21.7k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
21.7k
        memcpy(&_data[orig_size], vals, to_add_size);
158
21.7k
        return Status::OK();
159
21.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
1.37k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
1.37k
        DCHECK(!_finished);
110
1.37k
        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.37k
        uint32_t to_add = cast_set<UInt32>(
126
1.37k
                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.37k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
1.37k
        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.37k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
1.37k
        _count += to_add;
134
1.37k
        _remain_element_capacity -= to_add;
135
1.37k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
1.37k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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.37k
        memcpy(&_data[orig_size], vals, to_add_size);
158
1.37k
        return Status::OK();
159
1.37k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
25.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
25.7k
        DCHECK(!_finished);
110
25.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
25.7k
        uint32_t to_add = cast_set<UInt32>(
126
25.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
25.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
25.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
25.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
25.7k
        _count += to_add;
134
25.7k
        _remain_element_capacity -= to_add;
135
25.7k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
25.7k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
25.7k
        memcpy(&_data[orig_size], vals, to_add_size);
158
25.7k
        return Status::OK();
159
25.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
3.12k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
3.12k
        DCHECK(!_finished);
110
3.12k
        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
3.12k
        uint32_t to_add = cast_set<UInt32>(
126
3.12k
                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
3.12k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
3.12k
        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
3.12k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
3.12k
        _count += to_add;
134
3.12k
        _remain_element_capacity -= to_add;
135
3.12k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
3.12k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
3.12k
        memcpy(&_data[orig_size], vals, to_add_size);
158
3.12k
        return Status::OK();
159
3.12k
    }
160
161
747k
    Status finish(OwnedSlice* slice) override {
162
747k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
747k
        return Status::OK();
164
747k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
335k
    Status finish(OwnedSlice* slice) override {
162
335k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
335k
        return Status::OK();
164
335k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
36.8k
    Status finish(OwnedSlice* slice) override {
162
36.8k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
36.8k
        return Status::OK();
164
36.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
5.42k
    Status finish(OwnedSlice* slice) override {
162
5.42k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
5.42k
        return Status::OK();
164
5.42k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
131k
    Status finish(OwnedSlice* slice) override {
162
131k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
131k
        return Status::OK();
164
131k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
8.57k
    Status finish(OwnedSlice* slice) override {
162
8.57k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
8.57k
        return Status::OK();
164
8.57k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
67.3k
    Status finish(OwnedSlice* slice) override {
162
67.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
67.3k
        return Status::OK();
164
67.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
10.9k
    Status finish(OwnedSlice* slice) override {
162
10.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
10.9k
        return Status::OK();
164
10.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
18.7k
    Status finish(OwnedSlice* slice) override {
162
18.7k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
18.7k
        return Status::OK();
164
18.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
196
    Status finish(OwnedSlice* slice) override {
162
196
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
196
        return Status::OK();
164
196
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
36.9k
    Status finish(OwnedSlice* slice) override {
162
36.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
37.0k
        return Status::OK();
164
36.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
40.2k
    Status finish(OwnedSlice* slice) override {
162
40.2k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
40.2k
        return Status::OK();
164
40.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
439
    Status finish(OwnedSlice* slice) override {
162
439
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
439
        return Status::OK();
164
439
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7.11k
    Status finish(OwnedSlice* slice) override {
162
7.11k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.12k
        return Status::OK();
164
7.11k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
106
    Status finish(OwnedSlice* slice) override {
162
106
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
106
        return Status::OK();
164
106
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
9.48k
    Status finish(OwnedSlice* slice) override {
162
9.48k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
9.48k
        return Status::OK();
164
9.48k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
19.1k
    Status finish(OwnedSlice* slice) override {
162
19.1k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
19.1k
        return Status::OK();
164
19.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
15.9k
    Status finish(OwnedSlice* slice) override {
162
15.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
15.9k
        return Status::OK();
164
15.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
1.06k
    Status finish(OwnedSlice* slice) override {
162
1.06k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
1.06k
        return Status::OK();
164
1.06k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
700
    Status finish(OwnedSlice* slice) override {
162
700
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
700
        return Status::OK();
164
700
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
615
    Status finish(OwnedSlice* slice) override {
162
615
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
615
        return Status::OK();
164
615
    }
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_9FieldTypeE5EE5resetEv
Line
Count
Source
166
976k
    Status reset() override {
167
976k
        RETURN_IF_CATCH_EXCEPTION({
168
976k
            size_t block_size = _options.data_page_size;
169
976k
            _count = 0;
170
976k
            _raw_data_size = 0;
171
976k
            _data.clear();
172
976k
            _data.reserve(block_size);
173
976k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
976k
                    << "buffer must be naturally-aligned";
175
976k
            _buffer.clear();
176
976k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
976k
            _finished = false;
178
976k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
976k
        });
180
977k
        return Status::OK();
181
976k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
74.4k
    Status reset() override {
167
74.4k
        RETURN_IF_CATCH_EXCEPTION({
168
74.4k
            size_t block_size = _options.data_page_size;
169
74.4k
            _count = 0;
170
74.4k
            _raw_data_size = 0;
171
74.4k
            _data.clear();
172
74.4k
            _data.reserve(block_size);
173
74.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
74.4k
                    << "buffer must be naturally-aligned";
175
74.4k
            _buffer.clear();
176
74.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
74.4k
            _finished = false;
178
74.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
74.4k
        });
180
74.4k
        return Status::OK();
181
74.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
166
10.9k
    Status reset() override {
167
10.9k
        RETURN_IF_CATCH_EXCEPTION({
168
10.9k
            size_t block_size = _options.data_page_size;
169
10.9k
            _count = 0;
170
10.9k
            _raw_data_size = 0;
171
10.9k
            _data.clear();
172
10.9k
            _data.reserve(block_size);
173
10.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
10.9k
                    << "buffer must be naturally-aligned";
175
10.9k
            _buffer.clear();
176
10.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
10.9k
            _finished = false;
178
10.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
10.9k
        });
180
10.9k
        return Status::OK();
181
10.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
258k
    Status reset() override {
167
258k
        RETURN_IF_CATCH_EXCEPTION({
168
258k
            size_t block_size = _options.data_page_size;
169
258k
            _count = 0;
170
258k
            _raw_data_size = 0;
171
258k
            _data.clear();
172
258k
            _data.reserve(block_size);
173
258k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
258k
                    << "buffer must be naturally-aligned";
175
258k
            _buffer.clear();
176
258k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
258k
            _finished = false;
178
258k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
258k
        });
180
258k
        return Status::OK();
181
258k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
166
16.8k
    Status reset() override {
167
16.8k
        RETURN_IF_CATCH_EXCEPTION({
168
16.8k
            size_t block_size = _options.data_page_size;
169
16.8k
            _count = 0;
170
16.8k
            _raw_data_size = 0;
171
16.8k
            _data.clear();
172
16.8k
            _data.reserve(block_size);
173
16.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
16.8k
                    << "buffer must be naturally-aligned";
175
16.8k
            _buffer.clear();
176
16.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
16.8k
            _finished = false;
178
16.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
16.8k
        });
180
16.8k
        return Status::OK();
181
16.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
166
135k
    Status reset() override {
167
135k
        RETURN_IF_CATCH_EXCEPTION({
168
135k
            size_t block_size = _options.data_page_size;
169
135k
            _count = 0;
170
135k
            _raw_data_size = 0;
171
135k
            _data.clear();
172
135k
            _data.reserve(block_size);
173
135k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
135k
                    << "buffer must be naturally-aligned";
175
135k
            _buffer.clear();
176
135k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
135k
            _finished = false;
178
135k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
135k
        });
180
135k
        return Status::OK();
181
135k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
166
22.7k
    Status reset() override {
167
22.7k
        RETURN_IF_CATCH_EXCEPTION({
168
22.7k
            size_t block_size = _options.data_page_size;
169
22.7k
            _count = 0;
170
22.7k
            _raw_data_size = 0;
171
22.7k
            _data.clear();
172
22.7k
            _data.reserve(block_size);
173
22.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
22.7k
                    << "buffer must be naturally-aligned";
175
22.7k
            _buffer.clear();
176
22.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
22.7k
            _finished = false;
178
22.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
22.7k
        });
180
22.7k
        return Status::OK();
181
22.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
166
37.7k
    Status reset() override {
167
37.7k
        RETURN_IF_CATCH_EXCEPTION({
168
37.7k
            size_t block_size = _options.data_page_size;
169
37.7k
            _count = 0;
170
37.7k
            _raw_data_size = 0;
171
37.7k
            _data.clear();
172
37.7k
            _data.reserve(block_size);
173
37.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
37.7k
                    << "buffer must be naturally-aligned";
175
37.7k
            _buffer.clear();
176
37.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
37.7k
            _finished = false;
178
37.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
37.7k
        });
180
37.7k
        return Status::OK();
181
37.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
166
380
    Status reset() override {
167
380
        RETURN_IF_CATCH_EXCEPTION({
168
380
            size_t block_size = _options.data_page_size;
169
380
            _count = 0;
170
380
            _raw_data_size = 0;
171
380
            _data.clear();
172
380
            _data.reserve(block_size);
173
380
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
380
                    << "buffer must be naturally-aligned";
175
380
            _buffer.clear();
176
380
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
380
            _finished = false;
178
380
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
380
        });
180
380
        return Status::OK();
181
380
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
166
73.1k
    Status reset() override {
167
73.1k
        RETURN_IF_CATCH_EXCEPTION({
168
73.1k
            size_t block_size = _options.data_page_size;
169
73.1k
            _count = 0;
170
73.1k
            _raw_data_size = 0;
171
73.1k
            _data.clear();
172
73.1k
            _data.reserve(block_size);
173
73.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
73.1k
                    << "buffer must be naturally-aligned";
175
73.1k
            _buffer.clear();
176
73.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
73.1k
            _finished = false;
178
73.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
73.1k
        });
180
73.2k
        return Status::OK();
181
73.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
166
81.5k
    Status reset() override {
167
81.5k
        RETURN_IF_CATCH_EXCEPTION({
168
81.5k
            size_t block_size = _options.data_page_size;
169
81.5k
            _count = 0;
170
81.5k
            _raw_data_size = 0;
171
81.5k
            _data.clear();
172
81.5k
            _data.reserve(block_size);
173
81.5k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
81.5k
                    << "buffer must be naturally-aligned";
175
81.5k
            _buffer.clear();
176
81.5k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
81.5k
            _finished = false;
178
81.5k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
81.5k
        });
180
81.5k
        return Status::OK();
181
81.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
166
724
    Status reset() override {
167
724
        RETURN_IF_CATCH_EXCEPTION({
168
724
            size_t block_size = _options.data_page_size;
169
724
            _count = 0;
170
724
            _raw_data_size = 0;
171
724
            _data.clear();
172
724
            _data.reserve(block_size);
173
724
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
724
                    << "buffer must be naturally-aligned";
175
724
            _buffer.clear();
176
724
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
724
            _finished = false;
178
724
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
724
        });
180
724
        return Status::OK();
181
724
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
Line
Count
Source
166
14.1k
    Status reset() override {
167
14.1k
        RETURN_IF_CATCH_EXCEPTION({
168
14.1k
            size_t block_size = _options.data_page_size;
169
14.1k
            _count = 0;
170
14.1k
            _raw_data_size = 0;
171
14.1k
            _data.clear();
172
14.1k
            _data.reserve(block_size);
173
14.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
14.1k
                    << "buffer must be naturally-aligned";
175
14.1k
            _buffer.clear();
176
14.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
14.1k
            _finished = false;
178
14.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
14.1k
        });
180
14.2k
        return Status::OK();
181
14.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
166
297
    Status reset() override {
167
297
        RETURN_IF_CATCH_EXCEPTION({
168
297
            size_t block_size = _options.data_page_size;
169
297
            _count = 0;
170
297
            _raw_data_size = 0;
171
297
            _data.clear();
172
297
            _data.reserve(block_size);
173
297
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
297
                    << "buffer must be naturally-aligned";
175
297
            _buffer.clear();
176
297
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
297
            _finished = false;
178
297
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
297
        });
180
298
        return Status::OK();
181
297
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
166
18.9k
    Status reset() override {
167
18.9k
        RETURN_IF_CATCH_EXCEPTION({
168
18.9k
            size_t block_size = _options.data_page_size;
169
18.9k
            _count = 0;
170
18.9k
            _raw_data_size = 0;
171
18.9k
            _data.clear();
172
18.9k
            _data.reserve(block_size);
173
18.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
18.9k
                    << "buffer must be naturally-aligned";
175
18.9k
            _buffer.clear();
176
18.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
18.9k
            _finished = false;
178
18.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
18.9k
        });
180
18.9k
        return Status::OK();
181
18.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
31.0k
    Status reset() override {
167
31.0k
        RETURN_IF_CATCH_EXCEPTION({
168
31.0k
            size_t block_size = _options.data_page_size;
169
31.0k
            _count = 0;
170
31.0k
            _raw_data_size = 0;
171
31.0k
            _data.clear();
172
31.0k
            _data.reserve(block_size);
173
31.0k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
31.0k
                    << "buffer must be naturally-aligned";
175
31.0k
            _buffer.clear();
176
31.0k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
31.0k
            _finished = false;
178
31.0k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
31.0k
        });
180
31.0k
        return Status::OK();
181
31.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
166
31.7k
    Status reset() override {
167
31.7k
        RETURN_IF_CATCH_EXCEPTION({
168
31.7k
            size_t block_size = _options.data_page_size;
169
31.7k
            _count = 0;
170
31.7k
            _raw_data_size = 0;
171
31.7k
            _data.clear();
172
31.7k
            _data.reserve(block_size);
173
31.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
31.7k
                    << "buffer must be naturally-aligned";
175
31.7k
            _buffer.clear();
176
31.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
31.7k
            _finished = false;
178
31.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
31.7k
        });
180
31.7k
        return Status::OK();
181
31.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Line
Count
Source
166
2.22k
    Status reset() override {
167
2.22k
        RETURN_IF_CATCH_EXCEPTION({
168
2.22k
            size_t block_size = _options.data_page_size;
169
2.22k
            _count = 0;
170
2.22k
            _raw_data_size = 0;
171
2.22k
            _data.clear();
172
2.22k
            _data.reserve(block_size);
173
2.22k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
2.22k
                    << "buffer must be naturally-aligned";
175
2.22k
            _buffer.clear();
176
2.22k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
2.22k
            _finished = false;
178
2.22k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
2.22k
        });
180
2.22k
        return Status::OK();
181
2.22k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Line
Count
Source
166
1.48k
    Status reset() override {
167
1.48k
        RETURN_IF_CATCH_EXCEPTION({
168
1.48k
            size_t block_size = _options.data_page_size;
169
1.48k
            _count = 0;
170
1.48k
            _raw_data_size = 0;
171
1.48k
            _data.clear();
172
1.48k
            _data.reserve(block_size);
173
1.48k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.48k
                    << "buffer must be naturally-aligned";
175
1.48k
            _buffer.clear();
176
1.48k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.48k
            _finished = false;
178
1.48k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.48k
        });
180
1.48k
        return Status::OK();
181
1.48k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
166
1.31k
    Status reset() override {
167
1.31k
        RETURN_IF_CATCH_EXCEPTION({
168
1.31k
            size_t block_size = _options.data_page_size;
169
1.31k
            _count = 0;
170
1.31k
            _raw_data_size = 0;
171
1.31k
            _data.clear();
172
1.31k
            _data.reserve(block_size);
173
1.31k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.31k
                    << "buffer must be naturally-aligned";
175
1.31k
            _buffer.clear();
176
1.31k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.31k
            _finished = false;
178
1.31k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.31k
        });
180
1.31k
        return Status::OK();
181
1.31k
    }
182
183
3
    size_t count() const override { return _count; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
183
3
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5countEv
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_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
32.4k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
16.5k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
185
2.97k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
185
1.10k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
2.57k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
1.65k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
740
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
763
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
185
776
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4sizeEv
Line
Count
Source
185
6
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4sizeEv
Line
Count
Source
185
1.59k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
2.07k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4sizeEv
Line
Count
Source
185
13
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4sizeEv
Line
Count
Source
185
6
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4sizeEv
Line
Count
Source
185
2
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4sizeEv
Line
Count
Source
185
135
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
185
291
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
185
1.10k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4sizeEv
Line
Count
Source
185
4
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4sizeEv
Line
Count
Source
185
26
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4sizeEv
Line
Count
Source
185
10
    uint64_t size() const override { return _buffer.size(); }
186
187
469k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
57.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
36.8k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
5.42k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
131k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
187
8.57k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
67.3k
    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
10.9k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
18.7k
    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
196
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
187
37.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
187
40.2k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
187
439
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
Line
Count
Source
187
7.11k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
187
106
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
187
9.48k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
19.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
187
15.9k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE17get_raw_data_sizeEv
Line
Count
Source
187
1.06k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Line
Count
Source
187
700
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
187
615
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
749k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
348k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
37.5k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
5.52k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
126k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
8.30k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
67.6k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
11.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
19.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
184
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
36.1k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
41.2k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
285
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
7.07k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
191
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.49k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
11.8k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
15.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1.15k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
786
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
698
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
192
193
747k
    OwnedSlice _finish(int final_size_of_type) {
194
747k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
747k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
747k
        int padding_elems = num_elems_after_padding - _count;
199
747k
        int padding_bytes = padding_elems * final_size_of_type;
200
22.3M
        for (int i = 0; i < padding_bytes; i++) {
201
21.5M
            _data.push_back(0);
202
21.5M
        }
203
204
        // reserve enough place for compression
205
747k
        _buffer.resize(
206
747k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
747k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
747k
        int64_t bytes =
210
747k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
747k
                                         num_elems_after_padding, final_size_of_type, 0);
212
747k
        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
747k
        encode_fixed32_le(&_buffer[0], _count);
222
747k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
747k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
747k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
747k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
747k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
747k
        return _buffer.build();
229
747k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
335k
    OwnedSlice _finish(int final_size_of_type) {
194
335k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
335k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
335k
        int padding_elems = num_elems_after_padding - _count;
199
335k
        int padding_bytes = padding_elems * final_size_of_type;
200
6.47M
        for (int i = 0; i < padding_bytes; i++) {
201
6.14M
            _data.push_back(0);
202
6.14M
        }
203
204
        // reserve enough place for compression
205
335k
        _buffer.resize(
206
335k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
335k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
335k
        int64_t bytes =
210
335k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
335k
                                         num_elems_after_padding, final_size_of_type, 0);
212
335k
        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
335k
        encode_fixed32_le(&_buffer[0], _count);
222
335k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
335k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
335k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
335k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
335k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
335k
        return _buffer.build();
229
335k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
36.8k
    OwnedSlice _finish(int final_size_of_type) {
194
36.8k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
36.8k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
36.8k
        int padding_elems = num_elems_after_padding - _count;
199
36.8k
        int padding_bytes = padding_elems * final_size_of_type;
200
223k
        for (int i = 0; i < padding_bytes; i++) {
201
186k
            _data.push_back(0);
202
186k
        }
203
204
        // reserve enough place for compression
205
36.8k
        _buffer.resize(
206
36.8k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
36.8k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
36.8k
        int64_t bytes =
210
36.8k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
36.8k
                                         num_elems_after_padding, final_size_of_type, 0);
212
36.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
36.8k
        encode_fixed32_le(&_buffer[0], _count);
222
36.8k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
36.8k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
36.8k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
36.8k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
36.8k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
36.8k
        return _buffer.build();
229
36.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
5.42k
    OwnedSlice _finish(int final_size_of_type) {
194
5.42k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
5.42k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
5.42k
        int padding_elems = num_elems_after_padding - _count;
199
5.42k
        int padding_bytes = padding_elems * final_size_of_type;
200
45.3k
        for (int i = 0; i < padding_bytes; i++) {
201
39.9k
            _data.push_back(0);
202
39.9k
        }
203
204
        // reserve enough place for compression
205
5.42k
        _buffer.resize(
206
5.42k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
5.42k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
5.42k
        int64_t bytes =
210
5.42k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
5.42k
                                         num_elems_after_padding, final_size_of_type, 0);
212
5.42k
        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.42k
        encode_fixed32_le(&_buffer[0], _count);
222
5.42k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
5.42k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
5.42k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
5.42k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
5.42k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
5.42k
        return _buffer.build();
229
5.42k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
131k
    OwnedSlice _finish(int final_size_of_type) {
194
131k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
131k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
131k
        int padding_elems = num_elems_after_padding - _count;
199
131k
        int padding_bytes = padding_elems * final_size_of_type;
200
5.93M
        for (int i = 0; i < padding_bytes; i++) {
201
5.80M
            _data.push_back(0);
202
5.80M
        }
203
204
        // reserve enough place for compression
205
131k
        _buffer.resize(
206
131k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
131k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
131k
        int64_t bytes =
210
131k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
131k
                                         num_elems_after_padding, final_size_of_type, 0);
212
131k
        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
131k
        encode_fixed32_le(&_buffer[0], _count);
222
131k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
131k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
131k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
131k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
131k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
131k
        return _buffer.build();
229
131k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
8.57k
    OwnedSlice _finish(int final_size_of_type) {
194
8.57k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
8.57k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
8.57k
        int padding_elems = num_elems_after_padding - _count;
199
8.57k
        int padding_bytes = padding_elems * final_size_of_type;
200
466k
        for (int i = 0; i < padding_bytes; i++) {
201
457k
            _data.push_back(0);
202
457k
        }
203
204
        // reserve enough place for compression
205
8.57k
        _buffer.resize(
206
8.57k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
8.57k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
8.57k
        int64_t bytes =
210
8.57k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
8.57k
                                         num_elems_after_padding, final_size_of_type, 0);
212
8.57k
        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.57k
        encode_fixed32_le(&_buffer[0], _count);
222
8.57k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
8.57k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
8.57k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
8.57k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
8.57k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
8.57k
        return _buffer.build();
229
8.57k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
67.3k
    OwnedSlice _finish(int final_size_of_type) {
194
67.3k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
67.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
67.3k
        int padding_elems = num_elems_after_padding - _count;
199
67.3k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.28M
        for (int i = 0; i < padding_bytes; i++) {
201
3.21M
            _data.push_back(0);
202
3.21M
        }
203
204
        // reserve enough place for compression
205
67.3k
        _buffer.resize(
206
67.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
67.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
67.3k
        int64_t bytes =
210
67.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
67.3k
                                         num_elems_after_padding, final_size_of_type, 0);
212
67.3k
        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
67.3k
        encode_fixed32_le(&_buffer[0], _count);
222
67.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
67.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
67.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
67.3k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
67.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
67.3k
        return _buffer.build();
229
67.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
10.9k
    OwnedSlice _finish(int final_size_of_type) {
194
10.9k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
10.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
10.9k
        int padding_elems = num_elems_after_padding - _count;
199
10.9k
        int padding_bytes = padding_elems * final_size_of_type;
200
238k
        for (int i = 0; i < padding_bytes; i++) {
201
227k
            _data.push_back(0);
202
227k
        }
203
204
        // reserve enough place for compression
205
10.9k
        _buffer.resize(
206
10.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
10.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
10.9k
        int64_t bytes =
210
10.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
10.9k
                                         num_elems_after_padding, final_size_of_type, 0);
212
10.9k
        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
10.9k
        encode_fixed32_le(&_buffer[0], _count);
222
10.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
10.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
10.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
10.9k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
10.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
10.9k
        return _buffer.build();
229
10.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
18.7k
    OwnedSlice _finish(int final_size_of_type) {
194
18.7k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
18.7k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
18.7k
        int padding_elems = num_elems_after_padding - _count;
199
18.7k
        int padding_bytes = padding_elems * final_size_of_type;
200
858k
        for (int i = 0; i < padding_bytes; i++) {
201
840k
            _data.push_back(0);
202
840k
        }
203
204
        // reserve enough place for compression
205
18.7k
        _buffer.resize(
206
18.7k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
18.7k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
18.7k
        int64_t bytes =
210
18.7k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
18.7k
                                         num_elems_after_padding, final_size_of_type, 0);
212
18.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
18.7k
        encode_fixed32_le(&_buffer[0], _count);
222
18.7k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
18.7k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
18.7k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
18.7k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
18.7k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
18.7k
        return _buffer.build();
229
18.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
196
    OwnedSlice _finish(int final_size_of_type) {
194
196
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
196
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
196
        int padding_elems = num_elems_after_padding - _count;
199
196
        int padding_bytes = padding_elems * final_size_of_type;
200
2.68k
        for (int i = 0; i < padding_bytes; i++) {
201
2.48k
            _data.push_back(0);
202
2.48k
        }
203
204
        // reserve enough place for compression
205
196
        _buffer.resize(
206
196
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
196
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
196
        int64_t bytes =
210
196
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
196
                                         num_elems_after_padding, final_size_of_type, 0);
212
196
        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
196
        encode_fixed32_le(&_buffer[0], _count);
222
196
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
196
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
196
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
196
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
196
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
196
        return _buffer.build();
229
196
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
193
37.0k
    OwnedSlice _finish(int final_size_of_type) {
194
37.0k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
37.0k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
37.0k
        int padding_elems = num_elems_after_padding - _count;
199
37.0k
        int padding_bytes = padding_elems * final_size_of_type;
200
786k
        for (int i = 0; i < padding_bytes; i++) {
201
749k
            _data.push_back(0);
202
749k
        }
203
204
        // reserve enough place for compression
205
37.0k
        _buffer.resize(
206
37.0k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
37.0k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
37.0k
        int64_t bytes =
210
37.0k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
37.0k
                                         num_elems_after_padding, final_size_of_type, 0);
212
37.0k
        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
37.0k
        encode_fixed32_le(&_buffer[0], _count);
222
37.0k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
37.0k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
37.0k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
37.0k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
37.0k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
37.0k
        return _buffer.build();
229
37.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
193
40.2k
    OwnedSlice _finish(int final_size_of_type) {
194
40.2k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
40.2k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
40.2k
        int padding_elems = num_elems_after_padding - _count;
199
40.2k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.70M
        for (int i = 0; i < padding_bytes; i++) {
201
1.66M
            _data.push_back(0);
202
1.66M
        }
203
204
        // reserve enough place for compression
205
40.2k
        _buffer.resize(
206
40.2k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
40.2k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
40.2k
        int64_t bytes =
210
40.2k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
40.2k
                                         num_elems_after_padding, final_size_of_type, 0);
212
40.2k
        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
40.2k
        encode_fixed32_le(&_buffer[0], _count);
222
40.2k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
40.2k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
40.2k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
40.2k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
40.2k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
40.2k
        return _buffer.build();
229
40.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
193
439
    OwnedSlice _finish(int final_size_of_type) {
194
439
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
439
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
439
        int padding_elems = num_elems_after_padding - _count;
199
439
        int padding_bytes = padding_elems * final_size_of_type;
200
7.01k
        for (int i = 0; i < padding_bytes; i++) {
201
6.57k
            _data.push_back(0);
202
6.57k
        }
203
204
        // reserve enough place for compression
205
439
        _buffer.resize(
206
439
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
439
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
439
        int64_t bytes =
210
439
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
439
                                         num_elems_after_padding, final_size_of_type, 0);
212
439
        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
439
        encode_fixed32_le(&_buffer[0], _count);
222
439
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
439
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
439
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
439
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
439
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
439
        return _buffer.build();
229
439
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
Line
Count
Source
193
7.11k
    OwnedSlice _finish(int final_size_of_type) {
194
7.11k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.11k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.11k
        int padding_elems = num_elems_after_padding - _count;
199
7.11k
        int padding_bytes = padding_elems * final_size_of_type;
200
372k
        for (int i = 0; i < padding_bytes; i++) {
201
365k
            _data.push_back(0);
202
365k
        }
203
204
        // reserve enough place for compression
205
7.11k
        _buffer.resize(
206
7.11k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.11k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.11k
        int64_t bytes =
210
7.11k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.11k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.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
7.11k
        encode_fixed32_le(&_buffer[0], _count);
222
7.11k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.11k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.11k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.11k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.11k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.11k
        return _buffer.build();
229
7.11k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
193
106
    OwnedSlice _finish(int final_size_of_type) {
194
106
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
106
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
106
        int padding_elems = num_elems_after_padding - _count;
199
106
        int padding_bytes = padding_elems * final_size_of_type;
200
6.57k
        for (int i = 0; i < padding_bytes; i++) {
201
6.46k
            _data.push_back(0);
202
6.46k
        }
203
204
        // reserve enough place for compression
205
106
        _buffer.resize(
206
106
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
106
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
106
        int64_t bytes =
210
106
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
106
                                         num_elems_after_padding, final_size_of_type, 0);
212
106
        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
106
        encode_fixed32_le(&_buffer[0], _count);
222
106
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
106
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
106
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
106
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
106
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
106
        return _buffer.build();
229
106
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
193
9.48k
    OwnedSlice _finish(int final_size_of_type) {
194
9.48k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
9.48k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
9.48k
        int padding_elems = num_elems_after_padding - _count;
199
9.48k
        int padding_bytes = padding_elems * final_size_of_type;
200
114k
        for (int i = 0; i < padding_bytes; i++) {
201
104k
            _data.push_back(0);
202
104k
        }
203
204
        // reserve enough place for compression
205
9.48k
        _buffer.resize(
206
9.48k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
9.48k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
9.48k
        int64_t bytes =
210
9.48k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
9.48k
                                         num_elems_after_padding, final_size_of_type, 0);
212
9.48k
        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.48k
        encode_fixed32_le(&_buffer[0], _count);
222
9.48k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
9.48k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
9.48k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
9.48k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
9.48k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
9.48k
        return _buffer.build();
229
9.48k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
19.1k
    OwnedSlice _finish(int final_size_of_type) {
194
19.1k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
19.1k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
19.1k
        int padding_elems = num_elems_after_padding - _count;
199
19.1k
        int padding_bytes = padding_elems * final_size_of_type;
200
479k
        for (int i = 0; i < padding_bytes; i++) {
201
460k
            _data.push_back(0);
202
460k
        }
203
204
        // reserve enough place for compression
205
19.1k
        _buffer.resize(
206
19.1k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
19.1k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
19.1k
        int64_t bytes =
210
19.1k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
19.1k
                                         num_elems_after_padding, final_size_of_type, 0);
212
19.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
19.1k
        encode_fixed32_le(&_buffer[0], _count);
222
19.1k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
19.1k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
19.1k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
19.1k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
19.1k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
19.1k
        return _buffer.build();
229
19.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
193
15.9k
    OwnedSlice _finish(int final_size_of_type) {
194
15.9k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
15.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
15.9k
        int padding_elems = num_elems_after_padding - _count;
199
15.9k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.08M
        for (int i = 0; i < padding_bytes; i++) {
201
1.06M
            _data.push_back(0);
202
1.06M
        }
203
204
        // reserve enough place for compression
205
15.9k
        _buffer.resize(
206
15.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
15.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
15.9k
        int64_t bytes =
210
15.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
15.9k
                                         num_elems_after_padding, final_size_of_type, 0);
212
15.9k
        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
15.9k
        encode_fixed32_le(&_buffer[0], _count);
222
15.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
15.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
15.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
15.9k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
15.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
15.9k
        return _buffer.build();
229
15.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE7_finishEi
Line
Count
Source
193
1.06k
    OwnedSlice _finish(int final_size_of_type) {
194
1.06k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
1.06k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
1.06k
        int padding_elems = num_elems_after_padding - _count;
199
1.06k
        int padding_bytes = padding_elems * final_size_of_type;
200
162k
        for (int i = 0; i < padding_bytes; i++) {
201
160k
            _data.push_back(0);
202
160k
        }
203
204
        // reserve enough place for compression
205
1.06k
        _buffer.resize(
206
1.06k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
1.06k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
1.06k
        int64_t bytes =
210
1.06k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
1.06k
                                         num_elems_after_padding, final_size_of_type, 0);
212
1.06k
        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.06k
        encode_fixed32_le(&_buffer[0], _count);
222
1.06k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
1.06k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
1.06k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
1.06k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
1.06k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
1.06k
        return _buffer.build();
229
1.06k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Line
Count
Source
193
700
    OwnedSlice _finish(int final_size_of_type) {
194
700
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
700
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
700
        int padding_elems = num_elems_after_padding - _count;
199
700
        int padding_bytes = padding_elems * final_size_of_type;
200
14.7k
        for (int i = 0; i < padding_bytes; i++) {
201
14.0k
            _data.push_back(0);
202
14.0k
        }
203
204
        // reserve enough place for compression
205
700
        _buffer.resize(
206
700
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
700
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
700
        int64_t bytes =
210
700
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
700
                                         num_elems_after_padding, final_size_of_type, 0);
212
700
        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
700
        encode_fixed32_le(&_buffer[0], _count);
222
700
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
700
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
700
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
700
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
700
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
700
        return _buffer.build();
229
700
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
193
615
    OwnedSlice _finish(int final_size_of_type) {
194
615
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
615
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
615
        int padding_elems = num_elems_after_padding - _count;
199
615
        int padding_bytes = padding_elems * final_size_of_type;
200
49.7k
        for (int i = 0; i < padding_bytes; i++) {
201
49.1k
            _data.push_back(0);
202
49.1k
        }
203
204
        // reserve enough place for compression
205
615
        _buffer.resize(
206
615
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
615
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
615
        int64_t bytes =
210
615
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
615
                                         num_elems_after_padding, final_size_of_type, 0);
212
615
        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
615
        encode_fixed32_le(&_buffer[0], _count);
222
615
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
615
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
615
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
615
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
615
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
615
        return _buffer.build();
229
615
    }
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
2.08M
                                       int& size_of_element) {
253
2.08M
    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
2.08M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
2.08M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
2.08M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
2.08M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
2.08M
    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
2.08M
    switch (size_of_element) {
271
125k
    case 1:
272
138k
    case 2:
273
141k
    case 3:
274
1.30M
    case 4:
275
1.99M
    case 8:
276
1.99M
    case 12:
277
2.07M
    case 16:
278
2.08M
    case 32:
279
2.08M
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
2.08M
    }
283
2.08M
    return Status::OK();
284
2.08M
}
285
286
template <FieldType Type>
287
class BitShufflePageDecoder : public PageDecoder {
288
public:
289
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
290
1.04M
            : _data(data),
291
1.04M
              _options(options),
292
1.04M
              _parsed(false),
293
1.04M
              _num_elements(0),
294
1.04M
              _num_element_after_padding(0),
295
1.04M
              _size_of_element(0),
296
1.04M
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
490k
            : _data(data),
291
490k
              _options(options),
292
490k
              _parsed(false),
293
490k
              _num_elements(0),
294
490k
              _num_element_after_padding(0),
295
490k
              _size_of_element(0),
296
490k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
62.9k
            : _data(data),
291
62.9k
              _options(options),
292
62.9k
              _parsed(false),
293
62.9k
              _num_elements(0),
294
62.9k
              _num_element_after_padding(0),
295
62.9k
              _size_of_element(0),
296
62.9k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
6.46k
            : _data(data),
291
6.46k
              _options(options),
292
6.46k
              _parsed(false),
293
6.46k
              _num_elements(0),
294
6.46k
              _num_element_after_padding(0),
295
6.46k
              _size_of_element(0),
296
6.46k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
107k
            : _data(data),
291
107k
              _options(options),
292
107k
              _parsed(false),
293
107k
              _num_elements(0),
294
107k
              _num_element_after_padding(0),
295
107k
              _size_of_element(0),
296
107k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
10.5k
            : _data(data),
291
10.5k
              _options(options),
292
10.5k
              _parsed(false),
293
10.5k
              _num_elements(0),
294
10.5k
              _num_element_after_padding(0),
295
10.5k
              _size_of_element(0),
296
10.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
89.2k
            : _data(data),
291
89.2k
              _options(options),
292
89.2k
              _parsed(false),
293
89.2k
              _num_elements(0),
294
89.2k
              _num_element_after_padding(0),
295
89.2k
              _size_of_element(0),
296
89.2k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
18.5k
            : _data(data),
291
18.5k
              _options(options),
292
18.5k
              _parsed(false),
293
18.5k
              _num_elements(0),
294
18.5k
              _num_element_after_padding(0),
295
18.5k
              _size_of_element(0),
296
18.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
28.0k
            : _data(data),
291
28.0k
              _options(options),
292
28.0k
              _parsed(false),
293
28.0k
              _num_elements(0),
294
28.0k
              _num_element_after_padding(0),
295
28.0k
              _size_of_element(0),
296
28.0k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.52k
            : _data(data),
291
1.52k
              _options(options),
292
1.52k
              _parsed(false),
293
1.52k
              _num_elements(0),
294
1.52k
              _num_element_after_padding(0),
295
1.52k
              _size_of_element(0),
296
1.52k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
57.0k
            : _data(data),
291
57.0k
              _options(options),
292
57.0k
              _parsed(false),
293
57.0k
              _num_elements(0),
294
57.0k
              _num_element_after_padding(0),
295
57.0k
              _size_of_element(0),
296
57.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
63.2k
            : _data(data),
291
63.2k
              _options(options),
292
63.2k
              _parsed(false),
293
63.2k
              _num_elements(0),
294
63.2k
              _num_element_after_padding(0),
295
63.2k
              _size_of_element(0),
296
63.2k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
2.19k
            : _data(data),
291
2.19k
              _options(options),
292
2.19k
              _parsed(false),
293
2.19k
              _num_elements(0),
294
2.19k
              _num_element_after_padding(0),
295
2.19k
              _size_of_element(0),
296
2.19k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
14.6k
            : _data(data),
291
14.6k
              _options(options),
292
14.6k
              _parsed(false),
293
14.6k
              _num_elements(0),
294
14.6k
              _num_element_after_padding(0),
295
14.6k
              _size_of_element(0),
296
14.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
14.5k
            : _data(data),
291
14.5k
              _options(options),
292
14.5k
              _parsed(false),
293
14.5k
              _num_elements(0),
294
14.5k
              _num_element_after_padding(0),
295
14.5k
              _size_of_element(0),
296
14.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
39.3k
            : _data(data),
291
39.3k
              _options(options),
292
39.3k
              _parsed(false),
293
39.3k
              _num_elements(0),
294
39.3k
              _num_element_after_padding(0),
295
39.3k
              _size_of_element(0),
296
39.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
28.7k
            : _data(data),
291
28.7k
              _options(options),
292
28.7k
              _parsed(false),
293
28.7k
              _num_elements(0),
294
28.7k
              _num_element_after_padding(0),
295
28.7k
              _size_of_element(0),
296
28.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.76k
            : _data(data),
291
1.76k
              _options(options),
292
1.76k
              _parsed(false),
293
1.76k
              _num_elements(0),
294
1.76k
              _num_element_after_padding(0),
295
1.76k
              _size_of_element(0),
296
1.76k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.18k
            : _data(data),
291
1.18k
              _options(options),
292
1.18k
              _parsed(false),
293
1.18k
              _num_elements(0),
294
1.18k
              _num_element_after_padding(0),
295
1.18k
              _size_of_element(0),
296
1.18k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.13k
            : _data(data),
291
1.13k
              _options(options),
292
1.13k
              _parsed(false),
293
1.13k
              _num_elements(0),
294
1.13k
              _num_element_after_padding(0),
295
1.13k
              _size_of_element(0),
296
1.13k
              _cur_index(0) {}
297
298
1.04M
    Status init() override {
299
1.04M
        CHECK(!_parsed);
300
1.04M
        size_t unused;
301
1.04M
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.04M
                                                 _num_element_after_padding, _size_of_element));
303
304
1.04M
        if (_data.size !=
305
1.04M
            _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.04M
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.04M
                     _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.04M
        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.04M
        _parsed = true;
325
1.04M
        return Status::OK();
326
1.04M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
298
490k
    Status init() override {
299
490k
        CHECK(!_parsed);
300
490k
        size_t unused;
301
490k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
490k
                                                 _num_element_after_padding, _size_of_element));
303
304
490k
        if (_data.size !=
305
490k
            _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
490k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
490k
                     _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
490k
        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
490k
        _parsed = true;
325
490k
        return Status::OK();
326
490k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
62.9k
    Status init() override {
299
62.9k
        CHECK(!_parsed);
300
62.9k
        size_t unused;
301
62.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
62.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
62.9k
        if (_data.size !=
305
62.9k
            _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
62.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
62.9k
                     _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
62.9k
        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
62.9k
        _parsed = true;
325
62.9k
        return Status::OK();
326
62.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
6.46k
    Status init() override {
299
6.46k
        CHECK(!_parsed);
300
6.46k
        size_t unused;
301
6.46k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
6.46k
                                                 _num_element_after_padding, _size_of_element));
303
304
6.46k
        if (_data.size !=
305
6.46k
            _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
6.46k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
6.46k
                     _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
6.46k
        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
6.46k
        _parsed = true;
325
6.46k
        return Status::OK();
326
6.46k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
107k
    Status init() override {
299
107k
        CHECK(!_parsed);
300
107k
        size_t unused;
301
107k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
107k
                                                 _num_element_after_padding, _size_of_element));
303
304
107k
        if (_data.size !=
305
107k
            _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
107k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
107k
                     _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
107k
        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
107k
        _parsed = true;
325
107k
        return Status::OK();
326
107k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
298
10.5k
    Status init() override {
299
10.5k
        CHECK(!_parsed);
300
10.5k
        size_t unused;
301
10.5k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
10.5k
                                                 _num_element_after_padding, _size_of_element));
303
304
10.5k
        if (_data.size !=
305
10.5k
            _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
10.5k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
10.5k
                     _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
10.5k
        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
10.5k
        _parsed = true;
325
10.5k
        return Status::OK();
326
10.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
298
89.2k
    Status init() override {
299
89.2k
        CHECK(!_parsed);
300
89.2k
        size_t unused;
301
89.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
89.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
89.2k
        if (_data.size !=
305
89.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
89.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
89.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
89.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
89.2k
        _parsed = true;
325
89.2k
        return Status::OK();
326
89.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
298
18.5k
    Status init() override {
299
18.5k
        CHECK(!_parsed);
300
18.5k
        size_t unused;
301
18.5k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
18.5k
                                                 _num_element_after_padding, _size_of_element));
303
304
18.5k
        if (_data.size !=
305
18.5k
            _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
18.5k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
18.5k
                     _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
18.5k
        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
18.5k
        _parsed = true;
325
18.5k
        return Status::OK();
326
18.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
298
28.0k
    Status init() override {
299
28.0k
        CHECK(!_parsed);
300
28.0k
        size_t unused;
301
28.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
28.0k
                                                 _num_element_after_padding, _size_of_element));
303
304
28.0k
        if (_data.size !=
305
28.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
28.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
28.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
28.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
28.0k
        _parsed = true;
325
28.0k
        return Status::OK();
326
28.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
1.52k
    Status init() override {
299
1.52k
        CHECK(!_parsed);
300
1.52k
        size_t unused;
301
1.52k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.52k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.52k
        if (_data.size !=
305
1.52k
            _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.52k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.52k
                     _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.52k
        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.52k
        _parsed = true;
325
1.52k
        return Status::OK();
326
1.52k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
57.0k
    Status init() override {
299
57.0k
        CHECK(!_parsed);
300
57.0k
        size_t unused;
301
57.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
57.0k
                                                 _num_element_after_padding, _size_of_element));
303
304
57.0k
        if (_data.size !=
305
57.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
57.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
57.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
57.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
57.0k
        _parsed = true;
325
57.0k
        return Status::OK();
326
57.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
298
63.1k
    Status init() override {
299
63.1k
        CHECK(!_parsed);
300
63.1k
        size_t unused;
301
63.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
63.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
63.1k
        if (_data.size !=
305
63.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
63.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
63.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
63.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
63.1k
        _parsed = true;
325
63.1k
        return Status::OK();
326
63.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
298
2.19k
    Status init() override {
299
2.19k
        CHECK(!_parsed);
300
2.19k
        size_t unused;
301
2.19k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
2.19k
                                                 _num_element_after_padding, _size_of_element));
303
304
2.19k
        if (_data.size !=
305
2.19k
            _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.19k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
2.19k
                     _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.19k
        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.19k
        _parsed = true;
325
2.19k
        return Status::OK();
326
2.19k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
298
14.6k
    Status init() override {
299
14.6k
        CHECK(!_parsed);
300
14.6k
        size_t unused;
301
14.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
14.6k
                                                 _num_element_after_padding, _size_of_element));
303
304
14.6k
        if (_data.size !=
305
14.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
14.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
14.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
14.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
14.6k
        _parsed = true;
325
14.6k
        return Status::OK();
326
14.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
14.5k
    Status init() override {
299
14.5k
        CHECK(!_parsed);
300
14.5k
        size_t unused;
301
14.5k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
14.5k
                                                 _num_element_after_padding, _size_of_element));
303
304
14.5k
        if (_data.size !=
305
14.5k
            _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
14.5k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
14.5k
                     _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
14.5k
        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
14.5k
        _parsed = true;
325
14.5k
        return Status::OK();
326
14.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
298
39.3k
    Status init() override {
299
39.3k
        CHECK(!_parsed);
300
39.3k
        size_t unused;
301
39.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
39.3k
                                                 _num_element_after_padding, _size_of_element));
303
304
39.3k
        if (_data.size !=
305
39.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
39.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
39.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
39.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
39.3k
        _parsed = true;
325
39.3k
        return Status::OK();
326
39.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
298
28.7k
    Status init() override {
299
28.7k
        CHECK(!_parsed);
300
28.7k
        size_t unused;
301
28.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
28.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
28.7k
        if (_data.size !=
305
28.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
28.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
28.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
28.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
28.7k
        _parsed = true;
325
28.7k
        return Status::OK();
326
28.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
298
1.76k
    Status init() override {
299
1.76k
        CHECK(!_parsed);
300
1.76k
        size_t unused;
301
1.76k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.76k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.76k
        if (_data.size !=
305
1.76k
            _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.76k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.76k
                     _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.76k
        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.76k
        _parsed = true;
325
1.76k
        return Status::OK();
326
1.76k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
298
1.18k
    Status init() override {
299
1.18k
        CHECK(!_parsed);
300
1.18k
        size_t unused;
301
1.18k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.18k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.18k
        if (_data.size !=
305
1.18k
            _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.18k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.18k
                     _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.18k
        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.18k
        _parsed = true;
325
1.18k
        return Status::OK();
326
1.18k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
298
1.13k
    Status init() override {
299
1.13k
        CHECK(!_parsed);
300
1.13k
        size_t unused;
301
1.13k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.13k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.13k
        if (_data.size !=
305
1.13k
            _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.13k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.13k
                     _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.13k
        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.13k
        _parsed = true;
325
1.13k
        return Status::OK();
326
1.13k
    }
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
3.84M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
3.84M
        if (_num_elements == 0) [[unlikely]] {
337
5.30k
            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.30k
        }
342
343
3.84M
        DCHECK_LE(pos, _num_elements);
344
3.84M
        _cur_index = pos;
345
3.84M
        return Status::OK();
346
3.84M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
2.22M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
2.22M
        if (_num_elements == 0) [[unlikely]] {
337
1.95k
            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.95k
        }
342
343
2.22M
        DCHECK_LE(pos, _num_elements);
344
2.22M
        _cur_index = pos;
345
2.22M
        return Status::OK();
346
2.22M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
48.7k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
48.7k
        if (_num_elements == 0) [[unlikely]] {
337
440
            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
440
        }
342
343
48.7k
        DCHECK_LE(pos, _num_elements);
344
48.7k
        _cur_index = pos;
345
48.7k
        return Status::OK();
346
48.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
2.76k
    Status seek_to_position_in_page(size_t pos) override {
335
2.76k
        DCHECK(_parsed) << "Must call init()";
336
2.76k
        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
2.76k
        DCHECK_LE(pos, _num_elements);
344
2.76k
        _cur_index = pos;
345
2.76k
        return Status::OK();
346
2.76k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
26.9k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
26.9k
        if (_num_elements == 0) [[unlikely]] {
337
613
            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
613
        }
342
343
26.9k
        DCHECK_LE(pos, _num_elements);
344
26.9k
        _cur_index = pos;
345
26.9k
        return Status::OK();
346
26.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
334
4.73k
    Status seek_to_position_in_page(size_t pos) override {
335
4.73k
        DCHECK(_parsed) << "Must call init()";
336
4.73k
        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
4.73k
        DCHECK_LE(pos, _num_elements);
344
4.73k
        _cur_index = pos;
345
4.73k
        return Status::OK();
346
4.73k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
334
11.9k
    Status seek_to_position_in_page(size_t pos) override {
335
11.9k
        DCHECK(_parsed) << "Must call init()";
336
11.9k
        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.9k
        DCHECK_LE(pos, _num_elements);
344
11.9k
        _cur_index = pos;
345
11.9k
        return Status::OK();
346
11.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
223k
    Status seek_to_position_in_page(size_t pos) override {
335
223k
        DCHECK(_parsed) << "Must call init()";
336
223k
        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
223k
        DCHECK_LE(pos, _num_elements);
344
223k
        _cur_index = pos;
345
223k
        return Status::OK();
346
223k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
334
200k
    Status seek_to_position_in_page(size_t pos) override {
335
200k
        DCHECK(_parsed) << "Must call init()";
336
200k
        if (_num_elements == 0) [[unlikely]] {
337
2
            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
2
        }
342
343
200k
        DCHECK_LE(pos, _num_elements);
344
200k
        _cur_index = pos;
345
200k
        return Status::OK();
346
200k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
334
211k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
211k
        if (_num_elements == 0) [[unlikely]] {
337
2
            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
2
        }
342
343
211k
        DCHECK_LE(pos, _num_elements);
344
211k
        _cur_index = pos;
345
211k
        return Status::OK();
346
211k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
334
491k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
491k
        if (_num_elements == 0) [[unlikely]] {
337
1.85k
            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.85k
        }
342
343
491k
        DCHECK_LE(pos, _num_elements);
344
491k
        _cur_index = pos;
345
491k
        return Status::OK();
346
491k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
334
60.7k
    Status seek_to_position_in_page(size_t pos) override {
335
60.7k
        DCHECK(_parsed) << "Must call init()";
336
60.7k
        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
60.7k
        DCHECK_LE(pos, _num_elements);
344
60.7k
        _cur_index = pos;
345
60.7k
        return Status::OK();
346
60.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
197k
    Status seek_to_position_in_page(size_t pos) override {
335
197k
        DCHECK(_parsed) << "Must call init()";
336
197k
        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
197k
        DCHECK_LE(pos, _num_elements);
344
197k
        _cur_index = pos;
345
197k
        return Status::OK();
346
197k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
334
6.55k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
6.55k
        if (_num_elements == 0) [[unlikely]] {
337
353
            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
353
        }
342
343
6.55k
        DCHECK_LE(pos, _num_elements);
344
6.55k
        _cur_index = pos;
345
6.55k
        return Status::OK();
346
6.55k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
Line
Count
Source
334
84
    Status seek_to_position_in_page(size_t pos) override {
335
84
        DCHECK(_parsed) << "Must call init()";
336
84
        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
84
        DCHECK_LE(pos, _num_elements);
344
84
        _cur_index = pos;
345
84
        return Status::OK();
346
84
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Line
Count
Source
334
868
    Status seek_to_position_in_page(size_t pos) override {
335
868
        DCHECK(_parsed) << "Must call init()";
336
868
        if (_num_elements == 0) [[unlikely]] {
337
25
            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
25
        }
342
343
868
        DCHECK_LE(pos, _num_elements);
344
868
        _cur_index = pos;
345
868
        return Status::OK();
346
868
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
334
16.1k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
16.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
16.1k
        DCHECK_LE(pos, _num_elements);
344
16.1k
        _cur_index = pos;
345
16.1k
        return Status::OK();
346
16.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Line
Count
Source
334
113k
    Status seek_to_position_in_page(size_t pos) override {
335
113k
        DCHECK(_parsed) << "Must call init()";
336
113k
        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
113k
        DCHECK_LE(pos, _num_elements);
344
113k
        _cur_index = pos;
345
113k
        return Status::OK();
346
113k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.95k
    Status seek_to_position_in_page(size_t pos) override {
335
1.95k
        DCHECK(_parsed) << "Must call init()";
336
1.95k
        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
1.95k
        DCHECK_LE(pos, _num_elements);
344
1.95k
        _cur_index = pos;
345
1.95k
        return Status::OK();
346
1.95k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE24seek_to_position_in_pageEm
Line
Count
Source
334
53
    Status seek_to_position_in_page(size_t pos) override {
335
53
        DCHECK(_parsed) << "Must call init()";
336
53
        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
53
        DCHECK_LE(pos, _num_elements);
344
53
        _cur_index = pos;
345
53
        return Status::OK();
346
53
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE24seek_to_position_in_pageEm
Line
Count
Source
334
89
    Status seek_to_position_in_page(size_t pos) override {
335
89
        DCHECK(_parsed) << "Must call init()";
336
89
        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
89
        DCHECK_LE(pos, _num_elements);
344
89
        _cur_index = pos;
345
89
        return Status::OK();
346
89
    }
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_9FieldTypeE5EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE22seek_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_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.75M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.75M
        DCHECK(_parsed);
389
1.75M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.75M
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
1.75M
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.75M
        *n = max_fetch;
398
1.75M
        if constexpr (forward_index) {
399
1.56M
            _cur_index += max_fetch;
400
1.56M
        }
401
402
1.75M
        return Status::OK();
403
1.75M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
588k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
588k
        DCHECK(_parsed);
389
588k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
588k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
588k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
588k
        *n = max_fetch;
398
588k
        if constexpr (forward_index) {
399
588k
            _cur_index += max_fetch;
400
588k
        }
401
402
588k
        return Status::OK();
403
588k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
148k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
148k
        DCHECK(_parsed);
389
148k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
148k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
148k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
148k
        *n = max_fetch;
398
148k
        if constexpr (forward_index) {
399
148k
            _cur_index += max_fetch;
400
148k
        }
401
402
148k
        return Status::OK();
403
148k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
8.61k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
8.61k
        DCHECK(_parsed);
389
8.61k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
8.61k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
8.61k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
8.61k
        *n = max_fetch;
398
8.61k
        if constexpr (forward_index) {
399
8.61k
            _cur_index += max_fetch;
400
8.61k
        }
401
402
8.61k
        return Status::OK();
403
8.61k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
96.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
96.2k
        DCHECK(_parsed);
389
96.2k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
96.2k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
96.2k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
96.2k
        *n = max_fetch;
398
96.2k
        if constexpr (forward_index) {
399
96.2k
            _cur_index += max_fetch;
400
96.2k
        }
401
402
96.2k
        return Status::OK();
403
96.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
11.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
11.2k
        DCHECK(_parsed);
389
11.2k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
11.2k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
11.2k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
11.2k
        *n = max_fetch;
398
11.2k
        if constexpr (forward_index) {
399
11.2k
            _cur_index += max_fetch;
400
11.2k
        }
401
402
11.2k
        return Status::OK();
403
11.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
141k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
141k
        DCHECK(_parsed);
389
141k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
141k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
141k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
141k
        *n = max_fetch;
398
141k
        if constexpr (forward_index) {
399
141k
            _cur_index += max_fetch;
400
141k
        }
401
402
141k
        return Status::OK();
403
141k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
184k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
184k
        DCHECK(_parsed);
389
184k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
184k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
184k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
184k
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
184k
        return Status::OK();
403
184k
    }
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
13.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
13.4k
        DCHECK(_parsed);
389
13.4k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
13.4k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
13.4k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
13.4k
        *n = max_fetch;
398
13.4k
        if constexpr (forward_index) {
399
13.4k
            _cur_index += max_fetch;
400
13.4k
        }
401
402
13.4k
        return Status::OK();
403
13.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
25.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
25.8k
        DCHECK(_parsed);
389
25.8k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
25.8k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
25.8k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
25.8k
        *n = max_fetch;
398
25.8k
        if constexpr (forward_index) {
399
25.8k
            _cur_index += max_fetch;
400
25.8k
        }
401
402
25.8k
        return Status::OK();
403
25.8k
    }
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
5.18k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
5.18k
        DCHECK(_parsed);
389
5.19k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
5.18k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
5.18k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
5.18k
        *n = max_fetch;
398
5.18k
        if constexpr (forward_index) {
399
5.18k
            _cur_index += max_fetch;
400
5.18k
        }
401
402
5.18k
        return Status::OK();
403
5.18k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
367k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
367k
        DCHECK(_parsed);
389
367k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
367k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
367k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
367k
        *n = max_fetch;
398
367k
        if constexpr (forward_index) {
399
367k
            _cur_index += max_fetch;
400
367k
        }
401
402
367k
        return Status::OK();
403
367k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
75.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
75.5k
        DCHECK(_parsed);
389
75.5k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
75.5k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
75.5k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
75.5k
        *n = max_fetch;
398
75.5k
        if constexpr (forward_index) {
399
75.5k
            _cur_index += max_fetch;
400
75.5k
        }
401
402
75.5k
        return Status::OK();
403
75.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
1.20k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.20k
        DCHECK(_parsed);
389
1.21k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.20k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
1.20k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.20k
        *n = max_fetch;
398
1.20k
        if constexpr (forward_index) {
399
1.20k
            _cur_index += max_fetch;
400
1.20k
        }
401
402
1.20k
        return Status::OK();
403
1.20k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
7.41k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
7.41k
        DCHECK(_parsed);
389
7.41k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
7.41k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
7.41k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
7.41k
        *n = max_fetch;
398
7.41k
        if constexpr (forward_index) {
399
7.41k
            _cur_index += max_fetch;
400
7.41k
        }
401
402
7.41k
        return Status::OK();
403
7.41k
    }
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.28k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.28k
        DCHECK(_parsed);
389
1.28k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.28k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
1.28k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.28k
        *n = max_fetch;
398
1.28k
        if constexpr (forward_index) {
399
1.28k
            _cur_index += max_fetch;
400
1.28k
        }
401
402
1.28k
        return Status::OK();
403
1.28k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
7.78k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
7.78k
        DCHECK(_parsed);
389
7.78k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
7.78k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
7.78k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
7.78k
        *n = max_fetch;
398
7.78k
        if constexpr (forward_index) {
399
7.78k
            _cur_index += max_fetch;
400
7.78k
        }
401
402
7.78k
        return Status::OK();
403
7.78k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
33.3k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
33.3k
        DCHECK(_parsed);
389
33.3k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
33.3k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
33.3k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
33.3k
        *n = max_fetch;
398
33.3k
        if constexpr (forward_index) {
399
33.3k
            _cur_index += max_fetch;
400
33.3k
        }
401
402
33.3k
        return Status::OK();
403
33.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
25.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
25.4k
        DCHECK(_parsed);
389
25.4k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
25.4k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
25.4k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
25.4k
        *n = max_fetch;
398
25.4k
        if constexpr (forward_index) {
399
25.4k
            _cur_index += max_fetch;
400
25.4k
        }
401
402
25.4k
        return Status::OK();
403
25.4k
    }
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.16k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.16k
        DCHECK(_parsed);
389
3.16k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.16k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
3.16k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.16k
        *n = max_fetch;
398
3.16k
        if constexpr (forward_index) {
399
3.16k
            _cur_index += max_fetch;
400
3.16k
        }
401
402
3.16k
        return Status::OK();
403
3.16k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.24k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.24k
        DCHECK(_parsed);
389
3.24k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.24k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
3.24k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.24k
        *n = max_fetch;
398
3.24k
        if constexpr (forward_index) {
399
3.24k
            _cur_index += max_fetch;
400
3.24k
        }
401
402
3.24k
        return Status::OK();
403
3.24k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.24k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.24k
        DCHECK(_parsed);
389
3.24k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.24k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
3.24k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.24k
        *n = max_fetch;
398
3.24k
        if constexpr (forward_index) {
399
3.24k
            _cur_index += max_fetch;
400
3.24k
        }
401
402
3.24k
        return Status::OK();
403
3.24k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
404
405
1.56M
    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
587k
    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
148k
    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
8.61k
    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
96.2k
    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
11.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
141k
    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
13.4k
    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
25.8k
    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
5.18k
    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
367k
    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
75.5k
    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.20k
    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
7.41k
    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.28k
    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
7.78k
    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
33.3k
    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
25.4k
    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.16k
    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
3.24k
    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
3.24k
    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
335k
                          MutableColumnPtr& dst) override {
409
335k
        DCHECK(_parsed);
410
335k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
335k
        auto total = *n;
416
335k
        auto read_count = 0;
417
335k
        _buffer.resize(total);
418
119M
        for (size_t i = 0; i < total; ++i) {
419
118M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
118M
            if (UNLIKELY(ord >= _num_elements)) {
421
14.1k
                break;
422
14.1k
            }
423
424
118M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
118M
        }
426
427
335k
        if (LIKELY(read_count > 0)) {
428
335k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
335k
        }
430
431
335k
        *n = read_count;
432
335k
        return Status::OK();
433
335k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
72.4k
                          MutableColumnPtr& dst) override {
409
72.4k
        DCHECK(_parsed);
410
72.4k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
72.4k
        auto total = *n;
416
72.4k
        auto read_count = 0;
417
72.4k
        _buffer.resize(total);
418
47.5M
        for (size_t i = 0; i < total; ++i) {
419
47.5M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
47.5M
            if (UNLIKELY(ord >= _num_elements)) {
421
2.69k
                break;
422
2.69k
            }
423
424
47.5M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
47.5M
        }
426
427
72.4k
        if (LIKELY(read_count > 0)) {
428
72.4k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
72.4k
        }
430
431
72.4k
        *n = read_count;
432
72.4k
        return Status::OK();
433
72.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
24.7k
                          MutableColumnPtr& dst) override {
409
24.7k
        DCHECK(_parsed);
410
24.7k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
24.7k
        auto total = *n;
416
24.7k
        auto read_count = 0;
417
24.7k
        _buffer.resize(total);
418
877k
        for (size_t i = 0; i < total; ++i) {
419
853k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
853k
            if (UNLIKELY(ord >= _num_elements)) {
421
72
                break;
422
72
            }
423
424
853k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
853k
        }
426
427
24.8k
        if (LIKELY(read_count > 0)) {
428
24.8k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
24.8k
        }
430
431
24.7k
        *n = read_count;
432
24.7k
        return Status::OK();
433
24.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
2.50k
                          MutableColumnPtr& dst) override {
409
2.50k
        DCHECK(_parsed);
410
2.50k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
2.50k
        auto total = *n;
416
2.50k
        auto read_count = 0;
417
2.50k
        _buffer.resize(total);
418
64.2k
        for (size_t i = 0; i < total; ++i) {
419
61.7k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
61.7k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
61.7k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
61.7k
        }
426
427
2.50k
        if (LIKELY(read_count > 0)) {
428
2.50k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
2.50k
        }
430
431
2.50k
        *n = read_count;
432
2.50k
        return Status::OK();
433
2.50k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
56.2k
                          MutableColumnPtr& dst) override {
409
56.2k
        DCHECK(_parsed);
410
56.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
56.2k
        auto total = *n;
416
56.2k
        auto read_count = 0;
417
56.2k
        _buffer.resize(total);
418
14.1M
        for (size_t i = 0; i < total; ++i) {
419
14.0M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.0M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.78k
                break;
422
1.78k
            }
423
424
14.0M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.0M
        }
426
427
56.2k
        if (LIKELY(read_count > 0)) {
428
56.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
56.2k
        }
430
431
56.2k
        *n = read_count;
432
56.2k
        return Status::OK();
433
56.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4.86k
                          MutableColumnPtr& dst) override {
409
4.86k
        DCHECK(_parsed);
410
4.86k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.86k
        auto total = *n;
416
4.86k
        auto read_count = 0;
417
4.86k
        _buffer.resize(total);
418
12.3k
        for (size_t i = 0; i < total; ++i) {
419
7.51k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
7.51k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
7.51k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
7.51k
        }
426
427
4.86k
        if (LIKELY(read_count > 0)) {
428
4.86k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.86k
        }
430
431
4.86k
        *n = read_count;
432
4.86k
        return Status::OK();
433
4.86k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
31.5k
                          MutableColumnPtr& dst) override {
409
31.5k
        DCHECK(_parsed);
410
31.5k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
31.5k
        auto total = *n;
416
31.5k
        auto read_count = 0;
417
31.5k
        _buffer.resize(total);
418
6.39M
        for (size_t i = 0; i < total; ++i) {
419
6.36M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
6.36M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.54k
                break;
422
1.54k
            }
423
424
6.36M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
6.36M
        }
426
427
31.5k
        if (LIKELY(read_count > 0)) {
428
31.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
31.5k
        }
430
431
31.5k
        *n = read_count;
432
31.5k
        return Status::OK();
433
31.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
9.58k
                          MutableColumnPtr& dst) override {
409
9.58k
        DCHECK(_parsed);
410
9.58k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
9.58k
        auto total = *n;
416
9.58k
        auto read_count = 0;
417
9.58k
        _buffer.resize(total);
418
1.16M
        for (size_t i = 0; i < total; ++i) {
419
1.15M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.15M
            if (UNLIKELY(ord >= _num_elements)) {
421
32
                break;
422
32
            }
423
424
1.15M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.15M
        }
426
427
9.58k
        if (LIKELY(read_count > 0)) {
428
9.58k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
9.58k
        }
430
431
9.58k
        *n = read_count;
432
9.58k
        return Status::OK();
433
9.58k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
14.7k
                          MutableColumnPtr& dst) override {
409
14.7k
        DCHECK(_parsed);
410
14.7k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
14.7k
        auto total = *n;
416
14.7k
        auto read_count = 0;
417
14.7k
        _buffer.resize(total);
418
2.60M
        for (size_t i = 0; i < total; ++i) {
419
2.58M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
2.58M
            if (UNLIKELY(ord >= _num_elements)) {
421
764
                break;
422
764
            }
423
424
2.58M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
2.58M
        }
426
427
14.7k
        if (LIKELY(read_count > 0)) {
428
14.7k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
14.7k
        }
430
431
14.7k
        *n = read_count;
432
14.7k
        return Status::OK();
433
14.7k
    }
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.38k
                          MutableColumnPtr& dst) override {
409
1.38k
        DCHECK(_parsed);
410
1.38k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.38k
        auto total = *n;
416
1.38k
        auto read_count = 0;
417
1.38k
        _buffer.resize(total);
418
436k
        for (size_t i = 0; i < total; ++i) {
419
434k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
434k
            if (UNLIKELY(ord >= _num_elements)) {
421
14
                break;
422
14
            }
423
424
434k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
434k
        }
426
427
1.38k
        if (LIKELY(read_count > 0)) {
428
1.38k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.38k
        }
430
431
1.38k
        *n = read_count;
432
1.38k
        return Status::OK();
433
1.38k
    }
_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.53M
        for (size_t i = 0; i < total; ++i) {
419
7.50M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
7.50M
            if (UNLIKELY(ord >= _num_elements)) {
421
846
                break;
422
846
            }
423
424
7.50M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
7.50M
        }
426
427
28.8k
        if (LIKELY(read_count > 0)) {
428
28.8k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
28.8k
        }
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
30.8k
                          MutableColumnPtr& dst) override {
409
30.8k
        DCHECK(_parsed);
410
30.8k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
30.8k
        auto total = *n;
416
30.8k
        auto read_count = 0;
417
30.8k
        _buffer.resize(total);
418
9.15M
        for (size_t i = 0; i < total; ++i) {
419
9.12M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.12M
            if (UNLIKELY(ord >= _num_elements)) {
421
229
                break;
422
229
            }
423
424
9.12M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.12M
        }
426
427
30.8k
        if (LIKELY(read_count > 0)) {
428
30.8k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
30.8k
        }
430
431
30.8k
        *n = read_count;
432
30.8k
        return Status::OK();
433
30.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1.69k
                          MutableColumnPtr& dst) override {
409
1.69k
        DCHECK(_parsed);
410
1.69k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.69k
        auto total = *n;
416
1.69k
        auto read_count = 0;
417
1.69k
        _buffer.resize(total);
418
434k
        for (size_t i = 0; i < total; ++i) {
419
433k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
433k
            if (UNLIKELY(ord >= _num_elements)) {
421
251
                break;
422
251
            }
423
424
432k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
432k
        }
426
427
1.69k
        if (LIKELY(read_count > 0)) {
428
1.69k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.69k
        }
430
431
1.69k
        *n = read_count;
432
1.69k
        return Status::OK();
433
1.69k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
11.6k
                          MutableColumnPtr& dst) override {
409
11.6k
        DCHECK(_parsed);
410
11.6k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
11.6k
        auto total = *n;
416
11.6k
        auto read_count = 0;
417
11.6k
        _buffer.resize(total);
418
24.6k
        for (size_t i = 0; i < total; ++i) {
419
13.0k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
13.0k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
13.0k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
13.0k
        }
426
427
11.6k
        if (LIKELY(read_count > 0)) {
428
11.6k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
11.6k
        }
430
431
11.6k
        *n = read_count;
432
11.6k
        return Status::OK();
433
11.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
163
                          MutableColumnPtr& dst) override {
409
163
        DCHECK(_parsed);
410
163
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
163
        auto total = *n;
416
163
        auto read_count = 0;
417
163
        _buffer.resize(total);
418
331
        for (size_t i = 0; i < total; ++i) {
419
168
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
168
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
168
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
168
        }
426
427
163
        if (LIKELY(read_count > 0)) {
428
163
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
163
        }
430
431
163
        *n = read_count;
432
163
        return Status::OK();
433
163
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4.45k
                          MutableColumnPtr& dst) override {
409
4.45k
        DCHECK(_parsed);
410
4.45k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.45k
        auto total = *n;
416
4.45k
        auto read_count = 0;
417
4.45k
        _buffer.resize(total);
418
18.9k
        for (size_t i = 0; i < total; ++i) {
419
14.4k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.4k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
14.4k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.4k
        }
426
427
4.45k
        if (LIKELY(read_count > 0)) {
428
4.45k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.45k
        }
430
431
4.45k
        *n = read_count;
432
4.45k
        return Status::OK();
433
4.45k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
25.1k
                          MutableColumnPtr& dst) override {
409
25.1k
        DCHECK(_parsed);
410
25.1k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
25.1k
        auto total = *n;
416
25.1k
        auto read_count = 0;
417
25.1k
        _buffer.resize(total);
418
19.9M
        for (size_t i = 0; i < total; ++i) {
419
19.8M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
19.8M
            if (UNLIKELY(ord >= _num_elements)) {
421
5.10k
                break;
422
5.10k
            }
423
424
19.8M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
19.8M
        }
426
427
25.1k
        if (LIKELY(read_count > 0)) {
428
25.1k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
25.1k
        }
430
431
25.1k
        *n = read_count;
432
25.1k
        return Status::OK();
433
25.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.0k
                          MutableColumnPtr& dst) override {
409
13.0k
        DCHECK(_parsed);
410
13.0k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.0k
        auto total = *n;
416
13.0k
        auto read_count = 0;
417
13.0k
        _buffer.resize(total);
418
8.64M
        for (size_t i = 0; i < total; ++i) {
419
8.63M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
8.63M
            if (UNLIKELY(ord >= _num_elements)) {
421
770
                break;
422
770
            }
423
424
8.63M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
8.63M
        }
426
427
13.0k
        if (LIKELY(read_count > 0)) {
428
13.0k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.0k
        }
430
431
13.0k
        *n = read_count;
432
13.0k
        return Status::OK();
433
13.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
967
                          MutableColumnPtr& dst) override {
409
967
        DCHECK(_parsed);
410
967
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
967
        auto total = *n;
416
967
        auto read_count = 0;
417
967
        _buffer.resize(total);
418
2.78k
        for (size_t i = 0; i < total; ++i) {
419
1.82k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.82k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
1.82k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.82k
        }
426
427
967
        if (LIKELY(read_count > 0)) {
428
967
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
967
        }
430
431
967
        *n = read_count;
432
967
        return Status::OK();
433
967
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
450
                          MutableColumnPtr& dst) override {
409
450
        DCHECK(_parsed);
410
450
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
450
        auto total = *n;
416
450
        auto read_count = 0;
417
450
        _buffer.resize(total);
418
1.16k
        for (size_t i = 0; i < total; ++i) {
419
715
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
715
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
715
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
715
        }
426
427
450
        if (LIKELY(read_count > 0)) {
428
450
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
450
        }
430
431
450
        *n = read_count;
432
450
        return Status::OK();
433
450
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
406
                          MutableColumnPtr& dst) override {
409
406
        DCHECK(_parsed);
410
406
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
406
        auto total = *n;
416
406
        auto read_count = 0;
417
406
        _buffer.resize(total);
418
1.32k
        for (size_t i = 0; i < total; ++i) {
419
920
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
920
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
920
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
920
        }
426
427
406
        if (LIKELY(read_count > 0)) {
428
406
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
406
        }
430
431
406
        *n = read_count;
432
406
        return Status::OK();
433
406
    }
434
435
184k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
184k
        return next_batch<false>(n, dst);
437
184k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
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_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
184k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
184k
        return next_batch<false>(n, dst);
437
184k
    }
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_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
3
    size_t count() const override { return _num_elements; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
439
3
    size_t count() const override { return _num_elements; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE5countEv
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_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
3.06M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
1.86M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
441
311
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
441
156
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
4.61k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
441
72
    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
222k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
198k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
441
206k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
441
222k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
441
33.5k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
441
196k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Line
Count
Source
441
1.00k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE13current_indexEv
Line
Count
Source
441
10
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE13current_indexEv
Line
Count
Source
441
3.37k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
441
568
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
441
109k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE13current_indexEv
Line
Count
Source
441
308
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE13current_indexEv
Line
Count
Source
441
53
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
Line
Count
Source
441
97
    size_t current_index() const override { return _cur_index; }
442
443
121M
    char* get_data(size_t index) const {
444
121M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
121M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
49.5M
    char* get_data(size_t index) const {
444
49.5M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
49.5M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
1.00M
    char* get_data(size_t index) const {
444
1.00M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.00M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
443
70.3k
    char* get_data(size_t index) const {
444
70.3k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
70.3k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
443
14.1M
    char* get_data(size_t index) const {
444
14.1M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
14.1M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
18.7k
    char* get_data(size_t index) const {
444
18.7k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
18.7k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
6.69M
    char* get_data(size_t index) const {
444
6.69M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
6.69M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
1.16M
    char* get_data(size_t index) const {
444
1.16M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.16M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
2.61M
    char* get_data(size_t index) const {
444
2.61M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
2.61M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
439k
    char* get_data(size_t index) const {
444
439k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
439k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
7.87M
    char* get_data(size_t index) const {
444
7.87M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
7.87M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
443
9.19M
    char* get_data(size_t index) const {
444
9.19M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.19M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
443
434k
    char* get_data(size_t index) const {
444
434k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
434k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
443
20.4k
    char* get_data(size_t index) const {
444
20.4k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20.4k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
443
1.45k
    char* get_data(size_t index) const {
444
1.45k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.45k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
443
22.2k
    char* get_data(size_t index) const {
444
22.2k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
22.2k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
443
19.9M
    char* get_data(size_t index) const {
444
19.9M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
19.9M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
8.65M
    char* get_data(size_t index) const {
444
8.65M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
8.65M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
443
4.98k
    char* get_data(size_t index) const {
444
4.98k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
4.98k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Line
Count
Source
443
3.96k
    char* get_data(size_t index) const {
444
3.96k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
3.96k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
Line
Count
Source
443
4.16k
    char* get_data(size_t index) const {
444
4.16k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
4.16k
    }
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