Coverage Report

Created: 2026-07-09 20:07

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
827k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
349k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
58.7k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
11.1k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
172k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
13.8k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
95
65.8k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
95
12.4k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
95
15.0k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
184
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
37.5k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
95
42.4k
    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.04k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
191
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
95
9.58k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
95
11.8k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
95
16.9k
    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
779
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
95
672
    Status init() override { return reset(); }
96
97
144M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
143M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
59.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
16.0k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
297k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
48.6k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
66.6k
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12is_page_fullEv
Line
Count
Source
97
12.1k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
97
16.9k
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12is_page_fullEv
Line
Count
Source
97
191
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
104k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
84.6k
    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
7.12k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
97
97
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
97
5.05k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
24.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
97
25.5k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Line
Count
Source
97
1.37k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Line
Count
Source
97
30.7k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
97
5.61k
    bool is_page_full() override { return _remain_element_capacity == 0; }
98
99
1.50M
    Status add(const uint8_t* vals, size_t* count) override {
100
1.50M
        return add_internal<false>(vals, count);
101
1.50M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
99
702k
    Status add(const uint8_t* vals, size_t* count) override {
100
702k
        return add_internal<false>(vals, count);
101
702k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
59.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
59.3k
        return add_internal<false>(vals, count);
101
59.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
16.0k
    Status add(const uint8_t* vals, size_t* count) override {
100
16.0k
        return add_internal<false>(vals, count);
101
16.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
297k
    Status add(const uint8_t* vals, size_t* count) override {
100
297k
        return add_internal<false>(vals, count);
101
297k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
48.6k
    Status add(const uint8_t* vals, size_t* count) override {
100
48.6k
        return add_internal<false>(vals, count);
101
48.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
66.6k
    Status add(const uint8_t* vals, size_t* count) override {
100
66.6k
        return add_internal<false>(vals, count);
101
66.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
99
12.1k
    Status add(const uint8_t* vals, size_t* count) override {
100
12.1k
        return add_internal<false>(vals, count);
101
12.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
99
16.9k
    Status add(const uint8_t* vals, size_t* count) override {
100
16.9k
        return add_internal<false>(vals, count);
101
16.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
191
    Status add(const uint8_t* vals, size_t* count) override {
100
191
        return add_internal<false>(vals, count);
101
191
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
104k
    Status add(const uint8_t* vals, size_t* count) override {
100
104k
        return add_internal<false>(vals, count);
101
104k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
84.6k
    Status add(const uint8_t* vals, size_t* count) override {
100
84.6k
        return add_internal<false>(vals, count);
101
84.6k
    }
_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
7.12k
    Status add(const uint8_t* vals, size_t* count) override {
100
7.12k
        return add_internal<false>(vals, count);
101
7.12k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
97
    Status add(const uint8_t* vals, size_t* count) override {
100
97
        return add_internal<false>(vals, count);
101
97
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
99
5.05k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.05k
        return add_internal<false>(vals, count);
101
5.05k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
24.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
24.3k
        return add_internal<false>(vals, count);
101
24.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
99
25.5k
    Status add(const uint8_t* vals, size_t* count) override {
100
25.5k
        return add_internal<false>(vals, count);
101
25.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Line
Count
Source
99
1.37k
    Status add(const uint8_t* vals, size_t* count) override {
100
1.37k
        return add_internal<false>(vals, count);
101
1.37k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Line
Count
Source
99
30.7k
    Status add(const uint8_t* vals, size_t* count) override {
100
30.7k
        return add_internal<false>(vals, count);
101
30.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
99
5.61k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.61k
        return add_internal<false>(vals, count);
101
5.61k
    }
102
103
142M
    Status single_add(const uint8_t* vals, size_t* count) {
104
142M
        return add_internal<true>(vals, count);
105
142M
    }
106
107
    template <bool single>
108
143M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
143M
        DCHECK(!_finished);
110
143M
        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
143M
        uint32_t to_add = cast_set<UInt32>(
126
143M
                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
143M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
143M
        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
143M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
143M
        _count += to_add;
134
143M
        _remain_element_capacity -= to_add;
135
143M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
143M
        *num_written = to_add;
138
143M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _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
142M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
142M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
142M
                        *reinterpret_cast<const uint32_t*>(vals);
149
142M
                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
142M
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
0
        memcpy(&_data[orig_size], vals, to_add_size);
158
143M
        return Status::OK();
159
143M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
702k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
702k
        DCHECK(!_finished);
110
702k
        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
702k
        uint32_t to_add = cast_set<UInt32>(
126
702k
                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
702k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
702k
        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
702k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
702k
        _count += to_add;
134
702k
        _remain_element_capacity -= to_add;
135
702k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
702k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
702k
        memcpy(&_data[orig_size], vals, to_add_size);
158
702k
        return Status::OK();
159
702k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
142M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
142M
        DCHECK(!_finished);
110
142M
        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
142M
        uint32_t to_add = cast_set<UInt32>(
126
142M
                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
142M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
142M
        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
142M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
142M
        _count += to_add;
134
142M
        _remain_element_capacity -= to_add;
135
142M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
142M
        *num_written = to_add;
138
142M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
142M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
142M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
142M
                        *reinterpret_cast<const uint32_t*>(vals);
149
142M
                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
142M
        }
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
142M
        return Status::OK();
159
142M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
59.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
59.3k
        DCHECK(!_finished);
110
59.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
59.3k
        uint32_t to_add = cast_set<UInt32>(
126
59.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
59.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
59.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
59.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
59.3k
        _count += to_add;
134
59.3k
        _remain_element_capacity -= to_add;
135
59.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
59.3k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
59.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
59.3k
        return Status::OK();
159
59.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
16.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
16.0k
        DCHECK(!_finished);
110
16.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
16.0k
        uint32_t to_add = cast_set<UInt32>(
126
16.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
16.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
16.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
16.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
16.0k
        _count += to_add;
134
16.0k
        _remain_element_capacity -= to_add;
135
16.0k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
16.0k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
16.0k
        memcpy(&_data[orig_size], vals, to_add_size);
158
16.0k
        return Status::OK();
159
16.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
297k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
297k
        DCHECK(!_finished);
110
297k
        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
297k
        uint32_t to_add = cast_set<UInt32>(
126
297k
                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
297k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
297k
        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
297k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
297k
        _count += to_add;
134
297k
        _remain_element_capacity -= to_add;
135
297k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
297k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
297k
        memcpy(&_data[orig_size], vals, to_add_size);
158
297k
        return Status::OK();
159
297k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
48.6k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
48.6k
        DCHECK(!_finished);
110
48.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
48.6k
        uint32_t to_add = cast_set<UInt32>(
126
48.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
48.6k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
48.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
48.6k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
48.6k
        _count += to_add;
134
48.6k
        _remain_element_capacity -= to_add;
135
48.6k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
48.6k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
48.6k
        memcpy(&_data[orig_size], vals, to_add_size);
158
48.6k
        return Status::OK();
159
48.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
66.6k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
66.6k
        DCHECK(!_finished);
110
66.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
66.6k
        uint32_t to_add = cast_set<UInt32>(
126
66.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
66.6k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
66.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
66.6k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
66.6k
        _count += to_add;
134
66.6k
        _remain_element_capacity -= to_add;
135
66.6k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
66.6k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
66.6k
        memcpy(&_data[orig_size], vals, to_add_size);
158
66.6k
        return Status::OK();
159
66.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
12.1k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
12.1k
        DCHECK(!_finished);
110
12.1k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
12.1k
        uint32_t to_add = cast_set<UInt32>(
126
12.1k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
12.1k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
12.1k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
12.1k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
12.1k
        _count += to_add;
134
12.1k
        _remain_element_capacity -= to_add;
135
12.1k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
12.1k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
12.1k
        memcpy(&_data[orig_size], vals, to_add_size);
158
12.1k
        return Status::OK();
159
12.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
16.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
16.9k
        DCHECK(!_finished);
110
16.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
16.9k
        uint32_t to_add = cast_set<UInt32>(
126
16.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
16.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
16.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
16.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
16.9k
        _count += to_add;
134
16.9k
        _remain_element_capacity -= to_add;
135
16.9k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
16.9k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
16.9k
        memcpy(&_data[orig_size], vals, to_add_size);
158
16.9k
        return Status::OK();
159
16.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
191
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
191
        DCHECK(!_finished);
110
191
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
191
        uint32_t to_add = cast_set<UInt32>(
126
191
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
191
        int to_add_size = to_add * SIZE_OF_TYPE;
129
191
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
191
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
191
        _count += to_add;
134
191
        _remain_element_capacity -= to_add;
135
191
        _raw_data_size += to_add_size;
136
        // return added number through count
137
191
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
191
        memcpy(&_data[orig_size], vals, to_add_size);
158
191
        return Status::OK();
159
191
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
104k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
104k
        DCHECK(!_finished);
110
104k
        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
104k
        uint32_t to_add = cast_set<UInt32>(
126
104k
                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
104k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
104k
        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
104k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
104k
        _count += to_add;
134
104k
        _remain_element_capacity -= to_add;
135
104k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
104k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
104k
        memcpy(&_data[orig_size], vals, to_add_size);
158
104k
        return Status::OK();
159
104k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
84.6k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
84.6k
        DCHECK(!_finished);
110
84.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
84.6k
        uint32_t to_add = cast_set<UInt32>(
126
84.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
84.6k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
84.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
84.6k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
84.6k
        _count += to_add;
134
84.6k
        _remain_element_capacity -= to_add;
135
84.6k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
84.6k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
84.6k
        memcpy(&_data[orig_size], vals, to_add_size);
158
84.6k
        return Status::OK();
159
84.6k
    }
_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
                _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
7.12k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
7.12k
        DCHECK(!_finished);
110
7.12k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
7.12k
        uint32_t to_add = cast_set<UInt32>(
126
7.12k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
7.12k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
7.12k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
7.12k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
7.12k
        _count += to_add;
134
7.12k
        _remain_element_capacity -= to_add;
135
7.12k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
7.12k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
7.12k
        memcpy(&_data[orig_size], vals, to_add_size);
158
7.12k
        return Status::OK();
159
7.12k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
97
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
97
        DCHECK(!_finished);
110
97
        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
97
        uint32_t to_add = cast_set<UInt32>(
126
97
                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
97
        int to_add_size = to_add * SIZE_OF_TYPE;
129
97
        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
97
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
97
        _count += to_add;
134
97
        _remain_element_capacity -= to_add;
135
97
        _raw_data_size += to_add_size;
136
        // return added number through count
137
97
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
97
        memcpy(&_data[orig_size], vals, to_add_size);
158
97
        return Status::OK();
159
97
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
5.05k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.05k
        DCHECK(!_finished);
110
5.05k
        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.05k
        uint32_t to_add = cast_set<UInt32>(
126
5.05k
                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.05k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.05k
        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.05k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.05k
        _count += to_add;
134
5.05k
        _remain_element_capacity -= to_add;
135
5.05k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.05k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
5.05k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.05k
        return Status::OK();
159
5.05k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
24.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
24.3k
        DCHECK(!_finished);
110
24.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
24.3k
        uint32_t to_add = cast_set<UInt32>(
126
24.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
24.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
24.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
24.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
24.3k
        _count += to_add;
134
24.3k
        _remain_element_capacity -= to_add;
135
24.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
24.3k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
24.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
24.3k
        return Status::OK();
159
24.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
25.5k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
25.5k
        DCHECK(!_finished);
110
25.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
25.5k
        uint32_t to_add = cast_set<UInt32>(
126
25.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
25.5k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
25.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
25.5k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
25.5k
        _count += to_add;
134
25.5k
        _remain_element_capacity -= to_add;
135
25.5k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
25.5k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
25.5k
        memcpy(&_data[orig_size], vals, to_add_size);
158
25.5k
        return Status::OK();
159
25.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
1.37k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
1.37k
        DCHECK(!_finished);
110
1.37k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
1.37k
        uint32_t to_add = cast_set<UInt32>(
126
1.37k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
1.37k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
1.37k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
1.37k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
1.37k
        _count += to_add;
134
1.37k
        _remain_element_capacity -= to_add;
135
1.37k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
1.37k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
1.37k
        memcpy(&_data[orig_size], vals, to_add_size);
158
1.37k
        return Status::OK();
159
1.37k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
30.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
30.7k
        DCHECK(!_finished);
110
30.7k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
30.7k
        uint32_t to_add = cast_set<UInt32>(
126
30.7k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
30.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
30.7k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
30.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
30.7k
        _count += to_add;
134
30.7k
        _remain_element_capacity -= to_add;
135
30.7k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
30.7k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
30.7k
        memcpy(&_data[orig_size], vals, to_add_size);
158
30.7k
        return Status::OK();
159
30.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
5.61k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.61k
        DCHECK(!_finished);
110
5.61k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
5.61k
        uint32_t to_add = cast_set<UInt32>(
126
5.61k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
5.61k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.61k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
5.61k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.61k
        _count += to_add;
134
5.61k
        _remain_element_capacity -= to_add;
135
5.61k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.61k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
5.61k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.61k
        return Status::OK();
159
5.61k
    }
160
161
823k
    Status finish(OwnedSlice* slice) override {
162
823k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
823k
        return Status::OK();
164
823k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
337k
    Status finish(OwnedSlice* slice) override {
162
337k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
337k
        return Status::OK();
164
337k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
58.0k
    Status finish(OwnedSlice* slice) override {
162
58.0k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
58.0k
        return Status::OK();
164
58.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
10.4k
    Status finish(OwnedSlice* slice) override {
162
10.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
10.4k
        return Status::OK();
164
10.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
176k
    Status finish(OwnedSlice* slice) override {
162
176k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
176k
        return Status::OK();
164
176k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
13.5k
    Status finish(OwnedSlice* slice) override {
162
13.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
13.5k
        return Status::OK();
164
13.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
65.8k
    Status finish(OwnedSlice* slice) override {
162
65.8k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
65.8k
        return Status::OK();
164
65.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
11.6k
    Status finish(OwnedSlice* slice) override {
162
11.6k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
11.6k
        return Status::OK();
164
11.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
14.8k
    Status finish(OwnedSlice* slice) override {
162
14.8k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
14.8k
        return Status::OK();
164
14.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
196
    Status finish(OwnedSlice* slice) override {
162
196
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
196
        return Status::OK();
164
196
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
38.1k
    Status finish(OwnedSlice* slice) override {
162
38.1k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
38.1k
        return Status::OK();
164
38.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
41.4k
    Status finish(OwnedSlice* slice) override {
162
41.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
41.4k
        return Status::OK();
164
41.4k
    }
_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.21k
    Status finish(OwnedSlice* slice) override {
162
7.21k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.21k
        return Status::OK();
164
7.21k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
105
    Status finish(OwnedSlice* slice) override {
162
105
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
105
        return Status::OK();
164
105
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
9.58k
    Status finish(OwnedSlice* slice) override {
162
9.58k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
9.58k
        return Status::OK();
164
9.58k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
18.5k
    Status finish(OwnedSlice* slice) override {
162
18.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
18.5k
        return Status::OK();
164
18.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
17.1k
    Status finish(OwnedSlice* slice) override {
162
17.1k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
17.1k
        return Status::OK();
164
17.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
1.06k
    Status finish(OwnedSlice* slice) override {
162
1.06k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
1.06k
        return Status::OK();
164
1.06k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
695
    Status finish(OwnedSlice* slice) override {
162
695
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
695
        return Status::OK();
164
695
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
597
    Status finish(OwnedSlice* slice) override {
162
597
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
597
        return Status::OK();
164
597
    }
165
166
1.93M
    Status reset() override {
167
1.93M
        RETURN_IF_CATCH_EXCEPTION({
168
1.93M
            size_t block_size = _options.data_page_size;
169
1.93M
            _count = 0;
170
1.93M
            _raw_data_size = 0;
171
1.93M
            _data.clear();
172
1.93M
            _data.reserve(block_size);
173
1.93M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.93M
                    << "buffer must be naturally-aligned";
175
1.93M
            _buffer.clear();
176
1.93M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.93M
            _finished = false;
178
1.93M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.93M
        });
180
1.94M
        return Status::OK();
181
1.93M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
166
973k
    Status reset() override {
167
973k
        RETURN_IF_CATCH_EXCEPTION({
168
973k
            size_t block_size = _options.data_page_size;
169
973k
            _count = 0;
170
973k
            _raw_data_size = 0;
171
973k
            _data.clear();
172
973k
            _data.reserve(block_size);
173
973k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
973k
                    << "buffer must be naturally-aligned";
175
973k
            _buffer.clear();
176
973k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
973k
            _finished = false;
178
973k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
973k
        });
180
976k
        return Status::OK();
181
973k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
116k
    Status reset() override {
167
116k
        RETURN_IF_CATCH_EXCEPTION({
168
116k
            size_t block_size = _options.data_page_size;
169
116k
            _count = 0;
170
116k
            _raw_data_size = 0;
171
116k
            _data.clear();
172
116k
            _data.reserve(block_size);
173
116k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
116k
                    << "buffer must be naturally-aligned";
175
116k
            _buffer.clear();
176
116k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
116k
            _finished = false;
178
116k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
116k
        });
180
116k
        return Status::OK();
181
116k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
166
21.5k
    Status reset() override {
167
21.5k
        RETURN_IF_CATCH_EXCEPTION({
168
21.5k
            size_t block_size = _options.data_page_size;
169
21.5k
            _count = 0;
170
21.5k
            _raw_data_size = 0;
171
21.5k
            _data.clear();
172
21.5k
            _data.reserve(block_size);
173
21.5k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
21.5k
                    << "buffer must be naturally-aligned";
175
21.5k
            _buffer.clear();
176
21.5k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
21.5k
            _finished = false;
178
21.5k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
21.5k
        });
180
21.6k
        return Status::OK();
181
21.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
348k
    Status reset() override {
167
348k
        RETURN_IF_CATCH_EXCEPTION({
168
348k
            size_t block_size = _options.data_page_size;
169
348k
            _count = 0;
170
348k
            _raw_data_size = 0;
171
348k
            _data.clear();
172
348k
            _data.reserve(block_size);
173
348k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
348k
                    << "buffer must be naturally-aligned";
175
348k
            _buffer.clear();
176
348k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
348k
            _finished = false;
178
348k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
348k
        });
180
349k
        return Status::OK();
181
348k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
166
27.3k
    Status reset() override {
167
27.3k
        RETURN_IF_CATCH_EXCEPTION({
168
27.3k
            size_t block_size = _options.data_page_size;
169
27.3k
            _count = 0;
170
27.3k
            _raw_data_size = 0;
171
27.3k
            _data.clear();
172
27.3k
            _data.reserve(block_size);
173
27.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
27.3k
                    << "buffer must be naturally-aligned";
175
27.3k
            _buffer.clear();
176
27.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
27.3k
            _finished = false;
178
27.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
27.3k
        });
180
27.3k
        return Status::OK();
181
27.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
166
131k
    Status reset() override {
167
131k
        RETURN_IF_CATCH_EXCEPTION({
168
131k
            size_t block_size = _options.data_page_size;
169
131k
            _count = 0;
170
131k
            _raw_data_size = 0;
171
131k
            _data.clear();
172
131k
            _data.reserve(block_size);
173
131k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
131k
                    << "buffer must be naturally-aligned";
175
131k
            _buffer.clear();
176
131k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
131k
            _finished = false;
178
131k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
131k
        });
180
131k
        return Status::OK();
181
131k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
166
24.0k
    Status reset() override {
167
24.0k
        RETURN_IF_CATCH_EXCEPTION({
168
24.0k
            size_t block_size = _options.data_page_size;
169
24.0k
            _count = 0;
170
24.0k
            _raw_data_size = 0;
171
24.0k
            _data.clear();
172
24.0k
            _data.reserve(block_size);
173
24.0k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
24.0k
                    << "buffer must be naturally-aligned";
175
24.0k
            _buffer.clear();
176
24.0k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
24.0k
            _finished = false;
178
24.0k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
24.0k
        });
180
24.0k
        return Status::OK();
181
24.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
166
29.8k
    Status reset() override {
167
29.8k
        RETURN_IF_CATCH_EXCEPTION({
168
29.8k
            size_t block_size = _options.data_page_size;
169
29.8k
            _count = 0;
170
29.8k
            _raw_data_size = 0;
171
29.8k
            _data.clear();
172
29.8k
            _data.reserve(block_size);
173
29.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
29.8k
                    << "buffer must be naturally-aligned";
175
29.8k
            _buffer.clear();
176
29.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
29.8k
            _finished = false;
178
29.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
29.8k
        });
180
29.8k
        return Status::OK();
181
29.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
166
380
    Status reset() override {
167
380
        RETURN_IF_CATCH_EXCEPTION({
168
380
            size_t block_size = _options.data_page_size;
169
380
            _count = 0;
170
380
            _raw_data_size = 0;
171
380
            _data.clear();
172
380
            _data.reserve(block_size);
173
380
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
380
                    << "buffer must be naturally-aligned";
175
380
            _buffer.clear();
176
380
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
380
            _finished = false;
178
380
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
380
        });
180
380
        return Status::OK();
181
380
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
166
75.6k
    Status reset() override {
167
75.6k
        RETURN_IF_CATCH_EXCEPTION({
168
75.6k
            size_t block_size = _options.data_page_size;
169
75.6k
            _count = 0;
170
75.6k
            _raw_data_size = 0;
171
75.6k
            _data.clear();
172
75.6k
            _data.reserve(block_size);
173
75.6k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
75.6k
                    << "buffer must be naturally-aligned";
175
75.6k
            _buffer.clear();
176
75.6k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
75.6k
            _finished = false;
178
75.6k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
75.6k
        });
180
75.7k
        return Status::OK();
181
75.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
166
83.8k
    Status reset() override {
167
83.8k
        RETURN_IF_CATCH_EXCEPTION({
168
83.8k
            size_t block_size = _options.data_page_size;
169
83.8k
            _count = 0;
170
83.8k
            _raw_data_size = 0;
171
83.8k
            _data.clear();
172
83.8k
            _data.reserve(block_size);
173
83.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
83.8k
                    << "buffer must be naturally-aligned";
175
83.8k
            _buffer.clear();
176
83.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
83.8k
            _finished = false;
178
83.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
83.8k
        });
180
83.9k
        return Status::OK();
181
83.8k
    }
_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.4k
        return Status::OK();
181
14.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
166
296
    Status reset() override {
167
296
        RETURN_IF_CATCH_EXCEPTION({
168
296
            size_t block_size = _options.data_page_size;
169
296
            _count = 0;
170
296
            _raw_data_size = 0;
171
296
            _data.clear();
172
296
            _data.reserve(block_size);
173
296
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
296
                    << "buffer must be naturally-aligned";
175
296
            _buffer.clear();
176
296
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
296
            _finished = false;
178
296
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
296
        });
180
296
        return Status::OK();
181
296
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
166
19.1k
    Status reset() override {
167
19.1k
        RETURN_IF_CATCH_EXCEPTION({
168
19.1k
            size_t block_size = _options.data_page_size;
169
19.1k
            _count = 0;
170
19.1k
            _raw_data_size = 0;
171
19.1k
            _data.clear();
172
19.1k
            _data.reserve(block_size);
173
19.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
19.1k
                    << "buffer must be naturally-aligned";
175
19.1k
            _buffer.clear();
176
19.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
19.1k
            _finished = false;
178
19.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
19.1k
        });
180
19.1k
        return Status::OK();
181
19.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
30.3k
    Status reset() override {
167
30.3k
        RETURN_IF_CATCH_EXCEPTION({
168
30.3k
            size_t block_size = _options.data_page_size;
169
30.3k
            _count = 0;
170
30.3k
            _raw_data_size = 0;
171
30.3k
            _data.clear();
172
30.3k
            _data.reserve(block_size);
173
30.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
30.3k
                    << "buffer must be naturally-aligned";
175
30.3k
            _buffer.clear();
176
30.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
30.3k
            _finished = false;
178
30.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
30.3k
        });
180
30.3k
        return Status::OK();
181
30.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
166
34.0k
    Status reset() override {
167
34.0k
        RETURN_IF_CATCH_EXCEPTION({
168
34.0k
            size_t block_size = _options.data_page_size;
169
34.0k
            _count = 0;
170
34.0k
            _raw_data_size = 0;
171
34.0k
            _data.clear();
172
34.0k
            _data.reserve(block_size);
173
34.0k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
34.0k
                    << "buffer must be naturally-aligned";
175
34.0k
            _buffer.clear();
176
34.0k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
34.0k
            _finished = false;
178
34.0k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
34.0k
        });
180
34.0k
        return Status::OK();
181
34.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Line
Count
Source
166
2.21k
    Status reset() override {
167
2.21k
        RETURN_IF_CATCH_EXCEPTION({
168
2.21k
            size_t block_size = _options.data_page_size;
169
2.21k
            _count = 0;
170
2.21k
            _raw_data_size = 0;
171
2.21k
            _data.clear();
172
2.21k
            _data.reserve(block_size);
173
2.21k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
2.21k
                    << "buffer must be naturally-aligned";
175
2.21k
            _buffer.clear();
176
2.21k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
2.21k
            _finished = false;
178
2.21k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
2.21k
        });
180
2.22k
        return Status::OK();
181
2.21k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Line
Count
Source
166
1.47k
    Status reset() override {
167
1.47k
        RETURN_IF_CATCH_EXCEPTION({
168
1.47k
            size_t block_size = _options.data_page_size;
169
1.47k
            _count = 0;
170
1.47k
            _raw_data_size = 0;
171
1.47k
            _data.clear();
172
1.47k
            _data.reserve(block_size);
173
1.47k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.47k
                    << "buffer must be naturally-aligned";
175
1.47k
            _buffer.clear();
176
1.47k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.47k
            _finished = false;
178
1.47k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.47k
        });
180
1.47k
        return Status::OK();
181
1.47k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
166
1.27k
    Status reset() override {
167
1.27k
        RETURN_IF_CATCH_EXCEPTION({
168
1.27k
            size_t block_size = _options.data_page_size;
169
1.27k
            _count = 0;
170
1.27k
            _raw_data_size = 0;
171
1.27k
            _data.clear();
172
1.27k
            _data.reserve(block_size);
173
1.27k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.27k
                    << "buffer must be naturally-aligned";
175
1.27k
            _buffer.clear();
176
1.27k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.27k
            _finished = false;
178
1.27k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.27k
        });
180
1.27k
        return Status::OK();
181
1.27k
    }
182
183
4
    size_t count() const override { return _count; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
183
4
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5countEv
184
185
33.3k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
17.9k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
185
2.78k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
185
804
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
2.70k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
1.41k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
803
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
763
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
185
774
    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.60k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
2.11k
    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
137
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
185
291
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
185
1.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
550k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
64.8k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
58.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
10.4k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
176k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
187
13.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
65.8k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
187
11.6k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
14.8k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE17get_raw_data_sizeEv
Line
Count
Source
187
196
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
187
38.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
187
41.4k
    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.21k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
187
105
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
187
9.58k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
18.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
187
17.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE17get_raw_data_sizeEv
Line
Count
Source
187
1.06k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Line
Count
Source
187
695
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
187
597
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
827k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
349k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
58.6k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
11.1k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
172k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
13.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
65.6k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
12.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
15.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
184
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
37.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
42.4k
            : _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.04k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
191
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.57k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
11.8k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
16.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1.15k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
779
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
673
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
192
193
823k
    OwnedSlice _finish(int final_size_of_type) {
194
823k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
823k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
823k
        int padding_elems = num_elems_after_padding - _count;
199
823k
        int padding_bytes = padding_elems * final_size_of_type;
200
25.4M
        for (int i = 0; i < padding_bytes; i++) {
201
24.6M
            _data.push_back(0);
202
24.6M
        }
203
204
        // reserve enough place for compression
205
823k
        _buffer.resize(
206
823k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
823k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
823k
        int64_t bytes =
210
823k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
823k
                                         num_elems_after_padding, final_size_of_type, 0);
212
823k
        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
823k
        encode_fixed32_le(&_buffer[0], _count);
222
823k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
823k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
823k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
823k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
823k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
823k
        return _buffer.build();
229
823k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
337k
    OwnedSlice _finish(int final_size_of_type) {
194
337k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
337k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
337k
        int padding_elems = num_elems_after_padding - _count;
199
337k
        int padding_bytes = padding_elems * final_size_of_type;
200
6.47M
        for (int i = 0; i < padding_bytes; i++) {
201
6.13M
            _data.push_back(0);
202
6.13M
        }
203
204
        // reserve enough place for compression
205
337k
        _buffer.resize(
206
337k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
337k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
337k
        int64_t bytes =
210
337k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
337k
                                         num_elems_after_padding, final_size_of_type, 0);
212
337k
        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
337k
        encode_fixed32_le(&_buffer[0], _count);
222
337k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
337k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
337k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
337k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
337k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
337k
        return _buffer.build();
229
337k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
58.0k
    OwnedSlice _finish(int final_size_of_type) {
194
58.0k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
58.0k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
58.0k
        int padding_elems = num_elems_after_padding - _count;
199
58.0k
        int padding_bytes = padding_elems * final_size_of_type;
200
376k
        for (int i = 0; i < padding_bytes; i++) {
201
318k
            _data.push_back(0);
202
318k
        }
203
204
        // reserve enough place for compression
205
58.0k
        _buffer.resize(
206
58.0k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
58.0k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
58.0k
        int64_t bytes =
210
58.0k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
58.0k
                                         num_elems_after_padding, final_size_of_type, 0);
212
58.0k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
58.0k
        encode_fixed32_le(&_buffer[0], _count);
222
58.0k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
58.0k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
58.0k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
58.0k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
58.0k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
58.0k
        return _buffer.build();
229
58.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
10.4k
    OwnedSlice _finish(int final_size_of_type) {
194
10.4k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
10.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
10.4k
        int padding_elems = num_elems_after_padding - _count;
199
10.4k
        int padding_bytes = padding_elems * final_size_of_type;
200
104k
        for (int i = 0; i < padding_bytes; i++) {
201
94.4k
            _data.push_back(0);
202
94.4k
        }
203
204
        // reserve enough place for compression
205
10.4k
        _buffer.resize(
206
10.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
10.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
10.4k
        int64_t bytes =
210
10.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
10.4k
                                         num_elems_after_padding, final_size_of_type, 0);
212
10.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
10.4k
        encode_fixed32_le(&_buffer[0], _count);
222
10.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
10.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
10.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
10.4k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
10.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
10.4k
        return _buffer.build();
229
10.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
176k
    OwnedSlice _finish(int final_size_of_type) {
194
176k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
176k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
176k
        int padding_elems = num_elems_after_padding - _count;
199
176k
        int padding_bytes = padding_elems * final_size_of_type;
200
8.69M
        for (int i = 0; i < padding_bytes; i++) {
201
8.51M
            _data.push_back(0);
202
8.51M
        }
203
204
        // reserve enough place for compression
205
176k
        _buffer.resize(
206
176k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
176k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
176k
        int64_t bytes =
210
176k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
176k
                                         num_elems_after_padding, final_size_of_type, 0);
212
176k
        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
176k
        encode_fixed32_le(&_buffer[0], _count);
222
176k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
176k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
176k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
176k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
176k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
176k
        return _buffer.build();
229
176k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
13.5k
    OwnedSlice _finish(int final_size_of_type) {
194
13.5k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
13.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
13.5k
        int padding_elems = num_elems_after_padding - _count;
199
13.5k
        int padding_bytes = padding_elems * final_size_of_type;
200
855k
        for (int i = 0; i < padding_bytes; i++) {
201
841k
            _data.push_back(0);
202
841k
        }
203
204
        // reserve enough place for compression
205
13.5k
        _buffer.resize(
206
13.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
13.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
13.5k
        int64_t bytes =
210
13.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
13.5k
                                         num_elems_after_padding, final_size_of_type, 0);
212
13.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
13.5k
        encode_fixed32_le(&_buffer[0], _count);
222
13.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
13.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
13.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
13.5k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
13.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
13.5k
        return _buffer.build();
229
13.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
65.8k
    OwnedSlice _finish(int final_size_of_type) {
194
65.8k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
65.8k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
65.8k
        int padding_elems = num_elems_after_padding - _count;
199
65.8k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.17M
        for (int i = 0; i < padding_bytes; i++) {
201
3.10M
            _data.push_back(0);
202
3.10M
        }
203
204
        // reserve enough place for compression
205
65.8k
        _buffer.resize(
206
65.8k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
65.8k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
65.8k
        int64_t bytes =
210
65.8k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
65.8k
                                         num_elems_after_padding, final_size_of_type, 0);
212
65.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
65.8k
        encode_fixed32_le(&_buffer[0], _count);
222
65.8k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
65.8k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
65.8k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
65.8k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
65.8k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
65.8k
        return _buffer.build();
229
65.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
11.6k
    OwnedSlice _finish(int final_size_of_type) {
194
11.6k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
11.6k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
11.6k
        int padding_elems = num_elems_after_padding - _count;
199
11.6k
        int padding_bytes = padding_elems * final_size_of_type;
200
247k
        for (int i = 0; i < padding_bytes; i++) {
201
236k
            _data.push_back(0);
202
236k
        }
203
204
        // reserve enough place for compression
205
11.6k
        _buffer.resize(
206
11.6k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
11.6k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
11.6k
        int64_t bytes =
210
11.6k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
11.6k
                                         num_elems_after_padding, final_size_of_type, 0);
212
11.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
11.6k
        encode_fixed32_le(&_buffer[0], _count);
222
11.6k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
11.6k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
11.6k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
11.6k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
11.6k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
11.6k
        return _buffer.build();
229
11.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
14.8k
    OwnedSlice _finish(int final_size_of_type) {
194
14.8k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
14.8k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
14.8k
        int padding_elems = num_elems_after_padding - _count;
199
14.8k
        int padding_bytes = padding_elems * final_size_of_type;
200
608k
        for (int i = 0; i < padding_bytes; i++) {
201
593k
            _data.push_back(0);
202
593k
        }
203
204
        // reserve enough place for compression
205
14.8k
        _buffer.resize(
206
14.8k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
14.8k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
14.8k
        int64_t bytes =
210
14.8k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
14.8k
                                         num_elems_after_padding, final_size_of_type, 0);
212
14.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
14.8k
        encode_fixed32_le(&_buffer[0], _count);
222
14.8k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
14.8k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
14.8k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
14.8k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
14.8k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
14.8k
        return _buffer.build();
229
14.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
196
    OwnedSlice _finish(int final_size_of_type) {
194
196
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
196
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
196
        int padding_elems = num_elems_after_padding - _count;
199
196
        int padding_bytes = padding_elems * final_size_of_type;
200
2.68k
        for (int i = 0; i < padding_bytes; i++) {
201
2.49k
            _data.push_back(0);
202
2.49k
        }
203
204
        // reserve enough place for compression
205
196
        _buffer.resize(
206
196
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
196
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
196
        int64_t bytes =
210
196
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
196
                                         num_elems_after_padding, final_size_of_type, 0);
212
196
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
196
        encode_fixed32_le(&_buffer[0], _count);
222
196
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
196
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
196
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
196
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
196
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
196
        return _buffer.build();
229
196
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
193
38.1k
    OwnedSlice _finish(int final_size_of_type) {
194
38.1k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
38.1k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
38.1k
        int padding_elems = num_elems_after_padding - _count;
199
38.1k
        int padding_bytes = padding_elems * final_size_of_type;
200
808k
        for (int i = 0; i < padding_bytes; i++) {
201
770k
            _data.push_back(0);
202
770k
        }
203
204
        // reserve enough place for compression
205
38.1k
        _buffer.resize(
206
38.1k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
38.1k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
38.1k
        int64_t bytes =
210
38.1k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
38.1k
                                         num_elems_after_padding, final_size_of_type, 0);
212
38.1k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
38.1k
        encode_fixed32_le(&_buffer[0], _count);
222
38.1k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
38.1k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
38.1k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
38.1k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
38.1k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
38.1k
        return _buffer.build();
229
38.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
193
41.4k
    OwnedSlice _finish(int final_size_of_type) {
194
41.4k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
41.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
41.4k
        int padding_elems = num_elems_after_padding - _count;
199
41.4k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.72M
        for (int i = 0; i < padding_bytes; i++) {
201
1.68M
            _data.push_back(0);
202
1.68M
        }
203
204
        // reserve enough place for compression
205
41.4k
        _buffer.resize(
206
41.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
41.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
41.4k
        int64_t bytes =
210
41.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
41.4k
                                         num_elems_after_padding, final_size_of_type, 0);
212
41.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
41.4k
        encode_fixed32_le(&_buffer[0], _count);
222
41.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
41.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
41.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
41.4k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
41.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
41.4k
        return _buffer.build();
229
41.4k
    }
_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
6.98k
        for (int i = 0; i < padding_bytes; i++) {
201
6.54k
            _data.push_back(0);
202
6.54k
        }
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.21k
    OwnedSlice _finish(int final_size_of_type) {
194
7.21k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.21k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.21k
        int padding_elems = num_elems_after_padding - _count;
199
7.21k
        int padding_bytes = padding_elems * final_size_of_type;
200
377k
        for (int i = 0; i < padding_bytes; i++) {
201
370k
            _data.push_back(0);
202
370k
        }
203
204
        // reserve enough place for compression
205
7.21k
        _buffer.resize(
206
7.21k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.21k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.21k
        int64_t bytes =
210
7.21k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.21k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.21k
        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.21k
        encode_fixed32_le(&_buffer[0], _count);
222
7.21k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.21k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.21k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.21k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.21k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.21k
        return _buffer.build();
229
7.21k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
193
105
    OwnedSlice _finish(int final_size_of_type) {
194
105
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
105
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
105
        int padding_elems = num_elems_after_padding - _count;
199
105
        int padding_bytes = padding_elems * final_size_of_type;
200
6.54k
        for (int i = 0; i < padding_bytes; i++) {
201
6.44k
            _data.push_back(0);
202
6.44k
        }
203
204
        // reserve enough place for compression
205
105
        _buffer.resize(
206
105
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
105
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
105
        int64_t bytes =
210
105
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
105
                                         num_elems_after_padding, final_size_of_type, 0);
212
105
        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
105
        encode_fixed32_le(&_buffer[0], _count);
222
105
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
105
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
105
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
105
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
105
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
105
        return _buffer.build();
229
105
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
193
9.58k
    OwnedSlice _finish(int final_size_of_type) {
194
9.58k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
9.58k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
9.58k
        int padding_elems = num_elems_after_padding - _count;
199
9.58k
        int padding_bytes = padding_elems * final_size_of_type;
200
114k
        for (int i = 0; i < padding_bytes; i++) {
201
105k
            _data.push_back(0);
202
105k
        }
203
204
        // reserve enough place for compression
205
9.58k
        _buffer.resize(
206
9.58k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
9.58k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
9.58k
        int64_t bytes =
210
9.58k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
9.58k
                                         num_elems_after_padding, final_size_of_type, 0);
212
9.58k
        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.58k
        encode_fixed32_le(&_buffer[0], _count);
222
9.58k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
9.58k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
9.58k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
9.58k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
9.58k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
9.58k
        return _buffer.build();
229
9.58k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
18.5k
    OwnedSlice _finish(int final_size_of_type) {
194
18.5k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
18.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
18.5k
        int padding_elems = num_elems_after_padding - _count;
199
18.5k
        int padding_bytes = padding_elems * final_size_of_type;
200
479k
        for (int i = 0; i < padding_bytes; i++) {
201
460k
            _data.push_back(0);
202
460k
        }
203
204
        // reserve enough place for compression
205
18.5k
        _buffer.resize(
206
18.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
18.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
18.5k
        int64_t bytes =
210
18.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
18.5k
                                         num_elems_after_padding, final_size_of_type, 0);
212
18.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
18.5k
        encode_fixed32_le(&_buffer[0], _count);
222
18.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
18.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
18.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
18.5k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
18.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
18.5k
        return _buffer.build();
229
18.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
193
17.1k
    OwnedSlice _finish(int final_size_of_type) {
194
17.1k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
17.1k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
17.1k
        int padding_elems = num_elems_after_padding - _count;
199
17.1k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.14M
        for (int i = 0; i < padding_bytes; i++) {
201
1.12M
            _data.push_back(0);
202
1.12M
        }
203
204
        // reserve enough place for compression
205
17.1k
        _buffer.resize(
206
17.1k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
17.1k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
17.1k
        int64_t bytes =
210
17.1k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
17.1k
                                         num_elems_after_padding, final_size_of_type, 0);
212
17.1k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
17.1k
        encode_fixed32_le(&_buffer[0], _count);
222
17.1k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
17.1k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
17.1k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
17.1k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
17.1k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
17.1k
        return _buffer.build();
229
17.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE7_finishEi
Line
Count
Source
193
1.06k
    OwnedSlice _finish(int final_size_of_type) {
194
1.06k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
1.06k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
1.06k
        int padding_elems = num_elems_after_padding - _count;
199
1.06k
        int padding_bytes = padding_elems * final_size_of_type;
200
162k
        for (int i = 0; i < padding_bytes; i++) {
201
161k
            _data.push_back(0);
202
161k
        }
203
204
        // reserve enough place for compression
205
1.06k
        _buffer.resize(
206
1.06k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
1.06k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
1.06k
        int64_t bytes =
210
1.06k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
1.06k
                                         num_elems_after_padding, final_size_of_type, 0);
212
1.06k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
1.06k
        encode_fixed32_le(&_buffer[0], _count);
222
1.06k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
1.06k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
1.06k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
1.06k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
1.06k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
1.06k
        return _buffer.build();
229
1.06k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Line
Count
Source
193
695
    OwnedSlice _finish(int final_size_of_type) {
194
695
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
695
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
695
        int padding_elems = num_elems_after_padding - _count;
199
695
        int padding_bytes = padding_elems * final_size_of_type;
200
14.5k
        for (int i = 0; i < padding_bytes; i++) {
201
13.8k
            _data.push_back(0);
202
13.8k
        }
203
204
        // reserve enough place for compression
205
695
        _buffer.resize(
206
695
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
695
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
695
        int64_t bytes =
210
695
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
695
                                         num_elems_after_padding, final_size_of_type, 0);
212
695
        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
695
        encode_fixed32_le(&_buffer[0], _count);
222
695
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
695
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
695
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
695
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
695
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
695
        return _buffer.build();
229
695
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
193
597
    OwnedSlice _finish(int final_size_of_type) {
194
597
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
597
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
597
        int padding_elems = num_elems_after_padding - _count;
199
597
        int padding_bytes = padding_elems * final_size_of_type;
200
47.0k
        for (int i = 0; i < padding_bytes; i++) {
201
46.4k
            _data.push_back(0);
202
46.4k
        }
203
204
        // reserve enough place for compression
205
597
        _buffer.resize(
206
597
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
597
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
597
        int64_t bytes =
210
597
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
597
                                         num_elems_after_padding, final_size_of_type, 0);
212
597
        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
597
        encode_fixed32_le(&_buffer[0], _count);
222
597
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
597
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
597
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
597
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
597
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
597
        return _buffer.build();
229
597
    }
230
231
    using CppType = typename TypeTraits<Type>::CppType;
232
233
    CppType cell(int idx) const {
234
        DCHECK_GE(idx, 0);
235
        CppType ret;
236
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
237
        return ret;
238
    }
239
240
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
241
    PageBuilderOptions _options;
242
    uint32_t _count;
243
    uint32_t _remain_element_capacity;
244
    bool _finished;
245
    faststring _data;
246
    faststring _buffer;
247
    uint64_t _raw_data_size = 0;
248
};
249
250
inline Status parse_bit_shuffle_header(const Slice& data, size_t& num_elements,
251
                                       size_t& compressed_size, size_t& num_element_after_padding,
252
2.25M
                                       int& size_of_element) {
253
2.25M
    if (data.size < BITSHUFFLE_PAGE_HEADER_SIZE) {
254
0
        return Status::InternalError("file corruption: invalid data size:{}, header size:{}",
255
0
                                     data.size, BITSHUFFLE_PAGE_HEADER_SIZE);
256
0
    }
257
258
2.25M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
2.25M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
2.25M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
2.25M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
2.25M
    if (num_element_after_padding != ALIGN_UP(num_elements, 8)) {
263
0
        return Status::InternalError(
264
0
                "num of element information corrupted,"
265
0
                " _num_element_after_padding:{}, _num_elements:{}, expected_padding:{},"
266
0
                " compressed_size:{}, size_of_element:{}, data_size:{}",
267
0
                num_element_after_padding, num_elements, ALIGN_UP(num_elements, 8), compressed_size,
268
0
                size_of_element, data.size);
269
0
    }
270
2.25M
    switch (size_of_element) {
271
203k
    case 1:
272
245k
    case 2:
273
249k
    case 3:
274
1.44M
    case 4:
275
2.14M
    case 8:
276
2.14M
    case 12:
277
2.24M
    case 16:
278
2.25M
    case 32:
279
2.25M
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
2.25M
    }
283
2.25M
    return Status::OK();
284
2.25M
}
285
286
template <FieldType Type>
287
class BitShufflePageDecoder : public PageDecoder {
288
public:
289
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
290
1.12M
            : _data(data),
291
1.12M
              _options(options),
292
1.12M
              _parsed(false),
293
1.12M
              _num_elements(0),
294
1.12M
              _num_element_after_padding(0),
295
1.12M
              _size_of_element(0),
296
1.12M
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
502k
            : _data(data),
291
502k
              _options(options),
292
502k
              _parsed(false),
293
502k
              _num_elements(0),
294
502k
              _num_element_after_padding(0),
295
502k
              _size_of_element(0),
296
502k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
101k
            : _data(data),
291
101k
              _options(options),
292
101k
              _parsed(false),
293
101k
              _num_elements(0),
294
101k
              _num_element_after_padding(0),
295
101k
              _size_of_element(0),
296
101k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
21.4k
            : _data(data),
291
21.4k
              _options(options),
292
21.4k
              _parsed(false),
293
21.4k
              _num_elements(0),
294
21.4k
              _num_element_after_padding(0),
295
21.4k
              _size_of_element(0),
296
21.4k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
109k
            : _data(data),
291
109k
              _options(options),
292
109k
              _parsed(false),
293
109k
              _num_elements(0),
294
109k
              _num_element_after_padding(0),
295
109k
              _size_of_element(0),
296
109k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
19.8k
            : _data(data),
291
19.8k
              _options(options),
292
19.8k
              _parsed(false),
293
19.8k
              _num_elements(0),
294
19.8k
              _num_element_after_padding(0),
295
19.8k
              _size_of_element(0),
296
19.8k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
90.8k
            : _data(data),
291
90.8k
              _options(options),
292
90.8k
              _parsed(false),
293
90.8k
              _num_elements(0),
294
90.8k
              _num_element_after_padding(0),
295
90.8k
              _size_of_element(0),
296
90.8k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
19.5k
            : _data(data),
291
19.5k
              _options(options),
292
19.5k
              _parsed(false),
293
19.5k
              _num_elements(0),
294
19.5k
              _num_element_after_padding(0),
295
19.5k
              _size_of_element(0),
296
19.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
27.9k
            : _data(data),
291
27.9k
              _options(options),
292
27.9k
              _parsed(false),
293
27.9k
              _num_elements(0),
294
27.9k
              _num_element_after_padding(0),
295
27.9k
              _size_of_element(0),
296
27.9k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.67k
            : _data(data),
291
1.67k
              _options(options),
292
1.67k
              _parsed(false),
293
1.67k
              _num_elements(0),
294
1.67k
              _num_element_after_padding(0),
295
1.67k
              _size_of_element(0),
296
1.67k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
58.7k
            : _data(data),
291
58.7k
              _options(options),
292
58.7k
              _parsed(false),
293
58.7k
              _num_elements(0),
294
58.7k
              _num_element_after_padding(0),
295
58.7k
              _size_of_element(0),
296
58.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
65.2k
            : _data(data),
291
65.2k
              _options(options),
292
65.2k
              _parsed(false),
293
65.2k
              _num_elements(0),
294
65.2k
              _num_element_after_padding(0),
295
65.2k
              _size_of_element(0),
296
65.2k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
2.49k
            : _data(data),
291
2.49k
              _options(options),
292
2.49k
              _parsed(false),
293
2.49k
              _num_elements(0),
294
2.49k
              _num_element_after_padding(0),
295
2.49k
              _size_of_element(0),
296
2.49k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_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_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.34k
            : _data(data),
291
1.34k
              _options(options),
292
1.34k
              _parsed(false),
293
1.34k
              _num_elements(0),
294
1.34k
              _num_element_after_padding(0),
295
1.34k
              _size_of_element(0),
296
1.34k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
15.0k
            : _data(data),
291
15.0k
              _options(options),
292
15.0k
              _parsed(false),
293
15.0k
              _num_elements(0),
294
15.0k
              _num_element_after_padding(0),
295
15.0k
              _size_of_element(0),
296
15.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
39.5k
            : _data(data),
291
39.5k
              _options(options),
292
39.5k
              _parsed(false),
293
39.5k
              _num_elements(0),
294
39.5k
              _num_element_after_padding(0),
295
39.5k
              _size_of_element(0),
296
39.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
30.1k
            : _data(data),
291
30.1k
              _options(options),
292
30.1k
              _parsed(false),
293
30.1k
              _num_elements(0),
294
30.1k
              _num_element_after_padding(0),
295
30.1k
              _size_of_element(0),
296
30.1k
              _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.18k
            : _data(data),
291
1.18k
              _options(options),
292
1.18k
              _parsed(false),
293
1.18k
              _num_elements(0),
294
1.18k
              _num_element_after_padding(0),
295
1.18k
              _size_of_element(0),
296
1.18k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.09k
            : _data(data),
291
1.09k
              _options(options),
292
1.09k
              _parsed(false),
293
1.09k
              _num_elements(0),
294
1.09k
              _num_element_after_padding(0),
295
1.09k
              _size_of_element(0),
296
1.09k
              _cur_index(0) {}
297
298
1.12M
    Status init() override {
299
1.12M
        CHECK(!_parsed);
300
1.12M
        size_t unused;
301
1.12M
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.12M
                                                 _num_element_after_padding, _size_of_element));
303
304
1.12M
        if (_data.size !=
305
1.12M
            _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.12M
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.12M
                     _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.12M
        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.12M
        _parsed = true;
325
1.12M
        return Status::OK();
326
1.12M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
298
502k
    Status init() override {
299
502k
        CHECK(!_parsed);
300
502k
        size_t unused;
301
502k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
502k
                                                 _num_element_after_padding, _size_of_element));
303
304
502k
        if (_data.size !=
305
502k
            _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
502k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
502k
                     _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
502k
        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
502k
        _parsed = true;
325
502k
        return Status::OK();
326
502k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
101k
    Status init() override {
299
101k
        CHECK(!_parsed);
300
101k
        size_t unused;
301
101k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
101k
                                                 _num_element_after_padding, _size_of_element));
303
304
101k
        if (_data.size !=
305
101k
            _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
101k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
101k
                     _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
101k
        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
101k
        _parsed = true;
325
101k
        return Status::OK();
326
101k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
21.4k
    Status init() override {
299
21.4k
        CHECK(!_parsed);
300
21.4k
        size_t unused;
301
21.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
21.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
21.4k
        if (_data.size !=
305
21.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
21.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
21.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
21.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
21.4k
        _parsed = true;
325
21.4k
        return Status::OK();
326
21.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
109k
    Status init() override {
299
109k
        CHECK(!_parsed);
300
109k
        size_t unused;
301
109k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
109k
                                                 _num_element_after_padding, _size_of_element));
303
304
109k
        if (_data.size !=
305
109k
            _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
109k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
109k
                     _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
109k
        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
109k
        _parsed = true;
325
109k
        return Status::OK();
326
109k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
298
19.8k
    Status init() override {
299
19.8k
        CHECK(!_parsed);
300
19.8k
        size_t unused;
301
19.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
19.8k
                                                 _num_element_after_padding, _size_of_element));
303
304
19.8k
        if (_data.size !=
305
19.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
19.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
19.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
19.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
19.8k
        _parsed = true;
325
19.8k
        return Status::OK();
326
19.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
298
90.8k
    Status init() override {
299
90.8k
        CHECK(!_parsed);
300
90.8k
        size_t unused;
301
90.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
90.8k
                                                 _num_element_after_padding, _size_of_element));
303
304
90.8k
        if (_data.size !=
305
90.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
90.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
90.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
90.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
90.8k
        _parsed = true;
325
90.8k
        return Status::OK();
326
90.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
298
19.5k
    Status init() override {
299
19.5k
        CHECK(!_parsed);
300
19.5k
        size_t unused;
301
19.5k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
19.5k
                                                 _num_element_after_padding, _size_of_element));
303
304
19.5k
        if (_data.size !=
305
19.5k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
19.5k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
19.5k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
19.5k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
19.5k
        _parsed = true;
325
19.5k
        return Status::OK();
326
19.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
298
27.9k
    Status init() override {
299
27.9k
        CHECK(!_parsed);
300
27.9k
        size_t unused;
301
27.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
27.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
27.9k
        if (_data.size !=
305
27.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
27.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
27.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
27.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
27.9k
        _parsed = true;
325
27.9k
        return Status::OK();
326
27.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
1.67k
    Status init() override {
299
1.67k
        CHECK(!_parsed);
300
1.67k
        size_t unused;
301
1.67k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.67k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.67k
        if (_data.size !=
305
1.67k
            _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.67k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.67k
                     _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.67k
        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.67k
        _parsed = true;
325
1.67k
        return Status::OK();
326
1.67k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
58.7k
    Status init() override {
299
58.7k
        CHECK(!_parsed);
300
58.7k
        size_t unused;
301
58.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
58.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
58.7k
        if (_data.size !=
305
58.7k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
58.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
58.7k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
58.7k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
58.7k
        _parsed = true;
325
58.7k
        return Status::OK();
326
58.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
298
65.1k
    Status init() override {
299
65.1k
        CHECK(!_parsed);
300
65.1k
        size_t unused;
301
65.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
65.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
65.1k
        if (_data.size !=
305
65.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
65.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
65.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
65.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
65.1k
        _parsed = true;
325
65.1k
        return Status::OK();
326
65.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
298
2.49k
    Status init() override {
299
2.49k
        CHECK(!_parsed);
300
2.49k
        size_t unused;
301
2.49k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
2.49k
                                                 _num_element_after_padding, _size_of_element));
303
304
2.49k
        if (_data.size !=
305
2.49k
            _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.49k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
2.49k
                     _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.49k
        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.49k
        _parsed = true;
325
2.49k
        return Status::OK();
326
2.49k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
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_9FieldTypeE16EE4initEv
Line
Count
Source
298
1.33k
    Status init() override {
299
1.33k
        CHECK(!_parsed);
300
1.33k
        size_t unused;
301
1.33k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.33k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.33k
        if (_data.size !=
305
1.33k
            _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.33k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.33k
                     _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.33k
        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.33k
        _parsed = true;
325
1.33k
        return Status::OK();
326
1.33k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
298
15.0k
    Status init() override {
299
15.0k
        CHECK(!_parsed);
300
15.0k
        size_t unused;
301
15.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
15.0k
                                                 _num_element_after_padding, _size_of_element));
303
304
15.0k
        if (_data.size !=
305
15.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
15.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
15.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
15.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
15.0k
        _parsed = true;
325
15.0k
        return Status::OK();
326
15.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
298
39.5k
    Status init() override {
299
39.5k
        CHECK(!_parsed);
300
39.5k
        size_t unused;
301
39.5k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
39.5k
                                                 _num_element_after_padding, _size_of_element));
303
304
39.5k
        if (_data.size !=
305
39.5k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
39.5k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
39.5k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
39.5k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
39.5k
        _parsed = true;
325
39.5k
        return Status::OK();
326
39.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
298
30.1k
    Status init() override {
299
30.1k
        CHECK(!_parsed);
300
30.1k
        size_t unused;
301
30.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
30.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
30.1k
        if (_data.size !=
305
30.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
30.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
30.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
30.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
30.1k
        _parsed = true;
325
30.1k
        return Status::OK();
326
30.1k
    }
_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.17k
    Status init() override {
299
1.17k
        CHECK(!_parsed);
300
1.17k
        size_t unused;
301
1.17k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.17k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.17k
        if (_data.size !=
305
1.17k
            _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.17k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.17k
                     _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.17k
        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.17k
        _parsed = true;
325
1.17k
        return Status::OK();
326
1.17k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
298
1.09k
    Status init() override {
299
1.09k
        CHECK(!_parsed);
300
1.09k
        size_t unused;
301
1.09k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.09k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.09k
        if (_data.size !=
305
1.09k
            _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.09k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.09k
                     _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.09k
        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.09k
        _parsed = true;
325
1.09k
        return Status::OK();
326
1.09k
    }
327
328
    // If the page only contains null, then _num_elements == 0, and the nullmap has
329
    // some value. But in _seek_columns --> seek_to_ordinal --> _seek_to_pos_in_page
330
    // in this call stack it will pass pos == 0 to this method. Although we can add some
331
    // code such as check if the count == 0, then skip seek, but there are other method such
332
    // as init will also call seek with pos == 0. And the seek is useless when _num_elements
333
    // == 0, because next batch will return empty in this method.
334
4.59M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
4.59M
        if (_num_elements == 0) [[unlikely]] {
337
4.14k
            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.14k
        }
342
343
4.59M
        DCHECK_LE(pos, _num_elements);
344
4.59M
        _cur_index = pos;
345
4.59M
        return Status::OK();
346
4.59M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
2.13M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
2.13M
        if (_num_elements == 0) [[unlikely]] {
337
2.57k
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
2.57k
        }
342
343
2.13M
        DCHECK_LE(pos, _num_elements);
344
2.13M
        _cur_index = pos;
345
2.13M
        return Status::OK();
346
2.13M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
303k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
303k
        if (_num_elements == 0) [[unlikely]] {
337
446
            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
446
        }
342
343
303k
        DCHECK_LE(pos, _num_elements);
344
303k
        _cur_index = pos;
345
303k
        return Status::OK();
346
303k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
225k
    Status seek_to_position_in_page(size_t pos) override {
335
225k
        DCHECK(_parsed) << "Must call init()";
336
225k
        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
225k
        DCHECK_LE(pos, _num_elements);
344
225k
        _cur_index = pos;
345
225k
        return Status::OK();
346
225k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
229k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
229k
        if (_num_elements == 0) [[unlikely]] {
337
477
            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
477
        }
342
343
229k
        DCHECK_LE(pos, _num_elements);
344
229k
        _cur_index = pos;
345
229k
        return Status::OK();
346
229k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
334
116k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
116k
        if (_num_elements == 0) [[unlikely]] {
337
6
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
6
        }
342
343
116k
        DCHECK_LE(pos, _num_elements);
344
116k
        _cur_index = pos;
345
116k
        return Status::OK();
346
116k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_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
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
230k
    Status seek_to_position_in_page(size_t pos) override {
335
230k
        DCHECK(_parsed) << "Must call init()";
336
230k
        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
230k
        DCHECK_LE(pos, _num_elements);
344
230k
        _cur_index = pos;
345
230k
        return Status::OK();
346
230k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
334
206k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
206k
        if (_num_elements == 0) [[unlikely]] {
337
5
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
5
        }
342
343
206k
        DCHECK_LE(pos, _num_elements);
344
206k
        _cur_index = pos;
345
206k
        return Status::OK();
346
206k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
334
218k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
218k
        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
218k
        DCHECK_LE(pos, _num_elements);
344
218k
        _cur_index = pos;
345
218k
        return Status::OK();
346
218k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
334
502k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
502k
        if (_num_elements == 0) [[unlikely]] {
337
197
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
197
        }
342
343
502k
        DCHECK_LE(pos, _num_elements);
344
502k
        _cur_index = pos;
345
502k
        return Status::OK();
346
502k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
334
64.1k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
64.1k
        if (_num_elements == 0) [[unlikely]] {
337
14
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
14
        }
342
343
64.1k
        DCHECK_LE(pos, _num_elements);
344
64.1k
        _cur_index = pos;
345
64.1k
        return Status::OK();
346
64.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
204k
    Status seek_to_position_in_page(size_t pos) override {
335
204k
        DCHECK(_parsed) << "Must call init()";
336
204k
        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
204k
        DCHECK_LE(pos, _num_elements);
344
204k
        _cur_index = pos;
345
204k
        return Status::OK();
346
204k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
334
6.57k
    Status seek_to_position_in_page(size_t pos) override {
335
6.57k
        DCHECK(_parsed) << "Must call init()";
336
6.57k
        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.57k
        DCHECK_LE(pos, _num_elements);
344
6.57k
        _cur_index = pos;
345
6.57k
        return Status::OK();
346
6.57k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
Line
Count
Source
334
32
    Status seek_to_position_in_page(size_t pos) override {
335
32
        DCHECK(_parsed) << "Must call init()";
336
32
        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
32
        DCHECK_LE(pos, _num_elements);
344
32
        _cur_index = pos;
345
32
        return Status::OK();
346
32
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Line
Count
Source
334
867
    Status seek_to_position_in_page(size_t pos) override {
335
867
        DCHECK(_parsed) << "Must call init()";
336
867
        if (_num_elements == 0) [[unlikely]] {
337
25
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
25
        }
342
343
867
        DCHECK_LE(pos, _num_elements);
344
867
        _cur_index = pos;
345
867
        return Status::OK();
346
867
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
334
15.5k
    Status seek_to_position_in_page(size_t pos) override {
335
15.5k
        DCHECK(_parsed) << "Must call init()";
336
15.5k
        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
15.5k
        DCHECK_LE(pos, _num_elements);
344
15.5k
        _cur_index = pos;
345
15.5k
        return Status::OK();
346
15.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Line
Count
Source
334
115k
    Status seek_to_position_in_page(size_t pos) override {
335
115k
        DCHECK(_parsed) << "Must call init()";
336
115k
        if (_num_elements == 0) [[unlikely]] {
337
10
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
10
        }
342
343
115k
        DCHECK_LE(pos, _num_elements);
344
115k
        _cur_index = pos;
345
115k
        return Status::OK();
346
115k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.98k
    Status seek_to_position_in_page(size_t pos) override {
335
1.98k
        DCHECK(_parsed) << "Must call init()";
336
1.98k
        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.98k
        DCHECK_LE(pos, _num_elements);
344
1.98k
        _cur_index = pos;
345
1.98k
        return Status::OK();
346
1.98k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE24seek_to_position_in_pageEm
Line
Count
Source
334
50
    Status seek_to_position_in_page(size_t pos) override {
335
50
        DCHECK(_parsed) << "Must call init()";
336
50
        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
50
        DCHECK_LE(pos, _num_elements);
344
50
        _cur_index = pos;
345
50
        return Status::OK();
346
50
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE24seek_to_position_in_pageEm
Line
Count
Source
334
88
    Status seek_to_position_in_page(size_t pos) override {
335
88
        DCHECK(_parsed) << "Must call init()";
336
88
        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
88
        DCHECK_LE(pos, _num_elements);
344
88
        _cur_index = pos;
345
88
        return Status::OK();
346
88
    }
347
348
0
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
349
0
        DCHECK(_parsed) << "Must call init() firstly";
350
351
0
        if (_num_elements == 0) {
352
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
353
0
        }
354
355
0
        size_t left = 0;
356
0
        size_t right = _num_elements;
357
358
0
        void* mid_value = nullptr;
359
360
        // find the first value >= target. after loop,
361
        // - left == index of first value >= target when found
362
        // - left == _num_elements when not found (all values < target)
363
0
        while (left < right) {
364
0
            size_t mid = left + (right - left) / 2;
365
0
            mid_value = get_data(mid);
366
0
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
367
0
                left = mid + 1;
368
0
            } else {
369
0
                right = mid;
370
0
            }
371
0
        }
372
0
        if (left >= _num_elements) {
373
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
374
0
        }
375
0
        void* find_value = get_data(left);
376
0
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
377
0
            *exact_match = true;
378
0
        } else {
379
0
            *exact_match = false;
380
0
        }
381
382
0
        _cur_index = left;
383
0
        return Status::OK();
384
0
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE22seek_at_or_after_valueEPKvPb
385
386
    template <bool forward_index = true>
387
1.74M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.74M
        DCHECK(_parsed);
389
1.74M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.74M
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.74M
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.74M
        *n = max_fetch;
398
1.74M
        if constexpr (forward_index) {
399
1.54M
            _cur_index += max_fetch;
400
1.54M
        }
401
402
1.74M
        return Status::OK();
403
1.74M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
417k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
417k
        DCHECK(_parsed);
389
418k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
417k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
417k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
417k
        *n = max_fetch;
398
417k
        if constexpr (forward_index) {
399
417k
            _cur_index += max_fetch;
400
417k
        }
401
402
417k
        return Status::OK();
403
417k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
201k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
201k
        DCHECK(_parsed);
389
201k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
201k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
201k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
201k
        *n = max_fetch;
398
201k
        if constexpr (forward_index) {
399
201k
            _cur_index += max_fetch;
400
201k
        }
401
402
201k
        return Status::OK();
403
201k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
17.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
17.2k
        DCHECK(_parsed);
389
17.2k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
17.2k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
17.2k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
17.2k
        *n = max_fetch;
398
17.2k
        if constexpr (forward_index) {
399
17.2k
            _cur_index += max_fetch;
400
17.2k
        }
401
402
17.2k
        return Status::OK();
403
17.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
101k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
101k
        DCHECK(_parsed);
389
101k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
101k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
101k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
101k
        *n = max_fetch;
398
101k
        if constexpr (forward_index) {
399
101k
            _cur_index += max_fetch;
400
101k
        }
401
402
101k
        return Status::OK();
403
101k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
30.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
30.2k
        DCHECK(_parsed);
389
30.2k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
30.2k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
30.2k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
30.2k
        *n = max_fetch;
398
30.2k
        if constexpr (forward_index) {
399
30.2k
            _cur_index += max_fetch;
400
30.2k
        }
401
402
30.2k
        return Status::OK();
403
30.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
152k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
152k
        DCHECK(_parsed);
389
152k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
152k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
152k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
152k
        *n = max_fetch;
398
152k
        if constexpr (forward_index) {
399
152k
            _cur_index += max_fetch;
400
152k
        }
401
402
152k
        return Status::OK();
403
152k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
205k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
205k
        DCHECK(_parsed);
389
205k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
205k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
205k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
205k
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
205k
        return Status::OK();
403
205k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
14.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
14.1k
        DCHECK(_parsed);
389
14.1k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
14.1k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
14.1k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
14.1k
        *n = max_fetch;
398
14.1k
        if constexpr (forward_index) {
399
14.1k
            _cur_index += max_fetch;
400
14.1k
        }
401
402
14.1k
        return Status::OK();
403
14.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
27.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
27.9k
        DCHECK(_parsed);
389
27.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
27.9k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
27.9k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
27.9k
        *n = max_fetch;
398
27.9k
        if constexpr (forward_index) {
399
27.9k
            _cur_index += max_fetch;
400
27.9k
        }
401
402
27.9k
        return Status::OK();
403
27.9k
    }
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
6.18k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
6.18k
        DCHECK(_parsed);
389
6.18k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
6.18k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
6.18k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
6.18k
        *n = max_fetch;
398
6.18k
        if constexpr (forward_index) {
399
6.18k
            _cur_index += max_fetch;
400
6.18k
        }
401
402
6.18k
        return Status::OK();
403
6.18k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
390k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
390k
        DCHECK(_parsed);
389
390k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
390k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
390k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
390k
        *n = max_fetch;
398
390k
        if constexpr (forward_index) {
399
390k
            _cur_index += max_fetch;
400
390k
        }
401
402
390k
        return Status::OK();
403
390k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
88.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
88.0k
        DCHECK(_parsed);
389
88.0k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
88.0k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
88.0k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
88.0k
        *n = max_fetch;
398
88.0k
        if constexpr (forward_index) {
399
88.0k
            _cur_index += max_fetch;
400
88.0k
        }
401
402
88.0k
        return Status::OK();
403
88.0k
    }
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.46k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.46k
        DCHECK(_parsed);
389
1.46k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.46k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.46k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.46k
        *n = max_fetch;
398
1.46k
        if constexpr (forward_index) {
399
1.46k
            _cur_index += max_fetch;
400
1.46k
        }
401
402
1.46k
        return Status::OK();
403
1.46k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
7.49k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
7.49k
        DCHECK(_parsed);
389
7.50k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
7.49k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
7.49k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
7.49k
        *n = max_fetch;
398
7.49k
        if constexpr (forward_index) {
399
7.49k
            _cur_index += max_fetch;
400
7.49k
        }
401
402
7.49k
        return Status::OK();
403
7.49k
    }
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.21k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.21k
        DCHECK(_parsed);
389
1.21k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.21k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.21k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.21k
        *n = max_fetch;
398
1.21k
        if constexpr (forward_index) {
399
1.21k
            _cur_index += max_fetch;
400
1.21k
        }
401
402
1.21k
        return Status::OK();
403
1.21k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
8.45k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
8.45k
        DCHECK(_parsed);
389
8.46k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
8.45k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
8.45k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
8.45k
        *n = max_fetch;
398
8.45k
        if constexpr (forward_index) {
399
8.45k
            _cur_index += max_fetch;
400
8.45k
        }
401
402
8.45k
        return Status::OK();
403
8.45k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
30.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
30.5k
        DCHECK(_parsed);
389
30.5k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
30.5k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
30.5k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
30.5k
        *n = max_fetch;
398
30.5k
        if constexpr (forward_index) {
399
30.5k
            _cur_index += max_fetch;
400
30.5k
        }
401
402
30.5k
        return Status::OK();
403
30.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
28.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
28.9k
        DCHECK(_parsed);
389
28.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
28.9k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
28.9k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
28.9k
        *n = max_fetch;
398
28.9k
        if constexpr (forward_index) {
399
28.9k
            _cur_index += max_fetch;
400
28.9k
        }
401
402
28.9k
        return Status::OK();
403
28.9k
    }
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.20k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.20k
        DCHECK(_parsed);
389
3.20k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.20k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.20k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.20k
        *n = max_fetch;
398
3.20k
        if constexpr (forward_index) {
399
3.20k
            _cur_index += max_fetch;
400
3.20k
        }
401
402
3.20k
        return Status::OK();
403
3.20k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
8.26k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
8.26k
        DCHECK(_parsed);
389
8.26k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
8.26k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
8.26k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
8.26k
        *n = max_fetch;
398
8.26k
        if constexpr (forward_index) {
399
8.26k
            _cur_index += max_fetch;
400
8.26k
        }
401
402
8.26k
        return Status::OK();
403
8.26k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
5.78k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
5.78k
        DCHECK(_parsed);
389
5.78k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
5.78k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
5.78k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
5.78k
        *n = max_fetch;
398
5.78k
        if constexpr (forward_index) {
399
5.78k
            _cur_index += max_fetch;
400
5.78k
        }
401
402
5.78k
        return Status::OK();
403
5.78k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
404
405
1.54M
    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
417k
    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
201k
    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
17.2k
    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
101k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
30.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
152k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
14.1k
    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
27.9k
    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
6.17k
    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
390k
    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
88.0k
    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.46k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
7.50k
    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.22k
    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
8.45k
    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
30.5k
    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
28.9k
    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.20k
    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
8.26k
    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
5.78k
    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
456k
                          MutableColumnPtr& dst) override {
409
456k
        DCHECK(_parsed);
410
456k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
456k
        auto total = *n;
416
456k
        auto read_count = 0;
417
456k
        _buffer.resize(total);
418
130M
        for (size_t i = 0; i < total; ++i) {
419
130M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
130M
            if (UNLIKELY(ord >= _num_elements)) {
421
12.3k
                break;
422
12.3k
            }
423
424
130M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
130M
        }
426
427
456k
        if (LIKELY(read_count > 0)) {
428
456k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
456k
        }
430
431
456k
        *n = read_count;
432
456k
        return Status::OK();
433
456k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
79.7k
                          MutableColumnPtr& dst) override {
409
79.7k
        DCHECK(_parsed);
410
79.7k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
79.7k
        auto total = *n;
416
79.7k
        auto read_count = 0;
417
79.7k
        _buffer.resize(total);
418
41.9M
        for (size_t i = 0; i < total; ++i) {
419
41.8M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
41.8M
            if (UNLIKELY(ord >= _num_elements)) {
421
650
                break;
422
650
            }
423
424
41.8M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
41.8M
        }
426
427
79.7k
        if (LIKELY(read_count > 0)) {
428
79.7k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
79.7k
        }
430
431
79.7k
        *n = read_count;
432
79.7k
        return Status::OK();
433
79.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
29.1k
                          MutableColumnPtr& dst) override {
409
29.1k
        DCHECK(_parsed);
410
29.1k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
29.1k
        auto total = *n;
416
29.1k
        auto read_count = 0;
417
29.1k
        _buffer.resize(total);
418
1.84M
        for (size_t i = 0; i < total; ++i) {
419
1.81M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.81M
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
1.81M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.81M
        }
426
427
29.1k
        if (LIKELY(read_count > 0)) {
428
29.1k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
29.1k
        }
430
431
29.1k
        *n = read_count;
432
29.1k
        return Status::OK();
433
29.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_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
625k
        for (size_t i = 0; i < total; ++i) {
419
615k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
615k
            if (UNLIKELY(ord >= _num_elements)) {
421
13
                break;
422
13
            }
423
424
615k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
615k
        }
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_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
147k
                          MutableColumnPtr& dst) override {
409
147k
        DCHECK(_parsed);
410
147k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
147k
        auto total = *n;
416
147k
        auto read_count = 0;
417
147k
        _buffer.resize(total);
418
26.4M
        for (size_t i = 0; i < total; ++i) {
419
26.3M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
26.3M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.46k
                break;
422
1.46k
            }
423
424
26.3M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
26.3M
        }
426
427
147k
        if (LIKELY(read_count > 0)) {
428
147k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
147k
        }
430
431
147k
        *n = read_count;
432
147k
        return Status::OK();
433
147k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
9.24k
                          MutableColumnPtr& dst) override {
409
9.24k
        DCHECK(_parsed);
410
9.24k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
9.24k
        auto total = *n;
416
9.24k
        auto read_count = 0;
417
9.24k
        _buffer.resize(total);
418
1.33M
        for (size_t i = 0; i < total; ++i) {
419
1.33M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.33M
            if (UNLIKELY(ord >= _num_elements)) {
421
570
                break;
422
570
            }
423
424
1.32M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.32M
        }
426
427
9.24k
        if (LIKELY(read_count > 0)) {
428
9.24k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
9.24k
        }
430
431
9.24k
        *n = read_count;
432
9.24k
        return Status::OK();
433
9.24k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
36.4k
                          MutableColumnPtr& dst) override {
409
36.4k
        DCHECK(_parsed);
410
36.4k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
36.4k
        auto total = *n;
416
36.4k
        auto read_count = 0;
417
36.4k
        _buffer.resize(total);
418
9.29M
        for (size_t i = 0; i < total; ++i) {
419
9.26M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.26M
            if (UNLIKELY(ord >= _num_elements)) {
421
2.31k
                break;
422
2.31k
            }
423
424
9.26M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.26M
        }
426
427
36.4k
        if (LIKELY(read_count > 0)) {
428
36.4k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
36.4k
        }
430
431
36.4k
        *n = read_count;
432
36.4k
        return Status::OK();
433
36.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
10.0k
                          MutableColumnPtr& dst) override {
409
10.0k
        DCHECK(_parsed);
410
10.0k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
10.0k
        auto total = *n;
416
10.0k
        auto read_count = 0;
417
10.0k
        _buffer.resize(total);
418
1.19M
        for (size_t i = 0; i < total; ++i) {
419
1.18M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.18M
            if (UNLIKELY(ord >= _num_elements)) {
421
31
                break;
422
31
            }
423
424
1.18M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.18M
        }
426
427
10.0k
        if (LIKELY(read_count > 0)) {
428
10.0k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
10.0k
        }
430
431
10.0k
        *n = read_count;
432
10.0k
        return Status::OK();
433
10.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.7k
                          MutableColumnPtr& dst) override {
409
13.7k
        DCHECK(_parsed);
410
13.7k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.7k
        auto total = *n;
416
13.7k
        auto read_count = 0;
417
13.7k
        _buffer.resize(total);
418
1.96M
        for (size_t i = 0; i < total; ++i) {
419
1.95M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.95M
            if (UNLIKELY(ord >= _num_elements)) {
421
427
                break;
422
427
            }
423
424
1.95M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.95M
        }
426
427
13.7k
        if (LIKELY(read_count > 0)) {
428
13.7k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.7k
        }
430
431
13.7k
        *n = read_count;
432
13.7k
        return Status::OK();
433
13.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1.38k
                          MutableColumnPtr& dst) override {
409
1.38k
        DCHECK(_parsed);
410
1.38k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.38k
        auto total = *n;
416
1.38k
        auto read_count = 0;
417
1.38k
        _buffer.resize(total);
418
473k
        for (size_t i = 0; i < total; ++i) {
419
471k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
471k
            if (UNLIKELY(ord >= _num_elements)) {
421
15
                break;
422
15
            }
423
424
471k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
471k
        }
426
427
1.38k
        if (LIKELY(read_count > 0)) {
428
1.38k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.38k
        }
430
431
1.38k
        *n = read_count;
432
1.38k
        return Status::OK();
433
1.38k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
27.7k
                          MutableColumnPtr& dst) override {
409
27.7k
        DCHECK(_parsed);
410
27.7k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
27.7k
        auto total = *n;
416
27.7k
        auto read_count = 0;
417
27.7k
        _buffer.resize(total);
418
6.03M
        for (size_t i = 0; i < total; ++i) {
419
6.00M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
6.00M
            if (UNLIKELY(ord >= _num_elements)) {
421
508
                break;
422
508
            }
423
424
6.00M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
6.00M
        }
426
427
27.7k
        if (LIKELY(read_count > 0)) {
428
27.7k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
27.7k
        }
430
431
27.7k
        *n = read_count;
432
27.7k
        return Status::OK();
433
27.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
30.8k
                          MutableColumnPtr& dst) override {
409
30.8k
        DCHECK(_parsed);
410
30.8k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
30.8k
        auto total = *n;
416
30.8k
        auto read_count = 0;
417
30.8k
        _buffer.resize(total);
418
9.78M
        for (size_t i = 0; i < total; ++i) {
419
9.75M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.75M
            if (UNLIKELY(ord >= _num_elements)) {
421
197
                break;
422
197
            }
423
424
9.75M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.75M
        }
426
427
30.8k
        if (LIKELY(read_count > 0)) {
428
30.8k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
30.8k
        }
430
431
30.8k
        *n = read_count;
432
30.8k
        return Status::OK();
433
30.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1.80k
                          MutableColumnPtr& dst) override {
409
1.80k
        DCHECK(_parsed);
410
1.80k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.80k
        auto total = *n;
416
1.80k
        auto read_count = 0;
417
1.80k
        _buffer.resize(total);
418
474k
        for (size_t i = 0; i < total; ++i) {
419
472k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
472k
            if (UNLIKELY(ord >= _num_elements)) {
421
247
                break;
422
247
            }
423
424
472k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
472k
        }
426
427
1.80k
        if (LIKELY(read_count > 0)) {
428
1.80k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.80k
        }
430
431
1.80k
        *n = read_count;
432
1.80k
        return Status::OK();
433
1.80k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
11.7k
                          MutableColumnPtr& dst) override {
409
11.7k
        DCHECK(_parsed);
410
11.7k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
11.7k
        auto total = *n;
416
11.7k
        auto read_count = 0;
417
11.7k
        _buffer.resize(total);
418
25.0k
        for (size_t i = 0; i < total; ++i) {
419
13.2k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
13.2k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
13.2k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
13.2k
        }
426
427
11.8k
        if (LIKELY(read_count > 0)) {
428
11.8k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
11.8k
        }
430
431
11.7k
        *n = read_count;
432
11.7k
        return Status::OK();
433
11.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
140
                          MutableColumnPtr& dst) override {
409
140
        DCHECK(_parsed);
410
140
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
140
        auto total = *n;
416
140
        auto read_count = 0;
417
140
        _buffer.resize(total);
418
285
        for (size_t i = 0; i < total; ++i) {
419
145
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
145
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
145
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
145
        }
426
427
140
        if (LIKELY(read_count > 0)) {
428
140
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
140
        }
430
431
140
        *n = read_count;
432
140
        return Status::OK();
433
140
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4.50k
                          MutableColumnPtr& dst) override {
409
4.50k
        DCHECK(_parsed);
410
4.50k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.50k
        auto total = *n;
416
4.50k
        auto read_count = 0;
417
4.50k
        _buffer.resize(total);
418
19.0k
        for (size_t i = 0; i < total; ++i) {
419
14.5k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.5k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
14.5k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.5k
        }
426
427
4.50k
        if (LIKELY(read_count > 0)) {
428
4.50k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.50k
        }
430
431
4.50k
        *n = read_count;
432
4.50k
        return Status::OK();
433
4.50k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
26.1k
                          MutableColumnPtr& dst) override {
409
26.1k
        DCHECK(_parsed);
410
26.1k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
26.1k
        auto total = *n;
416
26.1k
        auto read_count = 0;
417
26.1k
        _buffer.resize(total);
418
20.1M
        for (size_t i = 0; i < total; ++i) {
419
20.1M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
20.1M
            if (UNLIKELY(ord >= _num_elements)) {
421
5.20k
                break;
422
5.20k
            }
423
424
20.1M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
20.1M
        }
426
427
26.1k
        if (LIKELY(read_count > 0)) {
428
26.1k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
26.1k
        }
430
431
26.1k
        *n = read_count;
432
26.1k
        return Status::OK();
433
26.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.4k
                          MutableColumnPtr& dst) override {
409
13.4k
        DCHECK(_parsed);
410
13.4k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.4k
        auto total = *n;
416
13.4k
        auto read_count = 0;
417
13.4k
        _buffer.resize(total);
418
8.99M
        for (size_t i = 0; i < total; ++i) {
419
8.98M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
8.98M
            if (UNLIKELY(ord >= _num_elements)) {
421
744
                break;
422
744
            }
423
424
8.98M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
8.98M
        }
426
427
13.4k
        if (LIKELY(read_count > 0)) {
428
13.4k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.4k
        }
430
431
13.4k
        *n = read_count;
432
13.4k
        return Status::OK();
433
13.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
961
                          MutableColumnPtr& dst) override {
409
961
        DCHECK(_parsed);
410
961
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
961
        auto total = *n;
416
961
        auto read_count = 0;
417
961
        _buffer.resize(total);
418
2.77k
        for (size_t i = 0; i < total; ++i) {
419
1.81k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.81k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
1.81k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.81k
        }
426
427
962
        if (LIKELY(read_count > 0)) {
428
962
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
962
        }
430
431
961
        *n = read_count;
432
961
        return Status::OK();
433
961
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
442
                          MutableColumnPtr& dst) override {
409
442
        DCHECK(_parsed);
410
442
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
442
        auto total = *n;
416
442
        auto read_count = 0;
417
442
        _buffer.resize(total);
418
1.14k
        for (size_t i = 0; i < total; ++i) {
419
707
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
707
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
707
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
707
        }
426
427
442
        if (LIKELY(read_count > 0)) {
428
442
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
442
        }
430
431
442
        *n = read_count;
432
442
        return Status::OK();
433
442
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
351
                          MutableColumnPtr& dst) override {
409
351
        DCHECK(_parsed);
410
351
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
351
        auto total = *n;
416
351
        auto read_count = 0;
417
351
        _buffer.resize(total);
418
1.21k
        for (size_t i = 0; i < total; ++i) {
419
866
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
866
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
866
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
866
        }
426
427
351
        if (LIKELY(read_count > 0)) {
428
351
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
351
        }
430
431
351
        *n = read_count;
432
351
        return Status::OK();
433
351
    }
434
435
206k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
206k
        return next_batch<false>(n, dst);
437
206k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
435
206k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
206k
        return next_batch<false>(n, dst);
437
206k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
438
439
4
    size_t count() const override { return _num_elements; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
439
4
    size_t count() const override { return _num_elements; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE5countEv
440
441
4.01M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
1.94M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
441
224k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
441
223k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
272k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
441
111k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE13current_indexEv
Line
Count
Source
441
229k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
204k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
441
213k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
441
230k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
441
33.8k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
441
203k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Line
Count
Source
441
1.02k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE13current_indexEv
Line
Count
Source
441
6
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE13current_indexEv
Line
Count
Source
441
3.56k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
441
832
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
441
111k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE13current_indexEv
Line
Count
Source
441
308
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE13current_indexEv
Line
Count
Source
441
47
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
Line
Count
Source
441
98
    size_t current_index() const override { return _cur_index; }
442
443
133M
    char* get_data(size_t index) const {
444
133M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
133M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
43.6M
    char* get_data(size_t index) const {
444
43.6M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
43.6M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
2.01M
    char* get_data(size_t index) const {
444
2.01M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
2.01M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
443
632k
    char* get_data(size_t index) const {
444
632k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
632k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
443
26.4M
    char* get_data(size_t index) const {
444
26.4M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
26.4M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
1.35M
    char* get_data(size_t index) const {
444
1.35M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.35M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
9.62M
    char* get_data(size_t index) const {
444
9.62M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.62M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
1.20M
    char* get_data(size_t index) const {
444
1.20M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.20M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
1.98M
    char* get_data(size_t index) const {
444
1.98M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.98M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
478k
    char* get_data(size_t index) const {
444
478k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
478k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
6.39M
    char* get_data(size_t index) const {
444
6.39M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
6.39M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
443
9.84M
    char* get_data(size_t index) const {
444
9.84M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.84M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
443
474k
    char* get_data(size_t index) const {
444
474k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
474k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
443
20.7k
    char* get_data(size_t index) const {
444
20.7k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20.7k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
443
1.35k
    char* get_data(size_t index) const {
444
1.35k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.35k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
443
22.9k
    char* get_data(size_t index) const {
444
22.9k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
22.9k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
443
20.1M
    char* get_data(size_t index) const {
444
20.1M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20.1M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
9.01M
    char* get_data(size_t index) const {
444
9.01M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.01M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
443
5.02k
    char* get_data(size_t index) const {
444
5.02k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
5.02k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Line
Count
Source
443
8.97k
    char* get_data(size_t index) const {
444
8.97k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
8.97k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
Line
Count
Source
443
6.65k
    char* get_data(size_t index) const {
444
6.65k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
6.65k
    }
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