Coverage Report

Created: 2026-05-12 07:40

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
769k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
372k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
42.4k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
7.98k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
104k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
95
70.7k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
10.1k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
95
12.3k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
95
19.5k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
195
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
36.8k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
95
44.6k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
284
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
95
7.10k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
193
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
95
9.69k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
95
12.2k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
95
16.2k
    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
789
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
95
701
    Status init() override { return reset(); }
96
97
167M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
166M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
42.9k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
13.2k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
325k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
71.5k
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
50.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12is_page_fullEv
Line
Count
Source
97
12.0k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
97
21.7k
    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
205
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
108k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
89.2k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
97
338
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
Line
Count
Source
97
6.92k
    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.17k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
24.4k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
97
49.9k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Line
Count
Source
97
1.36k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Line
Count
Source
97
33.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
97
8.14k
    bool is_page_full() override { return _remain_element_capacity == 0; }
98
99
1.61M
    Status add(const uint8_t* vals, size_t* count) override {
100
1.61M
        return add_internal<false>(vals, count);
101
1.61M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
99
753k
    Status add(const uint8_t* vals, size_t* count) override {
100
753k
        return add_internal<false>(vals, count);
101
753k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
42.9k
    Status add(const uint8_t* vals, size_t* count) override {
100
42.9k
        return add_internal<false>(vals, count);
101
42.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
13.2k
    Status add(const uint8_t* vals, size_t* count) override {
100
13.2k
        return add_internal<false>(vals, count);
101
13.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
325k
    Status add(const uint8_t* vals, size_t* count) override {
100
325k
        return add_internal<false>(vals, count);
101
325k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
71.5k
    Status add(const uint8_t* vals, size_t* count) override {
100
71.5k
        return add_internal<false>(vals, count);
101
71.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
50.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
50.3k
        return add_internal<false>(vals, count);
101
50.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
99
12.0k
    Status add(const uint8_t* vals, size_t* count) override {
100
12.0k
        return add_internal<false>(vals, count);
101
12.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
99
21.6k
    Status add(const uint8_t* vals, size_t* count) override {
100
21.6k
        return add_internal<false>(vals, count);
101
21.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
205
    Status add(const uint8_t* vals, size_t* count) override {
100
205
        return add_internal<false>(vals, count);
101
205
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
108k
    Status add(const uint8_t* vals, size_t* count) override {
100
108k
        return add_internal<false>(vals, count);
101
108k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
89.2k
    Status add(const uint8_t* vals, size_t* count) override {
100
89.2k
        return add_internal<false>(vals, count);
101
89.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
99
338
    Status add(const uint8_t* vals, size_t* count) override {
100
338
        return add_internal<false>(vals, count);
101
338
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
Line
Count
Source
99
6.92k
    Status add(const uint8_t* vals, size_t* count) override {
100
6.92k
        return add_internal<false>(vals, count);
101
6.92k
    }
_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.17k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.17k
        return add_internal<false>(vals, count);
101
5.17k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
24.4k
    Status add(const uint8_t* vals, size_t* count) override {
100
24.4k
        return add_internal<false>(vals, count);
101
24.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
99
49.9k
    Status add(const uint8_t* vals, size_t* count) override {
100
49.9k
        return add_internal<false>(vals, count);
101
49.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Line
Count
Source
99
1.36k
    Status add(const uint8_t* vals, size_t* count) override {
100
1.36k
        return add_internal<false>(vals, count);
101
1.36k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Line
Count
Source
99
33.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
33.3k
        return add_internal<false>(vals, count);
101
33.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
99
8.14k
    Status add(const uint8_t* vals, size_t* count) override {
100
8.14k
        return add_internal<false>(vals, count);
101
8.14k
    }
102
103
168M
    Status single_add(const uint8_t* vals, size_t* count) {
104
168M
        return add_internal<true>(vals, count);
105
168M
    }
106
107
    template <bool single>
108
168M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
168M
        DCHECK(!_finished);
110
168M
        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
168M
        uint32_t to_add = cast_set<UInt32>(
126
168M
                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
168M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
168M
        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
168M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
168M
        _count += to_add;
134
168M
        _remain_element_capacity -= to_add;
135
168M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
168M
        *num_written = to_add;
138
168M
        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
166M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
166M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
166M
                        *reinterpret_cast<const uint32_t*>(vals);
149
166M
                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
166M
        }
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
168M
        return Status::OK();
159
168M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
753k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
753k
        DCHECK(!_finished);
110
753k
        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
753k
        uint32_t to_add = cast_set<UInt32>(
126
753k
                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
753k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
753k
        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
753k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
753k
        _count += to_add;
134
753k
        _remain_element_capacity -= to_add;
135
753k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
753k
        *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
753k
        memcpy(&_data[orig_size], vals, to_add_size);
158
753k
        return Status::OK();
159
753k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
167M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
167M
        DCHECK(!_finished);
110
167M
        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
167M
        uint32_t to_add = cast_set<UInt32>(
126
167M
                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
167M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
167M
        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
167M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
166M
        _count += to_add;
134
166M
        _remain_element_capacity -= to_add;
135
166M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
166M
        *num_written = to_add;
138
166M
        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
166M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
166M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
166M
                        *reinterpret_cast<const uint32_t*>(vals);
149
166M
                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
166M
        }
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
166M
        return Status::OK();
159
167M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
42.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
42.9k
        DCHECK(!_finished);
110
42.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
42.9k
        uint32_t to_add = cast_set<UInt32>(
126
42.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
42.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
42.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
42.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
42.9k
        _count += to_add;
134
42.9k
        _remain_element_capacity -= to_add;
135
42.9k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
42.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
42.9k
        memcpy(&_data[orig_size], vals, to_add_size);
158
42.9k
        return Status::OK();
159
42.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
13.2k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
13.2k
        DCHECK(!_finished);
110
13.2k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
13.2k
        uint32_t to_add = cast_set<UInt32>(
126
13.2k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
13.2k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
13.2k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
13.2k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
13.2k
        _count += to_add;
134
13.2k
        _remain_element_capacity -= to_add;
135
13.2k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
13.2k
        *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
13.2k
        memcpy(&_data[orig_size], vals, to_add_size);
158
13.2k
        return Status::OK();
159
13.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
325k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
325k
        DCHECK(!_finished);
110
325k
        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
325k
        uint32_t to_add = cast_set<UInt32>(
126
325k
                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
325k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
325k
        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
325k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
325k
        _count += to_add;
134
325k
        _remain_element_capacity -= to_add;
135
325k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
325k
        *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
325k
        memcpy(&_data[orig_size], vals, to_add_size);
158
325k
        return Status::OK();
159
325k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
71.5k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
71.5k
        DCHECK(!_finished);
110
71.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
71.5k
        uint32_t to_add = cast_set<UInt32>(
126
71.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
71.5k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
71.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
71.5k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
71.5k
        _count += to_add;
134
71.5k
        _remain_element_capacity -= to_add;
135
71.5k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
71.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
71.5k
        memcpy(&_data[orig_size], vals, to_add_size);
158
71.5k
        return Status::OK();
159
71.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
50.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
50.3k
        DCHECK(!_finished);
110
50.3k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
50.3k
        uint32_t to_add = cast_set<UInt32>(
126
50.3k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
50.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
50.3k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
50.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
50.3k
        _count += to_add;
134
50.3k
        _remain_element_capacity -= to_add;
135
50.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
50.3k
        *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
50.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
50.3k
        return Status::OK();
159
50.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
12.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
12.0k
        DCHECK(!_finished);
110
12.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
12.0k
        uint32_t to_add = cast_set<UInt32>(
126
12.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
12.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
12.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
12.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
12.0k
        _count += to_add;
134
12.0k
        _remain_element_capacity -= to_add;
135
12.0k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
12.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
12.0k
        memcpy(&_data[orig_size], vals, to_add_size);
158
12.0k
        return Status::OK();
159
12.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
21.6k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
21.6k
        DCHECK(!_finished);
110
21.6k
        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.6k
        uint32_t to_add = cast_set<UInt32>(
126
21.6k
                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.6k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
21.6k
        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.6k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
21.6k
        _count += to_add;
134
21.6k
        _remain_element_capacity -= to_add;
135
21.6k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
21.6k
        *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.6k
        memcpy(&_data[orig_size], vals, to_add_size);
158
21.6k
        return Status::OK();
159
21.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
205
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
205
        DCHECK(!_finished);
110
205
        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
205
        uint32_t to_add = cast_set<UInt32>(
126
205
                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
205
        int to_add_size = to_add * SIZE_OF_TYPE;
129
205
        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
205
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
205
        _count += to_add;
134
205
        _remain_element_capacity -= to_add;
135
205
        _raw_data_size += to_add_size;
136
        // return added number through count
137
205
        *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
205
        memcpy(&_data[orig_size], vals, to_add_size);
158
205
        return Status::OK();
159
205
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
108k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
108k
        DCHECK(!_finished);
110
108k
        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
108k
        uint32_t to_add = cast_set<UInt32>(
126
108k
                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
108k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
108k
        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
108k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
108k
        _count += to_add;
134
108k
        _remain_element_capacity -= to_add;
135
108k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
108k
        *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
108k
        memcpy(&_data[orig_size], vals, to_add_size);
158
108k
        return Status::OK();
159
108k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
89.2k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
89.2k
        DCHECK(!_finished);
110
89.2k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
89.2k
        uint32_t to_add = cast_set<UInt32>(
126
89.2k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
89.2k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
89.2k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
89.2k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
89.2k
        _count += to_add;
134
89.2k
        _remain_element_capacity -= to_add;
135
89.2k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
89.2k
        *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
89.2k
        memcpy(&_data[orig_size], vals, to_add_size);
158
89.2k
        return Status::OK();
159
89.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
338
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
338
        DCHECK(!_finished);
110
338
        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
338
        uint32_t to_add = cast_set<UInt32>(
126
338
                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
338
        int to_add_size = to_add * SIZE_OF_TYPE;
129
338
        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
338
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
338
        _count += to_add;
134
338
        _remain_element_capacity -= to_add;
135
338
        _raw_data_size += to_add_size;
136
        // return added number through count
137
338
        *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
338
        memcpy(&_data[orig_size], vals, to_add_size);
158
338
        return Status::OK();
159
338
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
6.92k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
6.92k
        DCHECK(!_finished);
110
6.92k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
6.92k
        uint32_t to_add = cast_set<UInt32>(
126
6.92k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
6.92k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
6.92k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
6.92k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
6.92k
        _count += to_add;
134
6.92k
        _remain_element_capacity -= to_add;
135
6.92k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
6.92k
        *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
6.92k
        memcpy(&_data[orig_size], vals, to_add_size);
158
6.92k
        return Status::OK();
159
6.92k
    }
_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.17k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.17k
        DCHECK(!_finished);
110
5.17k
        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.17k
        uint32_t to_add = cast_set<UInt32>(
126
5.17k
                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.17k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.17k
        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.17k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.17k
        _count += to_add;
134
5.17k
        _remain_element_capacity -= to_add;
135
5.17k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.17k
        *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.17k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.17k
        return Status::OK();
159
5.17k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
24.4k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
24.4k
        DCHECK(!_finished);
110
24.4k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
24.4k
        uint32_t to_add = cast_set<UInt32>(
126
24.4k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
24.4k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
24.4k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
24.4k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
24.4k
        _count += to_add;
134
24.4k
        _remain_element_capacity -= to_add;
135
24.4k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
24.4k
        *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
24.4k
        memcpy(&_data[orig_size], vals, to_add_size);
158
24.4k
        return Status::OK();
159
24.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
49.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
49.9k
        DCHECK(!_finished);
110
49.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
49.9k
        uint32_t to_add = cast_set<UInt32>(
126
49.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
49.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
49.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
49.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
49.9k
        _count += to_add;
134
49.9k
        _remain_element_capacity -= to_add;
135
49.9k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
49.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
49.9k
        memcpy(&_data[orig_size], vals, to_add_size);
158
49.9k
        return Status::OK();
159
49.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
1.36k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
1.36k
        DCHECK(!_finished);
110
1.36k
        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.36k
        uint32_t to_add = cast_set<UInt32>(
126
1.36k
                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.36k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
1.36k
        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.36k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
1.36k
        _count += to_add;
134
1.36k
        _remain_element_capacity -= to_add;
135
1.36k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
1.36k
        *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.36k
        memcpy(&_data[orig_size], vals, to_add_size);
158
1.36k
        return Status::OK();
159
1.36k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
33.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
33.3k
        DCHECK(!_finished);
110
33.3k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
33.3k
        uint32_t to_add = cast_set<UInt32>(
126
33.3k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
33.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
33.3k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
33.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
33.3k
        _count += to_add;
134
33.3k
        _remain_element_capacity -= to_add;
135
33.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
33.3k
        *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
33.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
33.3k
        return Status::OK();
159
33.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
8.14k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
8.14k
        DCHECK(!_finished);
110
8.14k
        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.14k
        uint32_t to_add = cast_set<UInt32>(
126
8.14k
                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.14k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
8.14k
        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.14k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
8.14k
        _count += to_add;
134
8.14k
        _remain_element_capacity -= to_add;
135
8.14k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
8.14k
        *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.14k
        memcpy(&_data[orig_size], vals, to_add_size);
158
8.14k
        return Status::OK();
159
8.14k
    }
160
161
763k
    Status finish(OwnedSlice* slice) override {
162
763k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
763k
        return Status::OK();
164
763k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
358k
    Status finish(OwnedSlice* slice) override {
162
358k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
358k
        return Status::OK();
164
358k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
41.5k
    Status finish(OwnedSlice* slice) override {
162
41.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
41.5k
        return Status::OK();
164
41.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7.83k
    Status finish(OwnedSlice* slice) override {
162
7.83k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.83k
        return Status::OK();
164
7.83k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
106k
    Status finish(OwnedSlice* slice) override {
162
106k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
106k
        return Status::OK();
164
106k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
70.6k
    Status finish(OwnedSlice* slice) override {
162
70.6k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
70.6k
        return Status::OK();
164
70.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
10.3k
    Status finish(OwnedSlice* slice) override {
162
10.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
10.3k
        return Status::OK();
164
10.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
11.5k
    Status finish(OwnedSlice* slice) override {
162
11.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
11.5k
        return Status::OK();
164
11.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
19.5k
    Status finish(OwnedSlice* slice) override {
162
19.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
19.5k
        return Status::OK();
164
19.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
207
    Status finish(OwnedSlice* slice) override {
162
207
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
207
        return Status::OK();
164
207
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
37.4k
    Status finish(OwnedSlice* slice) override {
162
37.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
37.4k
        return Status::OK();
164
37.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
43.6k
    Status finish(OwnedSlice* slice) override {
162
43.6k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
43.6k
        return Status::OK();
164
43.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
438
    Status finish(OwnedSlice* slice) override {
162
438
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
438
        return Status::OK();
164
438
    }
_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.11k
        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.68k
    Status finish(OwnedSlice* slice) override {
162
9.68k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
9.68k
        return Status::OK();
164
9.68k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
18.8k
    Status finish(OwnedSlice* slice) override {
162
18.8k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
18.8k
        return Status::OK();
164
18.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
16.4k
    Status finish(OwnedSlice* slice) override {
162
16.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
16.4k
        return Status::OK();
164
16.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
1.05k
    Status finish(OwnedSlice* slice) override {
162
1.05k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
1.05k
        return Status::OK();
164
1.05k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
703
    Status finish(OwnedSlice* slice) override {
162
703
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
703
        return Status::OK();
164
703
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
624
    Status finish(OwnedSlice* slice) override {
162
624
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
624
        return Status::OK();
164
624
    }
165
166
1.83M
    Status reset() override {
167
1.83M
        RETURN_IF_CATCH_EXCEPTION({
168
1.83M
            size_t block_size = _options.data_page_size;
169
1.83M
            _count = 0;
170
1.83M
            _raw_data_size = 0;
171
1.83M
            _data.clear();
172
1.83M
            _data.reserve(block_size);
173
1.83M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.83M
                    << "buffer must be naturally-aligned";
175
1.83M
            _buffer.clear();
176
1.83M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.83M
            _finished = false;
178
1.83M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.83M
        });
180
1.83M
        return Status::OK();
181
1.83M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
166
1.03M
    Status reset() override {
167
1.03M
        RETURN_IF_CATCH_EXCEPTION({
168
1.03M
            size_t block_size = _options.data_page_size;
169
1.03M
            _count = 0;
170
1.03M
            _raw_data_size = 0;
171
1.03M
            _data.clear();
172
1.03M
            _data.reserve(block_size);
173
1.03M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.03M
                    << "buffer must be naturally-aligned";
175
1.03M
            _buffer.clear();
176
1.03M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.03M
            _finished = false;
178
1.03M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.03M
        });
180
1.03M
        return Status::OK();
181
1.03M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
83.9k
    Status reset() override {
167
83.9k
        RETURN_IF_CATCH_EXCEPTION({
168
83.9k
            size_t block_size = _options.data_page_size;
169
83.9k
            _count = 0;
170
83.9k
            _raw_data_size = 0;
171
83.9k
            _data.clear();
172
83.9k
            _data.reserve(block_size);
173
83.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
83.9k
                    << "buffer must be naturally-aligned";
175
83.9k
            _buffer.clear();
176
83.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
83.9k
            _finished = false;
178
83.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
83.9k
        });
180
83.9k
        return Status::OK();
181
83.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
166
15.8k
    Status reset() override {
167
15.8k
        RETURN_IF_CATCH_EXCEPTION({
168
15.8k
            size_t block_size = _options.data_page_size;
169
15.8k
            _count = 0;
170
15.8k
            _raw_data_size = 0;
171
15.8k
            _data.clear();
172
15.8k
            _data.reserve(block_size);
173
15.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
15.8k
                    << "buffer must be naturally-aligned";
175
15.8k
            _buffer.clear();
176
15.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
15.8k
            _finished = false;
178
15.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
15.8k
        });
180
15.8k
        return Status::OK();
181
15.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
210k
    Status reset() override {
167
210k
        RETURN_IF_CATCH_EXCEPTION({
168
210k
            size_t block_size = _options.data_page_size;
169
210k
            _count = 0;
170
210k
            _raw_data_size = 0;
171
210k
            _data.clear();
172
210k
            _data.reserve(block_size);
173
210k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
210k
                    << "buffer must be naturally-aligned";
175
210k
            _buffer.clear();
176
210k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
210k
            _finished = false;
178
210k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
210k
        });
180
210k
        return Status::OK();
181
210k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
166
141k
    Status reset() override {
167
141k
        RETURN_IF_CATCH_EXCEPTION({
168
141k
            size_t block_size = _options.data_page_size;
169
141k
            _count = 0;
170
141k
            _raw_data_size = 0;
171
141k
            _data.clear();
172
141k
            _data.reserve(block_size);
173
141k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
141k
                    << "buffer must be naturally-aligned";
175
141k
            _buffer.clear();
176
141k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
141k
            _finished = false;
178
141k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
141k
        });
180
141k
        return Status::OK();
181
141k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
166
20.5k
    Status reset() override {
167
20.5k
        RETURN_IF_CATCH_EXCEPTION({
168
20.5k
            size_t block_size = _options.data_page_size;
169
20.5k
            _count = 0;
170
20.5k
            _raw_data_size = 0;
171
20.5k
            _data.clear();
172
20.5k
            _data.reserve(block_size);
173
20.5k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
20.5k
                    << "buffer must be naturally-aligned";
175
20.5k
            _buffer.clear();
176
20.5k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
20.5k
            _finished = false;
178
20.5k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
20.5k
        });
180
20.5k
        return Status::OK();
181
20.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
166
23.8k
    Status reset() override {
167
23.8k
        RETURN_IF_CATCH_EXCEPTION({
168
23.8k
            size_t block_size = _options.data_page_size;
169
23.8k
            _count = 0;
170
23.8k
            _raw_data_size = 0;
171
23.8k
            _data.clear();
172
23.8k
            _data.reserve(block_size);
173
23.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
23.8k
                    << "buffer must be naturally-aligned";
175
23.8k
            _buffer.clear();
176
23.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
23.8k
            _finished = false;
178
23.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
23.8k
        });
180
23.8k
        return Status::OK();
181
23.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
166
39.1k
    Status reset() override {
167
39.1k
        RETURN_IF_CATCH_EXCEPTION({
168
39.1k
            size_t block_size = _options.data_page_size;
169
39.1k
            _count = 0;
170
39.1k
            _raw_data_size = 0;
171
39.1k
            _data.clear();
172
39.1k
            _data.reserve(block_size);
173
39.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
39.1k
                    << "buffer must be naturally-aligned";
175
39.1k
            _buffer.clear();
176
39.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
39.1k
            _finished = false;
178
39.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
39.1k
        });
180
39.1k
        return Status::OK();
181
39.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
166
402
    Status reset() override {
167
402
        RETURN_IF_CATCH_EXCEPTION({
168
402
            size_t block_size = _options.data_page_size;
169
402
            _count = 0;
170
402
            _raw_data_size = 0;
171
402
            _data.clear();
172
402
            _data.reserve(block_size);
173
402
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
402
                    << "buffer must be naturally-aligned";
175
402
            _buffer.clear();
176
402
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
402
            _finished = false;
178
402
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
402
        });
180
402
        return Status::OK();
181
402
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
166
74.2k
    Status reset() override {
167
74.2k
        RETURN_IF_CATCH_EXCEPTION({
168
74.2k
            size_t block_size = _options.data_page_size;
169
74.2k
            _count = 0;
170
74.2k
            _raw_data_size = 0;
171
74.2k
            _data.clear();
172
74.2k
            _data.reserve(block_size);
173
74.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
74.2k
                    << "buffer must be naturally-aligned";
175
74.2k
            _buffer.clear();
176
74.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
74.2k
            _finished = false;
178
74.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
74.2k
        });
180
74.3k
        return Status::OK();
181
74.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
166
88.2k
    Status reset() override {
167
88.2k
        RETURN_IF_CATCH_EXCEPTION({
168
88.2k
            size_t block_size = _options.data_page_size;
169
88.2k
            _count = 0;
170
88.2k
            _raw_data_size = 0;
171
88.2k
            _data.clear();
172
88.2k
            _data.reserve(block_size);
173
88.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
88.2k
                    << "buffer must be naturally-aligned";
175
88.2k
            _buffer.clear();
176
88.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
88.2k
            _finished = false;
178
88.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
88.2k
        });
180
88.3k
        return Status::OK();
181
88.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
166
722
    Status reset() override {
167
722
        RETURN_IF_CATCH_EXCEPTION({
168
722
            size_t block_size = _options.data_page_size;
169
722
            _count = 0;
170
722
            _raw_data_size = 0;
171
722
            _data.clear();
172
722
            _data.reserve(block_size);
173
722
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
722
                    << "buffer must be naturally-aligned";
175
722
            _buffer.clear();
176
722
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
722
            _finished = false;
178
722
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
722
        });
180
722
        return Status::OK();
181
722
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
Line
Count
Source
166
14.2k
    Status reset() override {
167
14.2k
        RETURN_IF_CATCH_EXCEPTION({
168
14.2k
            size_t block_size = _options.data_page_size;
169
14.2k
            _count = 0;
170
14.2k
            _raw_data_size = 0;
171
14.2k
            _data.clear();
172
14.2k
            _data.reserve(block_size);
173
14.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
14.2k
                    << "buffer must be naturally-aligned";
175
14.2k
            _buffer.clear();
176
14.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
14.2k
            _finished = false;
178
14.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
14.2k
        });
180
14.2k
        return Status::OK();
181
14.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
166
299
    Status reset() override {
167
299
        RETURN_IF_CATCH_EXCEPTION({
168
299
            size_t block_size = _options.data_page_size;
169
299
            _count = 0;
170
299
            _raw_data_size = 0;
171
299
            _data.clear();
172
299
            _data.reserve(block_size);
173
299
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
299
                    << "buffer must be naturally-aligned";
175
299
            _buffer.clear();
176
299
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
299
            _finished = false;
178
299
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
299
        });
180
299
        return Status::OK();
181
299
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
166
19.3k
    Status reset() override {
167
19.3k
        RETURN_IF_CATCH_EXCEPTION({
168
19.3k
            size_t block_size = _options.data_page_size;
169
19.3k
            _count = 0;
170
19.3k
            _raw_data_size = 0;
171
19.3k
            _data.clear();
172
19.3k
            _data.reserve(block_size);
173
19.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
19.3k
                    << "buffer must be naturally-aligned";
175
19.3k
            _buffer.clear();
176
19.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
19.3k
            _finished = false;
178
19.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
19.3k
        });
180
19.3k
        return Status::OK();
181
19.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
31.1k
    Status reset() override {
167
31.1k
        RETURN_IF_CATCH_EXCEPTION({
168
31.1k
            size_t block_size = _options.data_page_size;
169
31.1k
            _count = 0;
170
31.1k
            _raw_data_size = 0;
171
31.1k
            _data.clear();
172
31.1k
            _data.reserve(block_size);
173
31.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
31.1k
                    << "buffer must be naturally-aligned";
175
31.1k
            _buffer.clear();
176
31.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
31.1k
            _finished = false;
178
31.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
31.1k
        });
180
31.1k
        return Status::OK();
181
31.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
166
32.7k
    Status reset() override {
167
32.7k
        RETURN_IF_CATCH_EXCEPTION({
168
32.7k
            size_t block_size = _options.data_page_size;
169
32.7k
            _count = 0;
170
32.7k
            _raw_data_size = 0;
171
32.7k
            _data.clear();
172
32.7k
            _data.reserve(block_size);
173
32.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
32.7k
                    << "buffer must be naturally-aligned";
175
32.7k
            _buffer.clear();
176
32.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
32.7k
            _finished = false;
178
32.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
32.7k
        });
180
32.7k
        return Status::OK();
181
32.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Line
Count
Source
166
2.20k
    Status reset() override {
167
2.20k
        RETURN_IF_CATCH_EXCEPTION({
168
2.20k
            size_t block_size = _options.data_page_size;
169
2.20k
            _count = 0;
170
2.20k
            _raw_data_size = 0;
171
2.20k
            _data.clear();
172
2.20k
            _data.reserve(block_size);
173
2.20k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
2.20k
                    << "buffer must be naturally-aligned";
175
2.20k
            _buffer.clear();
176
2.20k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
2.20k
            _finished = false;
178
2.20k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
2.20k
        });
180
2.20k
        return Status::OK();
181
2.20k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Line
Count
Source
166
1.49k
    Status reset() override {
167
1.49k
        RETURN_IF_CATCH_EXCEPTION({
168
1.49k
            size_t block_size = _options.data_page_size;
169
1.49k
            _count = 0;
170
1.49k
            _raw_data_size = 0;
171
1.49k
            _data.clear();
172
1.49k
            _data.reserve(block_size);
173
1.49k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.49k
                    << "buffer must be naturally-aligned";
175
1.49k
            _buffer.clear();
176
1.49k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.49k
            _finished = false;
178
1.49k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.49k
        });
180
1.49k
        return Status::OK();
181
1.49k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
166
1.32k
    Status reset() override {
167
1.32k
        RETURN_IF_CATCH_EXCEPTION({
168
1.32k
            size_t block_size = _options.data_page_size;
169
1.32k
            _count = 0;
170
1.32k
            _raw_data_size = 0;
171
1.32k
            _data.clear();
172
1.32k
            _data.reserve(block_size);
173
1.32k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.32k
                    << "buffer must be naturally-aligned";
175
1.32k
            _buffer.clear();
176
1.32k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.32k
            _finished = false;
178
1.32k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.32k
        });
180
1.32k
        return Status::OK();
181
1.32k
    }
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_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5countEv
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
44.4k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
22.5k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
185
5.07k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
185
968
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
5.08k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
2.10k
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
1.32k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
743
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
185
792
    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.68k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
2.41k
    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
161
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
185
315
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
185
1.13k
    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
471k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
66.6k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
41.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
7.83k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
106k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
70.6k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
187
10.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
187
11.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
19.5k
    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
207
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
187
37.4k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
187
43.6k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
187
438
    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.68k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
18.8k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
187
16.4k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE17get_raw_data_sizeEv
Line
Count
Source
187
1.05k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Line
Count
Source
187
703
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
187
624
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
769k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
372k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
42.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
7.99k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
104k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
70.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
10.2k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
12.3k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
19.5k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
195
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
36.8k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
44.6k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
284
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
7.09k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
193
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.69k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
12.2k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
16.2k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1.14k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
789
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
702
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
192
193
763k
    OwnedSlice _finish(int final_size_of_type) {
194
763k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
763k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
763k
        int padding_elems = num_elems_after_padding - _count;
199
763k
        int padding_bytes = padding_elems * final_size_of_type;
200
22.7M
        for (int i = 0; i < padding_bytes; i++) {
201
21.9M
            _data.push_back(0);
202
21.9M
        }
203
204
        // reserve enough place for compression
205
763k
        _buffer.resize(
206
763k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
763k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
763k
        int64_t bytes =
210
763k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
763k
                                         num_elems_after_padding, final_size_of_type, 0);
212
763k
        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
763k
        encode_fixed32_le(&_buffer[0], _count);
222
763k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
763k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
763k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
763k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
763k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
763k
        return _buffer.build();
229
763k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
358k
    OwnedSlice _finish(int final_size_of_type) {
194
358k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
358k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
358k
        int padding_elems = num_elems_after_padding - _count;
199
358k
        int padding_bytes = padding_elems * final_size_of_type;
200
7.08M
        for (int i = 0; i < padding_bytes; i++) {
201
6.72M
            _data.push_back(0);
202
6.72M
        }
203
204
        // reserve enough place for compression
205
358k
        _buffer.resize(
206
358k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
358k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
358k
        int64_t bytes =
210
358k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
358k
                                         num_elems_after_padding, final_size_of_type, 0);
212
358k
        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
358k
        encode_fixed32_le(&_buffer[0], _count);
222
358k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
358k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
358k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
358k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
358k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
358k
        return _buffer.build();
229
358k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
41.5k
    OwnedSlice _finish(int final_size_of_type) {
194
41.5k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
41.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
41.5k
        int padding_elems = num_elems_after_padding - _count;
199
41.5k
        int padding_bytes = padding_elems * final_size_of_type;
200
251k
        for (int i = 0; i < padding_bytes; i++) {
201
210k
            _data.push_back(0);
202
210k
        }
203
204
        // reserve enough place for compression
205
41.5k
        _buffer.resize(
206
41.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
41.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
41.5k
        int64_t bytes =
210
41.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
41.5k
                                         num_elems_after_padding, final_size_of_type, 0);
212
41.5k
        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
41.5k
        encode_fixed32_le(&_buffer[0], _count);
222
41.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
41.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
41.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
41.5k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
41.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
41.5k
        return _buffer.build();
229
41.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
7.83k
    OwnedSlice _finish(int final_size_of_type) {
194
7.83k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.83k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.83k
        int padding_elems = num_elems_after_padding - _count;
199
7.83k
        int padding_bytes = padding_elems * final_size_of_type;
200
78.8k
        for (int i = 0; i < padding_bytes; i++) {
201
71.0k
            _data.push_back(0);
202
71.0k
        }
203
204
        // reserve enough place for compression
205
7.83k
        _buffer.resize(
206
7.83k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.83k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.83k
        int64_t bytes =
210
7.83k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.83k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.83k
        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.83k
        encode_fixed32_le(&_buffer[0], _count);
222
7.83k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.83k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.83k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.83k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.83k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.83k
        return _buffer.build();
229
7.83k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
106k
    OwnedSlice _finish(int final_size_of_type) {
194
106k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
106k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
106k
        int padding_elems = num_elems_after_padding - _count;
199
106k
        int padding_bytes = padding_elems * final_size_of_type;
200
5.09M
        for (int i = 0; i < padding_bytes; i++) {
201
4.99M
            _data.push_back(0);
202
4.99M
        }
203
204
        // reserve enough place for compression
205
106k
        _buffer.resize(
206
106k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
106k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
106k
        int64_t bytes =
210
106k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
106k
                                         num_elems_after_padding, final_size_of_type, 0);
212
106k
        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
106k
        encode_fixed32_le(&_buffer[0], _count);
222
106k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
106k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
106k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
106k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
106k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
106k
        return _buffer.build();
229
106k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
70.6k
    OwnedSlice _finish(int final_size_of_type) {
194
70.6k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
70.6k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
70.6k
        int padding_elems = num_elems_after_padding - _count;
199
70.6k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.40M
        for (int i = 0; i < padding_bytes; i++) {
201
3.33M
            _data.push_back(0);
202
3.33M
        }
203
204
        // reserve enough place for compression
205
70.6k
        _buffer.resize(
206
70.6k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
70.6k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
70.6k
        int64_t bytes =
210
70.6k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
70.6k
                                         num_elems_after_padding, final_size_of_type, 0);
212
70.6k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
70.6k
        encode_fixed32_le(&_buffer[0], _count);
222
70.6k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
70.6k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
70.6k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
70.6k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
70.6k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
70.6k
        return _buffer.build();
229
70.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
10.3k
    OwnedSlice _finish(int final_size_of_type) {
194
10.3k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
10.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
10.3k
        int padding_elems = num_elems_after_padding - _count;
199
10.3k
        int padding_bytes = padding_elems * final_size_of_type;
200
647k
        for (int i = 0; i < padding_bytes; i++) {
201
636k
            _data.push_back(0);
202
636k
        }
203
204
        // reserve enough place for compression
205
10.3k
        _buffer.resize(
206
10.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
10.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
10.3k
        int64_t bytes =
210
10.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
10.3k
                                         num_elems_after_padding, final_size_of_type, 0);
212
10.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
10.3k
        encode_fixed32_le(&_buffer[0], _count);
222
10.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
10.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
10.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
10.3k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
10.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
10.3k
        return _buffer.build();
229
10.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
11.5k
    OwnedSlice _finish(int final_size_of_type) {
194
11.5k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
11.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
11.5k
        int padding_elems = num_elems_after_padding - _count;
199
11.5k
        int padding_bytes = padding_elems * final_size_of_type;
200
250k
        for (int i = 0; i < padding_bytes; i++) {
201
239k
            _data.push_back(0);
202
239k
        }
203
204
        // reserve enough place for compression
205
11.5k
        _buffer.resize(
206
11.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
11.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
11.5k
        int64_t bytes =
210
11.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
11.5k
                                         num_elems_after_padding, final_size_of_type, 0);
212
11.5k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
11.5k
        encode_fixed32_le(&_buffer[0], _count);
222
11.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
11.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
11.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
11.5k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
11.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
11.5k
        return _buffer.build();
229
11.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
19.5k
    OwnedSlice _finish(int final_size_of_type) {
194
19.5k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
19.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
19.5k
        int padding_elems = num_elems_after_padding - _count;
199
19.5k
        int padding_bytes = padding_elems * final_size_of_type;
200
881k
        for (int i = 0; i < padding_bytes; i++) {
201
861k
            _data.push_back(0);
202
861k
        }
203
204
        // reserve enough place for compression
205
19.5k
        _buffer.resize(
206
19.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
19.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
19.5k
        int64_t bytes =
210
19.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
19.5k
                                         num_elems_after_padding, final_size_of_type, 0);
212
19.5k
        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.5k
        encode_fixed32_le(&_buffer[0], _count);
222
19.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
19.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
19.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
19.5k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
19.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
19.5k
        return _buffer.build();
229
19.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
207
    OwnedSlice _finish(int final_size_of_type) {
194
207
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
207
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
207
        int padding_elems = num_elems_after_padding - _count;
199
207
        int padding_bytes = padding_elems * final_size_of_type;
200
2.82k
        for (int i = 0; i < padding_bytes; i++) {
201
2.61k
            _data.push_back(0);
202
2.61k
        }
203
204
        // reserve enough place for compression
205
207
        _buffer.resize(
206
207
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
207
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
207
        int64_t bytes =
210
207
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
207
                                         num_elems_after_padding, final_size_of_type, 0);
212
207
        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
207
        encode_fixed32_le(&_buffer[0], _count);
222
207
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
207
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
207
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
207
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
207
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
207
        return _buffer.build();
229
207
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
193
37.4k
    OwnedSlice _finish(int final_size_of_type) {
194
37.4k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
37.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
37.4k
        int padding_elems = num_elems_after_padding - _count;
199
37.4k
        int padding_bytes = padding_elems * final_size_of_type;
200
803k
        for (int i = 0; i < padding_bytes; i++) {
201
766k
            _data.push_back(0);
202
766k
        }
203
204
        // reserve enough place for compression
205
37.4k
        _buffer.resize(
206
37.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
37.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
37.4k
        int64_t bytes =
210
37.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
37.4k
                                         num_elems_after_padding, final_size_of_type, 0);
212
37.4k
        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.4k
        encode_fixed32_le(&_buffer[0], _count);
222
37.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
37.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
37.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
37.4k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
37.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
37.4k
        return _buffer.build();
229
37.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
193
43.6k
    OwnedSlice _finish(int final_size_of_type) {
194
43.6k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
43.6k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
43.6k
        int padding_elems = num_elems_after_padding - _count;
199
43.6k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.85M
        for (int i = 0; i < padding_bytes; i++) {
201
1.80M
            _data.push_back(0);
202
1.80M
        }
203
204
        // reserve enough place for compression
205
43.6k
        _buffer.resize(
206
43.6k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
43.6k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
43.6k
        int64_t bytes =
210
43.6k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
43.6k
                                         num_elems_after_padding, final_size_of_type, 0);
212
43.6k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
43.6k
        encode_fixed32_le(&_buffer[0], _count);
222
43.6k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
43.6k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
43.6k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
43.6k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
43.6k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
43.6k
        return _buffer.build();
229
43.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
193
438
    OwnedSlice _finish(int final_size_of_type) {
194
438
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
438
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
438
        int padding_elems = num_elems_after_padding - _count;
199
438
        int padding_bytes = padding_elems * final_size_of_type;
200
7.00k
        for (int i = 0; i < padding_bytes; i++) {
201
6.56k
            _data.push_back(0);
202
6.56k
        }
203
204
        // reserve enough place for compression
205
438
        _buffer.resize(
206
438
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
438
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
438
        int64_t bytes =
210
438
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
438
                                         num_elems_after_padding, final_size_of_type, 0);
212
438
        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
438
        encode_fixed32_le(&_buffer[0], _count);
222
438
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
438
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
438
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
438
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
438
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
438
        return _buffer.build();
229
438
    }
_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
373k
        for (int i = 0; i < padding_bytes; i++) {
201
366k
            _data.push_back(0);
202
366k
        }
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.49k
        for (int i = 0; i < padding_bytes; i++) {
201
6.38k
            _data.push_back(0);
202
6.38k
        }
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.68k
    OwnedSlice _finish(int final_size_of_type) {
194
9.68k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
9.68k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
9.68k
        int padding_elems = num_elems_after_padding - _count;
199
9.68k
        int padding_bytes = padding_elems * final_size_of_type;
200
118k
        for (int i = 0; i < padding_bytes; i++) {
201
108k
            _data.push_back(0);
202
108k
        }
203
204
        // reserve enough place for compression
205
9.68k
        _buffer.resize(
206
9.68k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
9.68k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
9.68k
        int64_t bytes =
210
9.68k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
9.68k
                                         num_elems_after_padding, final_size_of_type, 0);
212
9.68k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
9.68k
        encode_fixed32_le(&_buffer[0], _count);
222
9.68k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
9.68k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
9.68k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
9.68k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
9.68k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
9.68k
        return _buffer.build();
229
9.68k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
18.8k
    OwnedSlice _finish(int final_size_of_type) {
194
18.8k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
18.8k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
18.8k
        int padding_elems = num_elems_after_padding - _count;
199
18.8k
        int padding_bytes = padding_elems * final_size_of_type;
200
495k
        for (int i = 0; i < padding_bytes; i++) {
201
476k
            _data.push_back(0);
202
476k
        }
203
204
        // reserve enough place for compression
205
18.8k
        _buffer.resize(
206
18.8k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
18.8k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
18.8k
        int64_t bytes =
210
18.8k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
18.8k
                                         num_elems_after_padding, final_size_of_type, 0);
212
18.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
18.8k
        encode_fixed32_le(&_buffer[0], _count);
222
18.8k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
18.8k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
18.8k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
18.8k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
18.8k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
18.8k
        return _buffer.build();
229
18.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
193
16.4k
    OwnedSlice _finish(int final_size_of_type) {
194
16.4k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
16.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
16.4k
        int padding_elems = num_elems_after_padding - _count;
199
16.4k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.13M
        for (int i = 0; i < padding_bytes; i++) {
201
1.11M
            _data.push_back(0);
202
1.11M
        }
203
204
        // reserve enough place for compression
205
16.4k
        _buffer.resize(
206
16.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
16.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
16.4k
        int64_t bytes =
210
16.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
16.4k
                                         num_elems_after_padding, final_size_of_type, 0);
212
16.4k
        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
16.4k
        encode_fixed32_le(&_buffer[0], _count);
222
16.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
16.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
16.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
16.4k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
16.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
16.4k
        return _buffer.build();
229
16.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE7_finishEi
Line
Count
Source
193
1.05k
    OwnedSlice _finish(int final_size_of_type) {
194
1.05k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
1.05k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
1.05k
        int padding_elems = num_elems_after_padding - _count;
199
1.05k
        int padding_bytes = padding_elems * final_size_of_type;
200
160k
        for (int i = 0; i < padding_bytes; i++) {
201
159k
            _data.push_back(0);
202
159k
        }
203
204
        // reserve enough place for compression
205
1.05k
        _buffer.resize(
206
1.05k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
1.05k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
1.05k
        int64_t bytes =
210
1.05k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
1.05k
                                         num_elems_after_padding, final_size_of_type, 0);
212
1.05k
        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.05k
        encode_fixed32_le(&_buffer[0], _count);
222
1.05k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
1.05k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
1.05k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
1.05k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
1.05k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
1.05k
        return _buffer.build();
229
1.05k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Line
Count
Source
193
703
    OwnedSlice _finish(int final_size_of_type) {
194
703
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
703
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
703
        int padding_elems = num_elems_after_padding - _count;
199
703
        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
703
        _buffer.resize(
206
703
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
703
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
703
        int64_t bytes =
210
703
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
703
                                         num_elems_after_padding, final_size_of_type, 0);
212
703
        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
703
        encode_fixed32_le(&_buffer[0], _count);
222
703
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
703
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
703
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
703
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
703
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
703
        return _buffer.build();
229
703
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
193
624
    OwnedSlice _finish(int final_size_of_type) {
194
624
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
624
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
624
        int padding_elems = num_elems_after_padding - _count;
199
624
        int padding_bytes = padding_elems * final_size_of_type;
200
49.8k
        for (int i = 0; i < padding_bytes; i++) {
201
49.2k
            _data.push_back(0);
202
49.2k
        }
203
204
        // reserve enough place for compression
205
624
        _buffer.resize(
206
624
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
624
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
624
        int64_t bytes =
210
624
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
624
                                         num_elems_after_padding, final_size_of_type, 0);
212
624
        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
624
        encode_fixed32_le(&_buffer[0], _count);
222
624
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
624
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
624
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
624
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
624
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
624
        return _buffer.build();
229
624
    }
230
231
    using CppType = typename TypeTraits<Type>::CppType;
232
233
    CppType cell(int idx) const {
234
        DCHECK_GE(idx, 0);
235
        CppType ret;
236
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
237
        return ret;
238
    }
239
240
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
241
    PageBuilderOptions _options;
242
    uint32_t _count;
243
    uint32_t _remain_element_capacity;
244
    bool _finished;
245
    faststring _data;
246
    faststring _buffer;
247
    uint64_t _raw_data_size = 0;
248
};
249
250
inline Status parse_bit_shuffle_header(const Slice& data, size_t& num_elements,
251
                                       size_t& compressed_size, size_t& num_element_after_padding,
252
1.78M
                                       int& size_of_element) {
253
1.78M
    if (data.size < BITSHUFFLE_PAGE_HEADER_SIZE) {
254
0
        return Status::InternalError("file corruption: invalid data size:{}, header size:{}",
255
0
                                     data.size, BITSHUFFLE_PAGE_HEADER_SIZE);
256
0
    }
257
258
1.78M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
1.78M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
1.78M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
1.78M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
1.78M
    if (num_element_after_padding != ALIGN_UP(num_elements, 8)) {
263
0
        return Status::InternalError(
264
0
                "num of element information corrupted,"
265
0
                " _num_element_after_padding:{}, _num_elements:{}, expected_padding:{},"
266
0
                " compressed_size:{}, size_of_element:{}, data_size:{}",
267
0
                num_element_after_padding, num_elements, ALIGN_UP(num_elements, 8), compressed_size,
268
0
                size_of_element, data.size);
269
0
    }
270
1.78M
    switch (size_of_element) {
271
122k
    case 1:
272
143k
    case 2:
273
145k
    case 3:
274
1.19M
    case 4:
275
1.70M
    case 8:
276
1.70M
    case 12:
277
1.78M
    case 16:
278
1.78M
    case 32:
279
1.78M
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
1.78M
    }
283
1.78M
    return Status::OK();
284
1.78M
}
285
286
template <FieldType Type>
287
class BitShufflePageDecoder : public PageDecoder {
288
public:
289
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
290
1.10M
            : _data(data),
291
1.10M
              _options(options),
292
1.10M
              _parsed(false),
293
1.10M
              _num_elements(0),
294
1.10M
              _num_element_after_padding(0),
295
1.10M
              _size_of_element(0),
296
1.10M
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
540k
            : _data(data),
291
540k
              _options(options),
292
540k
              _parsed(false),
293
540k
              _num_elements(0),
294
540k
              _num_element_after_padding(0),
295
540k
              _size_of_element(0),
296
540k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
80.8k
            : _data(data),
291
80.8k
              _options(options),
292
80.8k
              _parsed(false),
293
80.8k
              _num_elements(0),
294
80.8k
              _num_element_after_padding(0),
295
80.8k
              _size_of_element(0),
296
80.8k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
13.3k
            : _data(data),
291
13.3k
              _options(options),
292
13.3k
              _parsed(false),
293
13.3k
              _num_elements(0),
294
13.3k
              _num_element_after_padding(0),
295
13.3k
              _size_of_element(0),
296
13.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
75.0k
            : _data(data),
291
75.0k
              _options(options),
292
75.0k
              _parsed(false),
293
75.0k
              _num_elements(0),
294
75.0k
              _num_element_after_padding(0),
295
75.0k
              _size_of_element(0),
296
75.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
89.1k
            : _data(data),
291
89.1k
              _options(options),
292
89.1k
              _parsed(false),
293
89.1k
              _num_elements(0),
294
89.1k
              _num_element_after_padding(0),
295
89.1k
              _size_of_element(0),
296
89.1k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
17.9k
            : _data(data),
291
17.9k
              _options(options),
292
17.9k
              _parsed(false),
293
17.9k
              _num_elements(0),
294
17.9k
              _num_element_after_padding(0),
295
17.9k
              _size_of_element(0),
296
17.9k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
19.4k
            : _data(data),
291
19.4k
              _options(options),
292
19.4k
              _parsed(false),
293
19.4k
              _num_elements(0),
294
19.4k
              _num_element_after_padding(0),
295
19.4k
              _size_of_element(0),
296
19.4k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
29.9k
            : _data(data),
291
29.9k
              _options(options),
292
29.9k
              _parsed(false),
293
29.9k
              _num_elements(0),
294
29.9k
              _num_element_after_padding(0),
295
29.9k
              _size_of_element(0),
296
29.9k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.85k
            : _data(data),
291
1.85k
              _options(options),
292
1.85k
              _parsed(false),
293
1.85k
              _num_elements(0),
294
1.85k
              _num_element_after_padding(0),
295
1.85k
              _size_of_element(0),
296
1.85k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
57.4k
            : _data(data),
291
57.4k
              _options(options),
292
57.4k
              _parsed(false),
293
57.4k
              _num_elements(0),
294
57.4k
              _num_element_after_padding(0),
295
57.4k
              _size_of_element(0),
296
57.4k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
67.3k
            : _data(data),
291
67.3k
              _options(options),
292
67.3k
              _parsed(false),
293
67.3k
              _num_elements(0),
294
67.3k
              _num_element_after_padding(0),
295
67.3k
              _size_of_element(0),
296
67.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
2.38k
            : _data(data),
291
2.38k
              _options(options),
292
2.38k
              _parsed(false),
293
2.38k
              _num_elements(0),
294
2.38k
              _num_element_after_padding(0),
295
2.38k
              _size_of_element(0),
296
2.38k
              _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.46k
            : _data(data),
291
1.46k
              _options(options),
292
1.46k
              _parsed(false),
293
1.46k
              _num_elements(0),
294
1.46k
              _num_element_after_padding(0),
295
1.46k
              _size_of_element(0),
296
1.46k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
14.9k
            : _data(data),
291
14.9k
              _options(options),
292
14.9k
              _parsed(false),
293
14.9k
              _num_elements(0),
294
14.9k
              _num_element_after_padding(0),
295
14.9k
              _size_of_element(0),
296
14.9k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
40.9k
            : _data(data),
291
40.9k
              _options(options),
292
40.9k
              _parsed(false),
293
40.9k
              _num_elements(0),
294
40.9k
              _num_element_after_padding(0),
295
40.9k
              _size_of_element(0),
296
40.9k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
30.2k
            : _data(data),
291
30.2k
              _options(options),
292
30.2k
              _parsed(false),
293
30.2k
              _num_elements(0),
294
30.2k
              _num_element_after_padding(0),
295
30.2k
              _size_of_element(0),
296
30.2k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.75k
            : _data(data),
291
1.75k
              _options(options),
292
1.75k
              _parsed(false),
293
1.75k
              _num_elements(0),
294
1.75k
              _num_element_after_padding(0),
295
1.75k
              _size_of_element(0),
296
1.75k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.20k
            : _data(data),
291
1.20k
              _options(options),
292
1.20k
              _parsed(false),
293
1.20k
              _num_elements(0),
294
1.20k
              _num_element_after_padding(0),
295
1.20k
              _size_of_element(0),
296
1.20k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.16k
            : _data(data),
291
1.16k
              _options(options),
292
1.16k
              _parsed(false),
293
1.16k
              _num_elements(0),
294
1.16k
              _num_element_after_padding(0),
295
1.16k
              _size_of_element(0),
296
1.16k
              _cur_index(0) {}
297
298
1.10M
    Status init() override {
299
1.10M
        CHECK(!_parsed);
300
1.10M
        size_t unused;
301
1.10M
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.10M
                                                 _num_element_after_padding, _size_of_element));
303
304
1.10M
        if (_data.size !=
305
1.10M
            _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.10M
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.10M
                     _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.10M
        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.10M
        _parsed = true;
325
1.10M
        return Status::OK();
326
1.10M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
298
540k
    Status init() override {
299
540k
        CHECK(!_parsed);
300
540k
        size_t unused;
301
540k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
540k
                                                 _num_element_after_padding, _size_of_element));
303
304
540k
        if (_data.size !=
305
540k
            _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
540k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
540k
                     _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
540k
        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
540k
        _parsed = true;
325
540k
        return Status::OK();
326
540k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
80.8k
    Status init() override {
299
80.8k
        CHECK(!_parsed);
300
80.8k
        size_t unused;
301
80.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
80.8k
                                                 _num_element_after_padding, _size_of_element));
303
304
80.8k
        if (_data.size !=
305
80.8k
            _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
80.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
80.8k
                     _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
80.8k
        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
80.8k
        _parsed = true;
325
80.8k
        return Status::OK();
326
80.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
13.3k
    Status init() override {
299
13.3k
        CHECK(!_parsed);
300
13.3k
        size_t unused;
301
13.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
13.3k
                                                 _num_element_after_padding, _size_of_element));
303
304
13.3k
        if (_data.size !=
305
13.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
13.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
13.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
13.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
13.3k
        _parsed = true;
325
13.3k
        return Status::OK();
326
13.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
75.0k
    Status init() override {
299
75.0k
        CHECK(!_parsed);
300
75.0k
        size_t unused;
301
75.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
75.0k
                                                 _num_element_after_padding, _size_of_element));
303
304
75.0k
        if (_data.size !=
305
75.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
75.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
75.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
75.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
75.0k
        _parsed = true;
325
75.0k
        return Status::OK();
326
75.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
298
89.1k
    Status init() override {
299
89.1k
        CHECK(!_parsed);
300
89.1k
        size_t unused;
301
89.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
89.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
89.1k
        if (_data.size !=
305
89.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
89.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
89.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
89.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
89.1k
        _parsed = true;
325
89.1k
        return Status::OK();
326
89.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
298
17.9k
    Status init() override {
299
17.9k
        CHECK(!_parsed);
300
17.9k
        size_t unused;
301
17.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
17.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
17.9k
        if (_data.size !=
305
17.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
17.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
17.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
17.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
17.9k
        _parsed = true;
325
17.9k
        return Status::OK();
326
17.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
298
19.4k
    Status init() override {
299
19.4k
        CHECK(!_parsed);
300
19.4k
        size_t unused;
301
19.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
19.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
19.4k
        if (_data.size !=
305
19.4k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
19.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
19.4k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
19.4k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
19.4k
        _parsed = true;
325
19.4k
        return Status::OK();
326
19.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
298
29.9k
    Status init() override {
299
29.9k
        CHECK(!_parsed);
300
29.9k
        size_t unused;
301
29.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
29.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
29.9k
        if (_data.size !=
305
29.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
29.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
29.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
29.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
29.9k
        _parsed = true;
325
29.9k
        return Status::OK();
326
29.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
1.85k
    Status init() override {
299
1.85k
        CHECK(!_parsed);
300
1.85k
        size_t unused;
301
1.85k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.85k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.85k
        if (_data.size !=
305
1.85k
            _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.85k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.85k
                     _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.85k
        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.85k
        _parsed = true;
325
1.85k
        return Status::OK();
326
1.85k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
57.4k
    Status init() override {
299
57.4k
        CHECK(!_parsed);
300
57.4k
        size_t unused;
301
57.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
57.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
57.4k
        if (_data.size !=
305
57.4k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
57.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
57.4k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
57.4k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
57.4k
        _parsed = true;
325
57.4k
        return Status::OK();
326
57.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
298
67.2k
    Status init() override {
299
67.2k
        CHECK(!_parsed);
300
67.2k
        size_t unused;
301
67.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
67.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
67.2k
        if (_data.size !=
305
67.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
67.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
67.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
67.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
67.2k
        _parsed = true;
325
67.2k
        return Status::OK();
326
67.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
298
2.38k
    Status init() override {
299
2.38k
        CHECK(!_parsed);
300
2.38k
        size_t unused;
301
2.38k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
2.38k
                                                 _num_element_after_padding, _size_of_element));
303
304
2.38k
        if (_data.size !=
305
2.38k
            _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.38k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
2.38k
                     _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.38k
        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.38k
        _parsed = true;
325
2.38k
        return Status::OK();
326
2.38k
    }
_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.46k
    Status init() override {
299
1.46k
        CHECK(!_parsed);
300
1.46k
        size_t unused;
301
1.46k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.46k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.46k
        if (_data.size !=
305
1.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
1.46k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.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
1.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
1.46k
        _parsed = true;
325
1.46k
        return Status::OK();
326
1.46k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
298
14.9k
    Status init() override {
299
14.9k
        CHECK(!_parsed);
300
14.9k
        size_t unused;
301
14.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
14.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
14.9k
        if (_data.size !=
305
14.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
14.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
14.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
14.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
14.9k
        _parsed = true;
325
14.9k
        return Status::OK();
326
14.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
298
40.9k
    Status init() override {
299
40.9k
        CHECK(!_parsed);
300
40.9k
        size_t unused;
301
40.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
40.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
40.9k
        if (_data.size !=
305
40.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
40.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
40.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
40.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
40.9k
        _parsed = true;
325
40.9k
        return Status::OK();
326
40.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
298
30.2k
    Status init() override {
299
30.2k
        CHECK(!_parsed);
300
30.2k
        size_t unused;
301
30.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
30.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
30.2k
        if (_data.size !=
305
30.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
30.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
30.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
30.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
30.2k
        _parsed = true;
325
30.2k
        return Status::OK();
326
30.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
298
1.75k
    Status init() override {
299
1.75k
        CHECK(!_parsed);
300
1.75k
        size_t unused;
301
1.75k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.75k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.75k
        if (_data.size !=
305
1.75k
            _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.75k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.75k
                     _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.75k
        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.75k
        _parsed = true;
325
1.75k
        return Status::OK();
326
1.75k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
298
1.20k
    Status init() override {
299
1.20k
        CHECK(!_parsed);
300
1.20k
        size_t unused;
301
1.20k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.20k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.20k
        if (_data.size !=
305
1.20k
            _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.20k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.20k
                     _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.20k
        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.20k
        _parsed = true;
325
1.20k
        return Status::OK();
326
1.20k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
298
1.16k
    Status init() override {
299
1.16k
        CHECK(!_parsed);
300
1.16k
        size_t unused;
301
1.16k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.16k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.16k
        if (_data.size !=
305
1.16k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.16k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.16k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.16k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.16k
        _parsed = true;
325
1.16k
        return Status::OK();
326
1.16k
    }
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
1.56M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
1.56M
        if (_num_elements == 0) [[unlikely]] {
337
11.3k
            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
11.3k
        }
342
343
1.56M
        DCHECK_LE(pos, _num_elements);
344
1.56M
        _cur_index = pos;
345
1.56M
        return Status::OK();
346
1.56M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
777k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
777k
        if (_num_elements == 0) [[unlikely]] {
337
5.32k
            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.32k
        }
342
343
777k
        DCHECK_LE(pos, _num_elements);
344
777k
        _cur_index = pos;
345
777k
        return Status::OK();
346
777k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
124k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
124k
        if (_num_elements == 0) [[unlikely]] {
337
352
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
352
        }
342
343
124k
        DCHECK_LE(pos, _num_elements);
344
124k
        _cur_index = pos;
345
124k
        return Status::OK();
346
124k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
22.5k
    Status seek_to_position_in_page(size_t pos) override {
335
22.5k
        DCHECK(_parsed) << "Must call init()";
336
22.5k
        if (_num_elements == 0) [[unlikely]] {
337
1.35k
            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.35k
        }
342
343
22.5k
        DCHECK_LE(pos, _num_elements);
344
22.5k
        _cur_index = pos;
345
22.5k
        return Status::OK();
346
22.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
163k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
163k
        if (_num_elements == 0) [[unlikely]] {
337
616
            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
616
        }
342
343
163k
        DCHECK_LE(pos, _num_elements);
344
163k
        _cur_index = pos;
345
163k
        return Status::OK();
346
163k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
334
8.00k
    Status seek_to_position_in_page(size_t pos) override {
335
8.00k
        DCHECK(_parsed) << "Must call init()";
336
8.00k
        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
8.00k
        DCHECK_LE(pos, _num_elements);
344
8.00k
        _cur_index = pos;
345
8.00k
        return Status::OK();
346
8.00k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
334
15.1k
    Status seek_to_position_in_page(size_t pos) override {
335
15.1k
        DCHECK(_parsed) << "Must call init()";
336
15.1k
        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
15.1k
        DCHECK_LE(pos, _num_elements);
344
15.1k
        _cur_index = pos;
345
15.1k
        return Status::OK();
346
15.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
18.6k
    Status seek_to_position_in_page(size_t pos) override {
335
18.6k
        DCHECK(_parsed) << "Must call init()";
336
18.6k
        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
18.6k
        DCHECK_LE(pos, _num_elements);
344
18.6k
        _cur_index = pos;
345
18.6k
        return Status::OK();
346
18.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
334
14.8k
    Status seek_to_position_in_page(size_t pos) override {
335
14.8k
        DCHECK(_parsed) << "Must call init()";
336
14.8k
        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
14.8k
        DCHECK_LE(pos, _num_elements);
344
14.8k
        _cur_index = pos;
345
14.8k
        return Status::OK();
346
14.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
334
21.3k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
21.3k
        if (_num_elements == 0) [[unlikely]] {
337
4
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
4
        }
342
343
21.3k
        DCHECK_LE(pos, _num_elements);
344
21.3k
        _cur_index = pos;
345
21.3k
        return Status::OK();
346
21.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
334
287k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
287k
        if (_num_elements == 0) [[unlikely]] {
337
973
            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
973
        }
342
343
287k
        DCHECK_LE(pos, _num_elements);
344
287k
        _cur_index = pos;
345
287k
        return Status::OK();
346
287k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
334
64.0k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
64.0k
        if (_num_elements == 0) [[unlikely]] {
337
18
            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
18
        }
342
343
64.0k
        DCHECK_LE(pos, _num_elements);
344
64.0k
        _cur_index = pos;
345
64.0k
        return Status::OK();
346
64.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
7.82k
    Status seek_to_position_in_page(size_t pos) override {
335
7.82k
        DCHECK(_parsed) << "Must call init()";
336
7.82k
        if (_num_elements == 0) [[unlikely]] {
337
16
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
16
        }
342
343
7.82k
        DCHECK_LE(pos, _num_elements);
344
7.82k
        _cur_index = pos;
345
7.82k
        return Status::OK();
346
7.82k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
334
6.51k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
6.51k
        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.51k
        DCHECK_LE(pos, _num_elements);
344
6.51k
        _cur_index = pos;
345
6.51k
        return Status::OK();
346
6.51k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
Line
Count
Source
334
140
    Status seek_to_position_in_page(size_t pos) override {
335
140
        DCHECK(_parsed) << "Must call init()";
336
140
        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
140
        DCHECK_LE(pos, _num_elements);
344
140
        _cur_index = pos;
345
140
        return Status::OK();
346
140
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Line
Count
Source
334
886
    Status seek_to_position_in_page(size_t pos) override {
335
886
        DCHECK(_parsed) << "Must call init()";
336
886
        if (_num_elements == 0) [[unlikely]] {
337
36
            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
36
        }
342
343
886
        DCHECK_LE(pos, _num_elements);
344
886
        _cur_index = pos;
345
886
        return Status::OK();
346
886
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
334
18.8k
    Status seek_to_position_in_page(size_t pos) override {
335
18.8k
        DCHECK(_parsed) << "Must call init()";
336
18.8k
        if (_num_elements == 0) [[unlikely]] {
337
1.70k
            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.70k
        }
342
343
18.8k
        DCHECK_LE(pos, _num_elements);
344
18.8k
        _cur_index = pos;
345
18.8k
        return Status::OK();
346
18.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Line
Count
Source
334
14.7k
    Status seek_to_position_in_page(size_t pos) override {
335
14.7k
        DCHECK(_parsed) << "Must call init()";
336
14.7k
        if (_num_elements == 0) [[unlikely]] {
337
549
            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
549
        }
342
343
14.7k
        DCHECK_LE(pos, _num_elements);
344
14.7k
        _cur_index = pos;
345
14.7k
        return Status::OK();
346
14.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.93k
    Status seek_to_position_in_page(size_t pos) override {
335
1.93k
        DCHECK(_parsed) << "Must call init()";
336
1.93k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
1.93k
        DCHECK_LE(pos, _num_elements);
344
1.93k
        _cur_index = pos;
345
1.93k
        return Status::OK();
346
1.93k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE24seek_to_position_in_pageEm
Line
Count
Source
334
76
    Status seek_to_position_in_page(size_t pos) override {
335
76
        DCHECK(_parsed) << "Must call init()";
336
76
        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
76
        DCHECK_LE(pos, _num_elements);
344
76
        _cur_index = pos;
345
76
        return Status::OK();
346
76
    }
_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_9FieldTypeE8EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE22seek_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
2.02M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
2.02M
        DCHECK(_parsed);
389
2.02M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
2.02M
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
2.02M
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
2.02M
        *n = max_fetch;
398
2.02M
        if constexpr (forward_index) {
399
1.86M
            _cur_index += max_fetch;
400
1.86M
        }
401
402
2.02M
        return Status::OK();
403
2.02M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
759k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
759k
        DCHECK(_parsed);
389
761k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
759k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
759k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
759k
        *n = max_fetch;
398
759k
        if constexpr (forward_index) {
399
759k
            _cur_index += max_fetch;
400
759k
        }
401
402
759k
        return Status::OK();
403
759k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
233k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
233k
        DCHECK(_parsed);
389
233k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
233k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
233k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
233k
        *n = max_fetch;
398
233k
        if constexpr (forward_index) {
399
233k
            _cur_index += max_fetch;
400
233k
        }
401
402
233k
        return Status::OK();
403
233k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
15.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
15.1k
        DCHECK(_parsed);
389
15.1k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
15.1k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
15.1k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
15.1k
        *n = max_fetch;
398
15.1k
        if constexpr (forward_index) {
399
15.1k
            _cur_index += max_fetch;
400
15.1k
        }
401
402
15.1k
        return Status::OK();
403
15.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
76.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
76.9k
        DCHECK(_parsed);
389
76.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
76.9k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
76.9k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
76.9k
        *n = max_fetch;
398
76.9k
        if constexpr (forward_index) {
399
76.9k
            _cur_index += max_fetch;
400
76.9k
        }
401
402
76.9k
        return Status::OK();
403
76.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
130k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
130k
        DCHECK(_parsed);
389
130k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
130k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
130k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
130k
        *n = max_fetch;
398
130k
        if constexpr (forward_index) {
399
130k
            _cur_index += max_fetch;
400
130k
        }
401
402
130k
        return Status::OK();
403
130k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
161k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
161k
        DCHECK(_parsed);
389
161k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
161k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
161k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
161k
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
161k
        return Status::OK();
403
161k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
32.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
32.5k
        DCHECK(_parsed);
389
32.5k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
32.5k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
32.5k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
32.5k
        *n = max_fetch;
398
32.5k
        if constexpr (forward_index) {
399
32.5k
            _cur_index += max_fetch;
400
32.5k
        }
401
402
32.5k
        return Status::OK();
403
32.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
14.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
14.0k
        DCHECK(_parsed);
389
14.0k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
14.0k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
14.0k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
14.0k
        *n = max_fetch;
398
14.0k
        if constexpr (forward_index) {
399
14.0k
            _cur_index += max_fetch;
400
14.0k
        }
401
402
14.0k
        return Status::OK();
403
14.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
21.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
21.0k
        DCHECK(_parsed);
389
21.0k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
21.0k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
21.0k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
21.0k
        *n = max_fetch;
398
21.0k
        if constexpr (forward_index) {
399
21.0k
            _cur_index += max_fetch;
400
21.0k
        }
401
402
21.0k
        return Status::OK();
403
21.0k
    }
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
15.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
15.5k
        DCHECK(_parsed);
389
15.5k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
15.5k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
15.5k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
15.5k
        *n = max_fetch;
398
15.5k
        if constexpr (forward_index) {
399
15.5k
            _cur_index += max_fetch;
400
15.5k
        }
401
402
15.5k
        return Status::OK();
403
15.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
379k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
379k
        DCHECK(_parsed);
389
379k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
379k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
379k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
379k
        *n = max_fetch;
398
379k
        if constexpr (forward_index) {
399
379k
            _cur_index += max_fetch;
400
379k
        }
401
402
379k
        return Status::OK();
403
379k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
86.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
86.6k
        DCHECK(_parsed);
389
86.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
86.6k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
86.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
86.6k
        *n = max_fetch;
398
86.6k
        if constexpr (forward_index) {
399
86.6k
            _cur_index += max_fetch;
400
86.6k
        }
401
402
86.6k
        return Status::OK();
403
86.6k
    }
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.40k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.40k
        DCHECK(_parsed);
389
1.40k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.40k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
1.40k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.40k
        *n = max_fetch;
398
1.40k
        if constexpr (forward_index) {
399
1.40k
            _cur_index += max_fetch;
400
1.40k
        }
401
402
1.40k
        return Status::OK();
403
1.40k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
6.79k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
6.79k
        DCHECK(_parsed);
389
6.79k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
6.79k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
6.79k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
6.79k
        *n = max_fetch;
398
6.79k
        if constexpr (forward_index) {
399
6.79k
            _cur_index += max_fetch;
400
6.79k
        }
401
402
6.79k
        return Status::OK();
403
6.79k
    }
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.35k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.35k
        DCHECK(_parsed);
389
1.35k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.35k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
1.35k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.35k
        *n = max_fetch;
398
1.35k
        if constexpr (forward_index) {
399
1.35k
            _cur_index += max_fetch;
400
1.35k
        }
401
402
1.35k
        return Status::OK();
403
1.35k
    }
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
29.3k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
29.3k
        DCHECK(_parsed);
389
29.3k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
29.3k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
29.3k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
29.3k
        *n = max_fetch;
398
29.3k
        if constexpr (forward_index) {
399
29.3k
            _cur_index += max_fetch;
400
29.3k
        }
401
402
29.3k
        return Status::OK();
403
29.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
30.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
30.4k
        DCHECK(_parsed);
389
30.4k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
30.4k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
30.4k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
30.4k
        *n = max_fetch;
398
30.4k
        if constexpr (forward_index) {
399
30.4k
            _cur_index += max_fetch;
400
30.4k
        }
401
402
30.4k
        return Status::OK();
403
30.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.15k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.15k
        DCHECK(_parsed);
389
3.15k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.15k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
3.15k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.15k
        *n = max_fetch;
398
3.15k
        if constexpr (forward_index) {
399
3.15k
            _cur_index += max_fetch;
400
3.15k
        }
401
402
3.15k
        return Status::OK();
403
3.15k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
10.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
10.8k
        DCHECK(_parsed);
389
10.8k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
10.8k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
10.8k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
10.8k
        *n = max_fetch;
398
10.8k
        if constexpr (forward_index) {
399
10.8k
            _cur_index += max_fetch;
400
10.8k
        }
401
402
10.8k
        return Status::OK();
403
10.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
8.29k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
8.29k
        DCHECK(_parsed);
389
8.29k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
8.29k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
8.29k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
8.29k
        *n = max_fetch;
398
8.29k
        if constexpr (forward_index) {
399
8.29k
            _cur_index += max_fetch;
400
8.29k
        }
401
402
8.29k
        return Status::OK();
403
8.29k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
404
405
1.86M
    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
763k
    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
234k
    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
15.1k
    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
76.9k
    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
130k
    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_9FieldTypeE9EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
32.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
14.0k
    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
21.0k
    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
15.5k
    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
379k
    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
86.6k
    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.40k
    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
6.79k
    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.35k
    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
29.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
30.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.15k
    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
10.8k
    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
8.29k
    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
349k
                          MutableColumnPtr& dst) override {
409
349k
        DCHECK(_parsed);
410
349k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
349k
        auto total = *n;
416
349k
        auto read_count = 0;
417
349k
        _buffer.resize(total);
418
122M
        for (size_t i = 0; i < total; ++i) {
419
122M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
122M
            if (UNLIKELY(ord >= _num_elements)) {
421
13.2k
                break;
422
13.2k
            }
423
424
122M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
122M
        }
426
427
349k
        if (LIKELY(read_count > 0)) {
428
349k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
349k
        }
430
431
349k
        *n = read_count;
432
349k
        return Status::OK();
433
349k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
80.1k
                          MutableColumnPtr& dst) override {
409
80.1k
        DCHECK(_parsed);
410
80.1k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
80.1k
        auto total = *n;
416
80.1k
        auto read_count = 0;
417
80.1k
        _buffer.resize(total);
418
39.9M
        for (size_t i = 0; i < total; ++i) {
419
39.8M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
39.8M
            if (UNLIKELY(ord >= _num_elements)) {
421
2.18k
                break;
422
2.18k
            }
423
424
39.8M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
39.8M
        }
426
427
80.1k
        if (LIKELY(read_count > 0)) {
428
80.1k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
80.1k
        }
430
431
80.1k
        *n = read_count;
432
80.1k
        return Status::OK();
433
80.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
24.5k
                          MutableColumnPtr& dst) override {
409
24.5k
        DCHECK(_parsed);
410
24.5k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
24.5k
        auto total = *n;
416
24.5k
        auto read_count = 0;
417
24.5k
        _buffer.resize(total);
418
1.76M
        for (size_t i = 0; i < total; ++i) {
419
1.73M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.73M
            if (UNLIKELY(ord >= _num_elements)) {
421
7
                break;
422
7
            }
423
424
1.73M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.73M
        }
426
427
24.5k
        if (LIKELY(read_count > 0)) {
428
24.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
24.5k
        }
430
431
24.5k
        *n = read_count;
432
24.5k
        return Status::OK();
433
24.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
6.25k
                          MutableColumnPtr& dst) override {
409
6.25k
        DCHECK(_parsed);
410
6.25k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
6.25k
        auto total = *n;
416
6.25k
        auto read_count = 0;
417
6.25k
        _buffer.resize(total);
418
637k
        for (size_t i = 0; i < total; ++i) {
419
630k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
630k
            if (UNLIKELY(ord >= _num_elements)) {
421
14
                break;
422
14
            }
423
424
630k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
630k
        }
426
427
6.25k
        if (LIKELY(read_count > 0)) {
428
6.25k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
6.25k
        }
430
431
6.25k
        *n = read_count;
432
6.25k
        return Status::OK();
433
6.25k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
45.9k
                          MutableColumnPtr& dst) override {
409
45.9k
        DCHECK(_parsed);
410
45.9k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
45.9k
        auto total = *n;
416
45.9k
        auto read_count = 0;
417
45.9k
        _buffer.resize(total);
418
26.7M
        for (size_t i = 0; i < total; ++i) {
419
26.6M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
26.6M
            if (UNLIKELY(ord >= _num_elements)) {
421
2.13k
                break;
422
2.13k
            }
423
424
26.6M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
26.6M
        }
426
427
45.9k
        if (LIKELY(read_count > 0)) {
428
45.9k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
45.9k
        }
430
431
45.9k
        *n = read_count;
432
45.9k
        return Status::OK();
433
45.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
28.6k
                          MutableColumnPtr& dst) override {
409
28.6k
        DCHECK(_parsed);
410
28.6k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
28.6k
        auto total = *n;
416
28.6k
        auto read_count = 0;
417
28.6k
        _buffer.resize(total);
418
406k
        for (size_t i = 0; i < total; ++i) {
419
377k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
377k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
377k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
377k
        }
426
427
28.6k
        if (LIKELY(read_count > 0)) {
428
28.6k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
28.6k
        }
430
431
28.6k
        *n = read_count;
432
28.6k
        return Status::OK();
433
28.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
8.15k
                          MutableColumnPtr& dst) override {
409
8.15k
        DCHECK(_parsed);
410
8.15k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
8.15k
        auto total = *n;
416
8.15k
        auto read_count = 0;
417
8.15k
        _buffer.resize(total);
418
1.23M
        for (size_t i = 0; i < total; ++i) {
419
1.23M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.23M
            if (UNLIKELY(ord >= _num_elements)) {
421
288
                break;
422
288
            }
423
424
1.23M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.23M
        }
426
427
8.15k
        if (LIKELY(read_count > 0)) {
428
8.15k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
8.15k
        }
430
431
8.15k
        *n = read_count;
432
8.15k
        return Status::OK();
433
8.15k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
10.7k
                          MutableColumnPtr& dst) override {
409
10.7k
        DCHECK(_parsed);
410
10.7k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
10.7k
        auto total = *n;
416
10.7k
        auto read_count = 0;
417
10.7k
        _buffer.resize(total);
418
1.18M
        for (size_t i = 0; i < total; ++i) {
419
1.17M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.17M
            if (UNLIKELY(ord >= _num_elements)) {
421
31
                break;
422
31
            }
423
424
1.17M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.17M
        }
426
427
10.7k
        if (LIKELY(read_count > 0)) {
428
10.7k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
10.7k
        }
430
431
10.7k
        *n = read_count;
432
10.7k
        return Status::OK();
433
10.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
16.5k
                          MutableColumnPtr& dst) override {
409
16.5k
        DCHECK(_parsed);
410
16.5k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
16.5k
        auto total = *n;
416
16.5k
        auto read_count = 0;
417
16.5k
        _buffer.resize(total);
418
3.80M
        for (size_t i = 0; i < total; ++i) {
419
3.79M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
3.79M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.19k
                break;
422
1.19k
            }
423
424
3.79M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
3.79M
        }
426
427
16.5k
        if (LIKELY(read_count > 0)) {
428
16.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
16.5k
        }
430
431
16.5k
        *n = read_count;
432
16.5k
        return Status::OK();
433
16.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
2.23k
                          MutableColumnPtr& dst) override {
409
2.23k
        DCHECK(_parsed);
410
2.23k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
2.23k
        auto total = *n;
416
2.23k
        auto read_count = 0;
417
2.23k
        _buffer.resize(total);
418
468k
        for (size_t i = 0; i < total; ++i) {
419
465k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
465k
            if (UNLIKELY(ord >= _num_elements)) {
421
12
                break;
422
12
            }
423
424
465k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
465k
        }
426
427
2.23k
        if (LIKELY(read_count > 0)) {
428
2.23k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
2.23k
        }
430
431
2.23k
        *n = read_count;
432
2.23k
        return Status::OK();
433
2.23k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
30.1k
                          MutableColumnPtr& dst) override {
409
30.1k
        DCHECK(_parsed);
410
30.1k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
30.1k
        auto total = *n;
416
30.1k
        auto read_count = 0;
417
30.1k
        _buffer.resize(total);
418
6.37M
        for (size_t i = 0; i < total; ++i) {
419
6.34M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
6.34M
            if (UNLIKELY(ord >= _num_elements)) {
421
805
                break;
422
805
            }
423
424
6.34M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
6.34M
        }
426
427
30.1k
        if (LIKELY(read_count > 0)) {
428
30.1k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
30.1k
        }
430
431
30.1k
        *n = read_count;
432
30.1k
        return Status::OK();
433
30.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
33.3k
                          MutableColumnPtr& dst) override {
409
33.3k
        DCHECK(_parsed);
410
33.3k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
33.3k
        auto total = *n;
416
33.3k
        auto read_count = 0;
417
33.3k
        _buffer.resize(total);
418
9.42M
        for (size_t i = 0; i < total; ++i) {
419
9.38M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.38M
            if (UNLIKELY(ord >= _num_elements)) {
421
209
                break;
422
209
            }
423
424
9.38M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.38M
        }
426
427
33.3k
        if (LIKELY(read_count > 0)) {
428
33.3k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
33.3k
        }
430
431
33.3k
        *n = read_count;
432
33.3k
        return Status::OK();
433
33.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
2.33k
                          MutableColumnPtr& dst) override {
409
2.33k
        DCHECK(_parsed);
410
2.33k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
2.33k
        auto total = *n;
416
2.33k
        auto read_count = 0;
417
2.33k
        _buffer.resize(total);
418
468k
        for (size_t i = 0; i < total; ++i) {
419
466k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
466k
            if (UNLIKELY(ord >= _num_elements)) {
421
100
                break;
422
100
            }
423
424
466k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
466k
        }
426
427
2.33k
        if (LIKELY(read_count > 0)) {
428
2.33k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
2.33k
        }
430
431
2.33k
        *n = read_count;
432
2.33k
        return Status::OK();
433
2.33k
    }
_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.7k
        for (size_t i = 0; i < total; ++i) {
419
13.1k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
13.1k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
13.1k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
13.1k
        }
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
207
                          MutableColumnPtr& dst) override {
409
207
        DCHECK(_parsed);
410
207
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
207
        auto total = *n;
416
207
        auto read_count = 0;
417
207
        _buffer.resize(total);
418
419
        for (size_t i = 0; i < total; ++i) {
419
212
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
212
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
212
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
212
        }
426
427
207
        if (LIKELY(read_count > 0)) {
428
207
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
207
        }
430
431
207
        *n = read_count;
432
207
        return Status::OK();
433
207
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4.78k
                          MutableColumnPtr& dst) override {
409
4.78k
        DCHECK(_parsed);
410
4.78k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.78k
        auto total = *n;
416
4.78k
        auto read_count = 0;
417
4.78k
        _buffer.resize(total);
418
19.5k
        for (size_t i = 0; i < total; ++i) {
419
14.7k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.7k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
14.7k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.7k
        }
426
427
4.78k
        if (LIKELY(read_count > 0)) {
428
4.78k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.78k
        }
430
431
4.78k
        *n = read_count;
432
4.78k
        return Status::OK();
433
4.78k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
27.3k
                          MutableColumnPtr& dst) override {
409
27.3k
        DCHECK(_parsed);
410
27.3k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
27.3k
        auto total = *n;
416
27.3k
        auto read_count = 0;
417
27.3k
        _buffer.resize(total);
418
21.4M
        for (size_t i = 0; i < total; ++i) {
419
21.4M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
21.4M
            if (UNLIKELY(ord >= _num_elements)) {
421
5.82k
                break;
422
5.82k
            }
423
424
21.4M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
21.4M
        }
426
427
27.3k
        if (LIKELY(read_count > 0)) {
428
27.3k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
27.3k
        }
430
431
27.3k
        *n = read_count;
432
27.3k
        return Status::OK();
433
27.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
14.4k
                          MutableColumnPtr& dst) override {
409
14.4k
        DCHECK(_parsed);
410
14.4k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
14.4k
        auto total = *n;
416
14.4k
        auto read_count = 0;
417
14.4k
        _buffer.resize(total);
418
8.90M
        for (size_t i = 0; i < total; ++i) {
419
8.88M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
8.88M
            if (UNLIKELY(ord >= _num_elements)) {
421
434
                break;
422
434
            }
423
424
8.88M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
8.88M
        }
426
427
14.4k
        if (LIKELY(read_count > 0)) {
428
14.4k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
14.4k
        }
430
431
14.4k
        *n = read_count;
432
14.4k
        return Status::OK();
433
14.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
958
                          MutableColumnPtr& dst) override {
409
958
        DCHECK(_parsed);
410
958
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
958
        auto total = *n;
416
958
        auto read_count = 0;
417
958
        _buffer.resize(total);
418
2.76k
        for (size_t i = 0; i < total; ++i) {
419
1.81k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.81k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
1.81k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.81k
        }
426
427
958
        if (LIKELY(read_count > 0)) {
428
958
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
958
        }
430
431
958
        *n = read_count;
432
958
        return Status::OK();
433
958
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
481
                          MutableColumnPtr& dst) override {
409
481
        DCHECK(_parsed);
410
481
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
481
        auto total = *n;
416
481
        auto read_count = 0;
417
481
        _buffer.resize(total);
418
1.20k
        for (size_t i = 0; i < total; ++i) {
419
725
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
725
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
725
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
725
        }
426
427
481
        if (LIKELY(read_count > 0)) {
428
480
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
480
        }
430
431
481
        *n = read_count;
432
481
        return Status::OK();
433
481
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
412
                          MutableColumnPtr& dst) override {
409
412
        DCHECK(_parsed);
410
412
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
412
        auto total = *n;
416
412
        auto read_count = 0;
417
412
        _buffer.resize(total);
418
1.33k
        for (size_t i = 0; i < total; ++i) {
419
927
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
927
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
927
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
927
        }
426
427
412
        if (LIKELY(read_count > 0)) {
428
412
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
412
        }
430
431
412
        *n = read_count;
432
412
        return Status::OK();
433
412
    }
434
435
161k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
161k
        return next_batch<false>(n, dst);
437
161k
    }
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
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
435
161k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
161k
        return next_batch<false>(n, dst);
437
161k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE15peek_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_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE5countEv
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
391k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
113k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
441
16.1k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
441
15.9k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
116k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
441
9.69k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE13current_indexEv
Line
Count
Source
441
16.4k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
11.0k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
441
9.40k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
441
22.0k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
441
37.4k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
441
5.91k
    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
14
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE13current_indexEv
Line
Count
Source
441
3.38k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
441
2.50k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
441
10.0k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE13current_indexEv
Line
Count
Source
441
305
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE13current_indexEv
Line
Count
Source
441
62
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
Line
Count
Source
441
106
    size_t current_index() const override { return _cur_index; }
442
443
125M
    char* get_data(size_t index) const {
444
125M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
125M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
41.2M
    char* get_data(size_t index) const {
444
41.2M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
41.2M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
1.97M
    char* get_data(size_t index) const {
444
1.97M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.97M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
443
646k
    char* get_data(size_t index) const {
444
646k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
646k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
443
26.7M
    char* get_data(size_t index) const {
444
26.7M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
26.7M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
669k
    char* get_data(size_t index) const {
444
669k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
669k
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
1.26M
    char* get_data(size_t index) const {
444
1.26M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.26M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
1.18M
    char* get_data(size_t index) const {
444
1.18M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.18M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
3.81M
    char* get_data(size_t index) const {
444
3.81M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
3.81M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
481k
    char* get_data(size_t index) const {
444
481k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
481k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
6.72M
    char* get_data(size_t index) const {
444
6.72M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
6.72M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
443
9.47M
    char* get_data(size_t index) const {
444
9.47M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.47M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
443
467k
    char* get_data(size_t index) const {
444
467k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
467k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
443
19.9k
    char* get_data(size_t index) const {
444
19.9k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
19.9k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
443
1.56k
    char* get_data(size_t index) const {
444
1.56k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.56k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
443
22.5k
    char* get_data(size_t index) const {
444
22.5k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
22.5k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
443
21.4M
    char* get_data(size_t index) const {
444
21.4M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
21.4M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
8.91M
    char* get_data(size_t index) const {
444
8.91M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
8.91M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
443
4.96k
    char* get_data(size_t index) const {
444
4.96k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
4.96k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Line
Count
Source
443
11.5k
    char* get_data(size_t index) const {
444
11.5k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
11.5k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
Line
Count
Source
443
9.22k
    char* get_data(size_t index) const {
444
9.22k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.22k
    }
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