Coverage Report

Created: 2026-05-19 12:38

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
124k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
74.5k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
14.7k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
731
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
23.4k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
95
3.57k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
446
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
95
574
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
95
564
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
4
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
849
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
95
3.54k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
19
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
2
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
95
242
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
95
452
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
95
450
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
96
97
17.4M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
17.3M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
15.5k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
651
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
42.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
3.88k
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
338
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12is_page_fullEv
Line
Count
Source
97
528
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
97
550
    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
4
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
841
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
3.53k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
97
19
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
97
2
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
97
216
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
418
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
97
410
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
98
99
741k
    Status add(const uint8_t* vals, size_t* count) override {
100
741k
        return add_internal<false>(vals, count);
101
741k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
99
672k
    Status add(const uint8_t* vals, size_t* count) override {
100
672k
        return add_internal<false>(vals, count);
101
672k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
15.5k
    Status add(const uint8_t* vals, size_t* count) override {
100
15.5k
        return add_internal<false>(vals, count);
101
15.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
651
    Status add(const uint8_t* vals, size_t* count) override {
100
651
        return add_internal<false>(vals, count);
101
651
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
42.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
42.3k
        return add_internal<false>(vals, count);
101
42.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
3.88k
    Status add(const uint8_t* vals, size_t* count) override {
100
3.88k
        return add_internal<false>(vals, count);
101
3.88k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
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_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
99
528
    Status add(const uint8_t* vals, size_t* count) override {
100
528
        return add_internal<false>(vals, count);
101
528
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
99
550
    Status add(const uint8_t* vals, size_t* count) override {
100
550
        return add_internal<false>(vals, count);
101
550
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
4
    Status add(const uint8_t* vals, size_t* count) override {
100
4
        return add_internal<false>(vals, count);
101
4
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
841
    Status add(const uint8_t* vals, size_t* count) override {
100
841
        return add_internal<false>(vals, count);
101
841
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
3.53k
    Status add(const uint8_t* vals, size_t* count) override {
100
3.53k
        return add_internal<false>(vals, count);
101
3.53k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
99
19
    Status add(const uint8_t* vals, size_t* count) override {
100
19
        return add_internal<false>(vals, count);
101
19
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
2
    Status add(const uint8_t* vals, size_t* count) override {
100
2
        return add_internal<false>(vals, count);
101
2
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
99
216
    Status add(const uint8_t* vals, size_t* count) override {
100
216
        return add_internal<false>(vals, count);
101
216
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
420
    Status add(const uint8_t* vals, size_t* count) override {
100
420
        return add_internal<false>(vals, count);
101
420
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
99
410
    Status add(const uint8_t* vals, size_t* count) override {
100
410
        return add_internal<false>(vals, count);
101
410
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
102
103
16.7M
    Status single_add(const uint8_t* vals, size_t* count) {
104
16.7M
        return add_internal<true>(vals, count);
105
16.7M
    }
106
107
    template <bool single>
108
17.4M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
17.4M
        DCHECK(!_finished);
110
17.4M
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
17.4M
        uint32_t to_add = cast_set<UInt32>(
126
17.4M
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
17.4M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
17.4M
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
17.4M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
17.4M
        _count += to_add;
134
17.4M
        _remain_element_capacity -= to_add;
135
17.4M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
17.4M
        *num_written = to_add;
138
17.4M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
16.7M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
16.7M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
16.7M
                        *reinterpret_cast<const uint32_t*>(vals);
149
16.7M
                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
16.7M
        }
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
17.4M
        return Status::OK();
159
17.4M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
672k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
672k
        DCHECK(!_finished);
110
672k
        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
672k
        uint32_t to_add = cast_set<UInt32>(
126
672k
                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
672k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
672k
        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
672k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
672k
        _count += to_add;
134
672k
        _remain_element_capacity -= to_add;
135
672k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
672k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
672k
        memcpy(&_data[orig_size], vals, to_add_size);
158
672k
        return Status::OK();
159
672k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
16.6M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
16.6M
        DCHECK(!_finished);
110
16.6M
        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.6M
        uint32_t to_add = cast_set<UInt32>(
126
16.6M
                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.6M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
16.6M
        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.6M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
16.7M
        _count += to_add;
134
16.7M
        _remain_element_capacity -= to_add;
135
16.7M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
16.7M
        *num_written = to_add;
138
16.7M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
16.7M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
16.7M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
16.7M
                        *reinterpret_cast<const uint32_t*>(vals);
149
16.7M
                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
16.7M
        }
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
16.7M
        return Status::OK();
159
16.6M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
15.5k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
15.5k
        DCHECK(!_finished);
110
15.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
15.5k
        uint32_t to_add = cast_set<UInt32>(
126
15.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
15.5k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
15.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
15.5k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
15.5k
        _count += to_add;
134
15.5k
        _remain_element_capacity -= to_add;
135
15.5k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
15.5k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
15.5k
        memcpy(&_data[orig_size], vals, to_add_size);
158
15.5k
        return Status::OK();
159
15.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
651
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
651
        DCHECK(!_finished);
110
651
        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
651
        uint32_t to_add = cast_set<UInt32>(
126
651
                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
651
        int to_add_size = to_add * SIZE_OF_TYPE;
129
651
        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
651
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
651
        _count += to_add;
134
651
        _remain_element_capacity -= to_add;
135
651
        _raw_data_size += to_add_size;
136
        // return added number through count
137
651
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
651
        memcpy(&_data[orig_size], vals, to_add_size);
158
651
        return Status::OK();
159
651
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
42.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
42.3k
        DCHECK(!_finished);
110
42.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
42.3k
        uint32_t to_add = cast_set<UInt32>(
126
42.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
42.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
42.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
42.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
42.3k
        _count += to_add;
134
42.3k
        _remain_element_capacity -= to_add;
135
42.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
42.3k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
42.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
42.3k
        return Status::OK();
159
42.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
3.88k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
3.88k
        DCHECK(!_finished);
110
3.88k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
3.88k
        uint32_t to_add = cast_set<UInt32>(
126
3.88k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
3.88k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
3.88k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
3.88k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
3.88k
        _count += to_add;
134
3.88k
        _remain_element_capacity -= to_add;
135
3.88k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
3.88k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
3.88k
        memcpy(&_data[orig_size], vals, to_add_size);
158
3.88k
        return Status::OK();
159
3.88k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
338
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
338
        DCHECK(!_finished);
110
338
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
338
        uint32_t to_add = cast_set<UInt32>(
126
338
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
338
        int to_add_size = to_add * SIZE_OF_TYPE;
129
338
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
338
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
338
        _count += to_add;
134
338
        _remain_element_capacity -= to_add;
135
338
        _raw_data_size += to_add_size;
136
        // return added number through count
137
338
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
338
        memcpy(&_data[orig_size], vals, to_add_size);
158
338
        return Status::OK();
159
338
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
528
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
528
        DCHECK(!_finished);
110
528
        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
528
        uint32_t to_add = cast_set<UInt32>(
126
528
                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
528
        int to_add_size = to_add * SIZE_OF_TYPE;
129
528
        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
528
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
528
        _count += to_add;
134
528
        _remain_element_capacity -= to_add;
135
528
        _raw_data_size += to_add_size;
136
        // return added number through count
137
528
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
528
        memcpy(&_data[orig_size], vals, to_add_size);
158
528
        return Status::OK();
159
528
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
550
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
550
        DCHECK(!_finished);
110
550
        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
550
        uint32_t to_add = cast_set<UInt32>(
126
550
                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
550
        int to_add_size = to_add * SIZE_OF_TYPE;
129
550
        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
550
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
550
        _count += to_add;
134
550
        _remain_element_capacity -= to_add;
135
550
        _raw_data_size += to_add_size;
136
        // return added number through count
137
550
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
550
        memcpy(&_data[orig_size], vals, to_add_size);
158
550
        return Status::OK();
159
550
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
4
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
4
        DCHECK(!_finished);
110
4
        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
4
        uint32_t to_add = cast_set<UInt32>(
126
4
                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
4
        int to_add_size = to_add * SIZE_OF_TYPE;
129
4
        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
4
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
4
        _count += to_add;
134
4
        _remain_element_capacity -= to_add;
135
4
        _raw_data_size += to_add_size;
136
        // return added number through count
137
4
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
4
        memcpy(&_data[orig_size], vals, to_add_size);
158
4
        return Status::OK();
159
4
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
841
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
841
        DCHECK(!_finished);
110
841
        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
841
        uint32_t to_add = cast_set<UInt32>(
126
841
                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
841
        int to_add_size = to_add * SIZE_OF_TYPE;
129
841
        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
841
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
841
        _count += to_add;
134
841
        _remain_element_capacity -= to_add;
135
841
        _raw_data_size += to_add_size;
136
        // return added number through count
137
841
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
841
        memcpy(&_data[orig_size], vals, to_add_size);
158
841
        return Status::OK();
159
841
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
3.53k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
3.53k
        DCHECK(!_finished);
110
3.53k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
3.53k
        uint32_t to_add = cast_set<UInt32>(
126
3.53k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
3.53k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
3.53k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
3.53k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
3.53k
        _count += to_add;
134
3.53k
        _remain_element_capacity -= to_add;
135
3.53k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
3.53k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
3.53k
        memcpy(&_data[orig_size], vals, to_add_size);
158
3.53k
        return Status::OK();
159
3.53k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
19
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
19
        DCHECK(!_finished);
110
19
        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
19
        uint32_t to_add = cast_set<UInt32>(
126
19
                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
19
        int to_add_size = to_add * SIZE_OF_TYPE;
129
19
        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
19
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
19
        _count += to_add;
134
19
        _remain_element_capacity -= to_add;
135
19
        _raw_data_size += to_add_size;
136
        // return added number through count
137
19
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
19
        memcpy(&_data[orig_size], vals, to_add_size);
158
19
        return Status::OK();
159
19
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
2
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
2
        DCHECK(!_finished);
110
2
        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
2
        uint32_t to_add = cast_set<UInt32>(
126
2
                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
2
        int to_add_size = to_add * SIZE_OF_TYPE;
129
2
        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
2
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
2
        _count += to_add;
134
2
        _remain_element_capacity -= to_add;
135
2
        _raw_data_size += to_add_size;
136
        // return added number through count
137
2
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
2
        memcpy(&_data[orig_size], vals, to_add_size);
158
2
        return Status::OK();
159
2
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
216
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
216
        DCHECK(!_finished);
110
216
        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
216
        uint32_t to_add = cast_set<UInt32>(
126
216
                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
216
        int to_add_size = to_add * SIZE_OF_TYPE;
129
216
        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
216
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
216
        _count += to_add;
134
216
        _remain_element_capacity -= to_add;
135
216
        _raw_data_size += to_add_size;
136
        // return added number through count
137
216
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
216
        memcpy(&_data[orig_size], vals, to_add_size);
158
216
        return Status::OK();
159
216
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
420
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
420
        DCHECK(!_finished);
110
420
        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
420
        uint32_t to_add = cast_set<UInt32>(
126
420
                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
420
        int to_add_size = to_add * SIZE_OF_TYPE;
129
420
        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
420
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
418
        _count += to_add;
134
418
        _remain_element_capacity -= to_add;
135
418
        _raw_data_size += to_add_size;
136
        // return added number through count
137
418
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
418
        memcpy(&_data[orig_size], vals, to_add_size);
158
418
        return Status::OK();
159
420
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
410
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
410
        DCHECK(!_finished);
110
410
        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
410
        uint32_t to_add = cast_set<UInt32>(
126
410
                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
410
        int to_add_size = to_add * SIZE_OF_TYPE;
129
410
        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
410
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
410
        _count += to_add;
134
410
        _remain_element_capacity -= to_add;
135
410
        _raw_data_size += to_add_size;
136
        // return added number through count
137
410
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
410
        memcpy(&_data[orig_size], vals, to_add_size);
158
410
        return Status::OK();
159
410
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
160
161
124k
    Status finish(OwnedSlice* slice) override {
162
124k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
124k
        return Status::OK();
164
124k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
75.0k
    Status finish(OwnedSlice* slice) override {
162
75.0k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
75.0k
        return Status::OK();
164
75.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
14.7k
    Status finish(OwnedSlice* slice) override {
162
14.7k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
14.7k
        return Status::OK();
164
14.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
723
    Status finish(OwnedSlice* slice) override {
162
723
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
723
        return Status::OK();
164
723
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
23.6k
    Status finish(OwnedSlice* slice) override {
162
23.6k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
23.6k
        return Status::OK();
164
23.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
3.64k
    Status finish(OwnedSlice* slice) override {
162
3.64k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
3.64k
        return Status::OK();
164
3.64k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
414
    Status finish(OwnedSlice* slice) override {
162
414
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
414
        return Status::OK();
164
414
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
566
    Status finish(OwnedSlice* slice) override {
162
566
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
566
        return Status::OK();
164
566
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
554
    Status finish(OwnedSlice* slice) override {
162
554
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
554
        return Status::OK();
164
554
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
4
    Status finish(OwnedSlice* slice) override {
162
4
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
4
        return Status::OK();
164
4
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
843
    Status finish(OwnedSlice* slice) override {
162
843
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
843
        return Status::OK();
164
843
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
3.55k
    Status finish(OwnedSlice* slice) override {
162
3.55k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
3.55k
        return Status::OK();
164
3.55k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
19
    Status finish(OwnedSlice* slice) override {
162
19
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
19
        return Status::OK();
164
19
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
2
    Status finish(OwnedSlice* slice) override {
162
2
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
2
        return Status::OK();
164
2
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
242
    Status finish(OwnedSlice* slice) override {
162
242
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
242
        return Status::OK();
164
242
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
444
    Status finish(OwnedSlice* slice) override {
162
444
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
444
        return Status::OK();
164
444
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
442
    Status finish(OwnedSlice* slice) override {
162
442
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
442
        return Status::OK();
164
442
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
165
166
301k
    Status reset() override {
167
301k
        RETURN_IF_CATCH_EXCEPTION({
168
301k
            size_t block_size = _options.data_page_size;
169
301k
            _count = 0;
170
301k
            _raw_data_size = 0;
171
301k
            _data.clear();
172
301k
            _data.reserve(block_size);
173
301k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
301k
                    << "buffer must be naturally-aligned";
175
301k
            _buffer.clear();
176
301k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
301k
            _finished = false;
178
301k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
301k
        });
180
301k
        return Status::OK();
181
301k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
166
201k
    Status reset() override {
167
201k
        RETURN_IF_CATCH_EXCEPTION({
168
201k
            size_t block_size = _options.data_page_size;
169
201k
            _count = 0;
170
201k
            _raw_data_size = 0;
171
201k
            _data.clear();
172
201k
            _data.reserve(block_size);
173
201k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
201k
                    << "buffer must be naturally-aligned";
175
201k
            _buffer.clear();
176
201k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
201k
            _finished = false;
178
201k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
201k
        });
180
201k
        return Status::OK();
181
201k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
29.5k
    Status reset() override {
167
29.5k
        RETURN_IF_CATCH_EXCEPTION({
168
29.5k
            size_t block_size = _options.data_page_size;
169
29.5k
            _count = 0;
170
29.5k
            _raw_data_size = 0;
171
29.5k
            _data.clear();
172
29.5k
            _data.reserve(block_size);
173
29.5k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
29.5k
                    << "buffer must be naturally-aligned";
175
29.5k
            _buffer.clear();
176
29.5k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
29.5k
            _finished = false;
178
29.5k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
29.5k
        });
180
29.5k
        return Status::OK();
181
29.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
166
1.45k
    Status reset() override {
167
1.45k
        RETURN_IF_CATCH_EXCEPTION({
168
1.45k
            size_t block_size = _options.data_page_size;
169
1.45k
            _count = 0;
170
1.45k
            _raw_data_size = 0;
171
1.45k
            _data.clear();
172
1.45k
            _data.reserve(block_size);
173
1.45k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.45k
                    << "buffer must be naturally-aligned";
175
1.45k
            _buffer.clear();
176
1.45k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.45k
            _finished = false;
178
1.45k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.45k
        });
180
1.45k
        return Status::OK();
181
1.45k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
47.0k
    Status reset() override {
167
47.0k
        RETURN_IF_CATCH_EXCEPTION({
168
47.0k
            size_t block_size = _options.data_page_size;
169
47.0k
            _count = 0;
170
47.0k
            _raw_data_size = 0;
171
47.0k
            _data.clear();
172
47.0k
            _data.reserve(block_size);
173
47.0k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
47.0k
                    << "buffer must be naturally-aligned";
175
47.0k
            _buffer.clear();
176
47.0k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
47.0k
            _finished = false;
178
47.0k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
47.0k
        });
180
47.0k
        return Status::OK();
181
47.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
166
7.20k
    Status reset() override {
167
7.20k
        RETURN_IF_CATCH_EXCEPTION({
168
7.20k
            size_t block_size = _options.data_page_size;
169
7.20k
            _count = 0;
170
7.20k
            _raw_data_size = 0;
171
7.20k
            _data.clear();
172
7.20k
            _data.reserve(block_size);
173
7.20k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
7.20k
                    << "buffer must be naturally-aligned";
175
7.20k
            _buffer.clear();
176
7.20k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
7.20k
            _finished = false;
178
7.20k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
7.20k
        });
180
7.22k
        return Status::OK();
181
7.20k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
166
860
    Status reset() override {
167
860
        RETURN_IF_CATCH_EXCEPTION({
168
860
            size_t block_size = _options.data_page_size;
169
860
            _count = 0;
170
860
            _raw_data_size = 0;
171
860
            _data.clear();
172
860
            _data.reserve(block_size);
173
860
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
860
                    << "buffer must be naturally-aligned";
175
860
            _buffer.clear();
176
860
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
860
            _finished = false;
178
860
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
860
        });
180
860
        return Status::OK();
181
860
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
166
1.14k
    Status reset() override {
167
1.14k
        RETURN_IF_CATCH_EXCEPTION({
168
1.14k
            size_t block_size = _options.data_page_size;
169
1.14k
            _count = 0;
170
1.14k
            _raw_data_size = 0;
171
1.14k
            _data.clear();
172
1.14k
            _data.reserve(block_size);
173
1.14k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.14k
                    << "buffer must be naturally-aligned";
175
1.14k
            _buffer.clear();
176
1.14k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.14k
            _finished = false;
178
1.14k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.14k
        });
180
1.14k
        return Status::OK();
181
1.14k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
166
1.11k
    Status reset() override {
167
1.11k
        RETURN_IF_CATCH_EXCEPTION({
168
1.11k
            size_t block_size = _options.data_page_size;
169
1.11k
            _count = 0;
170
1.11k
            _raw_data_size = 0;
171
1.11k
            _data.clear();
172
1.11k
            _data.reserve(block_size);
173
1.11k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.11k
                    << "buffer must be naturally-aligned";
175
1.11k
            _buffer.clear();
176
1.11k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.11k
            _finished = false;
178
1.11k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.11k
        });
180
1.11k
        return Status::OK();
181
1.11k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
166
8
    Status reset() override {
167
8
        RETURN_IF_CATCH_EXCEPTION({
168
8
            size_t block_size = _options.data_page_size;
169
8
            _count = 0;
170
8
            _raw_data_size = 0;
171
8
            _data.clear();
172
8
            _data.reserve(block_size);
173
8
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
8
                    << "buffer must be naturally-aligned";
175
8
            _buffer.clear();
176
8
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
8
            _finished = false;
178
8
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
8
        });
180
8
        return Status::OK();
181
8
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
166
1.69k
    Status reset() override {
167
1.69k
        RETURN_IF_CATCH_EXCEPTION({
168
1.69k
            size_t block_size = _options.data_page_size;
169
1.69k
            _count = 0;
170
1.69k
            _raw_data_size = 0;
171
1.69k
            _data.clear();
172
1.69k
            _data.reserve(block_size);
173
1.69k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.69k
                    << "buffer must be naturally-aligned";
175
1.69k
            _buffer.clear();
176
1.69k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.69k
            _finished = false;
178
1.69k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.69k
        });
180
1.69k
        return Status::OK();
181
1.69k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
166
7.10k
    Status reset() override {
167
7.10k
        RETURN_IF_CATCH_EXCEPTION({
168
7.10k
            size_t block_size = _options.data_page_size;
169
7.10k
            _count = 0;
170
7.10k
            _raw_data_size = 0;
171
7.10k
            _data.clear();
172
7.10k
            _data.reserve(block_size);
173
7.10k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
7.10k
                    << "buffer must be naturally-aligned";
175
7.10k
            _buffer.clear();
176
7.10k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
7.10k
            _finished = false;
178
7.10k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
7.10k
        });
180
7.10k
        return Status::OK();
181
7.10k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
166
38
    Status reset() override {
167
38
        RETURN_IF_CATCH_EXCEPTION({
168
38
            size_t block_size = _options.data_page_size;
169
38
            _count = 0;
170
38
            _raw_data_size = 0;
171
38
            _data.clear();
172
38
            _data.reserve(block_size);
173
38
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
38
                    << "buffer must be naturally-aligned";
175
38
            _buffer.clear();
176
38
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
38
            _finished = false;
178
38
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
38
        });
180
38
        return Status::OK();
181
38
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
166
4
    Status reset() override {
167
4
        RETURN_IF_CATCH_EXCEPTION({
168
4
            size_t block_size = _options.data_page_size;
169
4
            _count = 0;
170
4
            _raw_data_size = 0;
171
4
            _data.clear();
172
4
            _data.reserve(block_size);
173
4
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
4
                    << "buffer must be naturally-aligned";
175
4
            _buffer.clear();
176
4
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
4
            _finished = false;
178
4
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
4
        });
180
4
        return Status::OK();
181
4
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
166
484
    Status reset() override {
167
484
        RETURN_IF_CATCH_EXCEPTION({
168
484
            size_t block_size = _options.data_page_size;
169
484
            _count = 0;
170
484
            _raw_data_size = 0;
171
484
            _data.clear();
172
484
            _data.reserve(block_size);
173
484
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
484
                    << "buffer must be naturally-aligned";
175
484
            _buffer.clear();
176
484
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
484
            _finished = false;
178
484
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
484
        });
180
484
        return Status::OK();
181
484
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
896
    Status reset() override {
167
896
        RETURN_IF_CATCH_EXCEPTION({
168
896
            size_t block_size = _options.data_page_size;
169
896
            _count = 0;
170
896
            _raw_data_size = 0;
171
896
            _data.clear();
172
896
            _data.reserve(block_size);
173
896
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
896
                    << "buffer must be naturally-aligned";
175
896
            _buffer.clear();
176
896
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
896
            _finished = false;
178
896
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
896
        });
180
896
        return Status::OK();
181
896
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
166
892
    Status reset() override {
167
892
        RETURN_IF_CATCH_EXCEPTION({
168
892
            size_t block_size = _options.data_page_size;
169
892
            _count = 0;
170
892
            _raw_data_size = 0;
171
892
            _data.clear();
172
892
            _data.reserve(block_size);
173
892
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
892
                    << "buffer must be naturally-aligned";
175
892
            _buffer.clear();
176
892
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
892
            _finished = false;
178
892
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
892
        });
180
892
        return Status::OK();
181
892
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
182
183
3
    size_t count() const override { return _count; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
183
3
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5countEv
184
185
48.4k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
28.6k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
185
8.73k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
185
169
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
8.66k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
1.50k
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
8
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
30
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
185
28
    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
185
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
392
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4sizeEv
Line
Count
Source
185
13
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4sizeEv
Line
Count
Source
185
2
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4sizeEv
Line
Count
Source
185
28
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
185
24
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
185
40
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4sizeEv
186
187
71.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
21.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
14.7k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
723
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
23.6k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
3.64k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
187
414
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
187
566
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
554
    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
4
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
187
843
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
187
3.55k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
187
19
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
187
2
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
187
242
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
442
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
187
442
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
124k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
74.5k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
14.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
731
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
23.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
3.57k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
446
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
574
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
564
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
4
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
849
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
3.54k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
19
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
2
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
242
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
452
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
450
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
192
193
124k
    OwnedSlice _finish(int final_size_of_type) {
194
124k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
124k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
124k
        int padding_elems = num_elems_after_padding - _count;
199
124k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.03M
        for (int i = 0; i < padding_bytes; i++) {
201
2.91M
            _data.push_back(0);
202
2.91M
        }
203
204
        // reserve enough place for compression
205
124k
        _buffer.resize(
206
124k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
124k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
124k
        int64_t bytes =
210
124k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
124k
                                         num_elems_after_padding, final_size_of_type, 0);
212
124k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
124k
        encode_fixed32_le(&_buffer[0], _count);
222
124k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
124k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
124k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
124k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
124k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
124k
        return _buffer.build();
229
124k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
75.0k
    OwnedSlice _finish(int final_size_of_type) {
194
75.0k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
75.0k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
75.0k
        int padding_elems = num_elems_after_padding - _count;
199
75.0k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.50M
        for (int i = 0; i < padding_bytes; i++) {
201
1.42M
            _data.push_back(0);
202
1.42M
        }
203
204
        // reserve enough place for compression
205
75.0k
        _buffer.resize(
206
75.0k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
75.0k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
75.0k
        int64_t bytes =
210
75.0k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
75.0k
                                         num_elems_after_padding, final_size_of_type, 0);
212
75.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
75.0k
        encode_fixed32_le(&_buffer[0], _count);
222
75.0k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
75.0k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
75.0k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
75.0k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
75.0k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
75.0k
        return _buffer.build();
229
75.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
14.7k
    OwnedSlice _finish(int final_size_of_type) {
194
14.7k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
14.7k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
14.7k
        int padding_elems = num_elems_after_padding - _count;
199
14.7k
        int padding_bytes = padding_elems * final_size_of_type;
200
91.9k
        for (int i = 0; i < padding_bytes; i++) {
201
77.2k
            _data.push_back(0);
202
77.2k
        }
203
204
        // reserve enough place for compression
205
14.7k
        _buffer.resize(
206
14.7k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
14.7k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
14.7k
        int64_t bytes =
210
14.7k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
14.7k
                                         num_elems_after_padding, final_size_of_type, 0);
212
14.7k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
14.7k
        encode_fixed32_le(&_buffer[0], _count);
222
14.7k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
14.7k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
14.7k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
14.7k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
14.7k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
14.7k
        return _buffer.build();
229
14.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
723
    OwnedSlice _finish(int final_size_of_type) {
194
723
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
723
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
723
        int padding_elems = num_elems_after_padding - _count;
199
723
        int padding_bytes = padding_elems * final_size_of_type;
200
8.58k
        for (int i = 0; i < padding_bytes; i++) {
201
7.86k
            _data.push_back(0);
202
7.86k
        }
203
204
        // reserve enough place for compression
205
723
        _buffer.resize(
206
723
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
723
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
723
        int64_t bytes =
210
723
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
723
                                         num_elems_after_padding, final_size_of_type, 0);
212
723
        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
723
        encode_fixed32_le(&_buffer[0], _count);
222
723
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
723
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
723
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
723
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
723
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
723
        return _buffer.build();
229
723
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
23.6k
    OwnedSlice _finish(int final_size_of_type) {
194
23.6k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
23.6k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
23.6k
        int padding_elems = num_elems_after_padding - _count;
199
23.6k
        int padding_bytes = padding_elems * final_size_of_type;
200
993k
        for (int i = 0; i < padding_bytes; i++) {
201
969k
            _data.push_back(0);
202
969k
        }
203
204
        // reserve enough place for compression
205
23.6k
        _buffer.resize(
206
23.6k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
23.6k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
23.6k
        int64_t bytes =
210
23.6k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
23.6k
                                         num_elems_after_padding, final_size_of_type, 0);
212
23.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
23.6k
        encode_fixed32_le(&_buffer[0], _count);
222
23.6k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
23.6k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
23.6k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
23.6k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
23.6k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
23.6k
        return _buffer.build();
229
23.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
3.64k
    OwnedSlice _finish(int final_size_of_type) {
194
3.64k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
3.64k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
3.64k
        int padding_elems = num_elems_after_padding - _count;
199
3.64k
        int padding_bytes = padding_elems * final_size_of_type;
200
132k
        for (int i = 0; i < padding_bytes; i++) {
201
129k
            _data.push_back(0);
202
129k
        }
203
204
        // reserve enough place for compression
205
3.64k
        _buffer.resize(
206
3.64k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
3.64k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
3.64k
        int64_t bytes =
210
3.64k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
3.64k
                                         num_elems_after_padding, final_size_of_type, 0);
212
3.64k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
3.64k
        encode_fixed32_le(&_buffer[0], _count);
222
3.64k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
3.64k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
3.64k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
3.64k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
3.64k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
3.64k
        return _buffer.build();
229
3.64k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
414
    OwnedSlice _finish(int final_size_of_type) {
194
414
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
414
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
414
        int padding_elems = num_elems_after_padding - _count;
199
414
        int padding_bytes = padding_elems * final_size_of_type;
200
35.2k
        for (int i = 0; i < padding_bytes; i++) {
201
34.8k
            _data.push_back(0);
202
34.8k
        }
203
204
        // reserve enough place for compression
205
414
        _buffer.resize(
206
414
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
414
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
414
        int64_t bytes =
210
414
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
414
                                         num_elems_after_padding, final_size_of_type, 0);
212
414
        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
414
        encode_fixed32_le(&_buffer[0], _count);
222
414
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
414
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
414
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
414
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
414
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
414
        return _buffer.build();
229
414
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
566
    OwnedSlice _finish(int final_size_of_type) {
194
566
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
566
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
566
        int padding_elems = num_elems_after_padding - _count;
199
566
        int padding_bytes = padding_elems * final_size_of_type;
200
12.6k
        for (int i = 0; i < padding_bytes; i++) {
201
12.1k
            _data.push_back(0);
202
12.1k
        }
203
204
        // reserve enough place for compression
205
566
        _buffer.resize(
206
566
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
566
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
566
        int64_t bytes =
210
566
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
566
                                         num_elems_after_padding, final_size_of_type, 0);
212
566
        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
566
        encode_fixed32_le(&_buffer[0], _count);
222
566
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
566
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
566
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
566
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
566
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
566
        return _buffer.build();
229
566
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
554
    OwnedSlice _finish(int final_size_of_type) {
194
554
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
554
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
554
        int padding_elems = num_elems_after_padding - _count;
199
554
        int padding_bytes = padding_elems * final_size_of_type;
200
22.0k
        for (int i = 0; i < padding_bytes; i++) {
201
21.4k
            _data.push_back(0);
202
21.4k
        }
203
204
        // reserve enough place for compression
205
554
        _buffer.resize(
206
554
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
554
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
554
        int64_t bytes =
210
554
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
554
                                         num_elems_after_padding, final_size_of_type, 0);
212
554
        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
554
        encode_fixed32_le(&_buffer[0], _count);
222
554
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
554
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
554
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
554
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
554
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
554
        return _buffer.build();
229
554
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
4
    OwnedSlice _finish(int final_size_of_type) {
194
4
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
4
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
4
        int padding_elems = num_elems_after_padding - _count;
199
4
        int padding_bytes = padding_elems * final_size_of_type;
200
82
        for (int i = 0; i < padding_bytes; i++) {
201
78
            _data.push_back(0);
202
78
        }
203
204
        // reserve enough place for compression
205
4
        _buffer.resize(
206
4
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
4
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
4
        int64_t bytes =
210
4
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
4
                                         num_elems_after_padding, final_size_of_type, 0);
212
4
        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
4
        encode_fixed32_le(&_buffer[0], _count);
222
4
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
4
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
4
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
4
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
4
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
4
        return _buffer.build();
229
4
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
193
843
    OwnedSlice _finish(int final_size_of_type) {
194
843
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
843
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
843
        int padding_elems = num_elems_after_padding - _count;
199
843
        int padding_bytes = padding_elems * final_size_of_type;
200
20.0k
        for (int i = 0; i < padding_bytes; i++) {
201
19.1k
            _data.push_back(0);
202
19.1k
        }
203
204
        // reserve enough place for compression
205
843
        _buffer.resize(
206
843
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
843
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
843
        int64_t bytes =
210
843
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
843
                                         num_elems_after_padding, final_size_of_type, 0);
212
843
        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
843
        encode_fixed32_le(&_buffer[0], _count);
222
843
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
843
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
843
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
843
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
843
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
843
        return _buffer.build();
229
843
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
193
3.55k
    OwnedSlice _finish(int final_size_of_type) {
194
3.55k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
3.55k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
3.55k
        int padding_elems = num_elems_after_padding - _count;
199
3.55k
        int padding_bytes = padding_elems * final_size_of_type;
200
155k
        for (int i = 0; i < padding_bytes; i++) {
201
151k
            _data.push_back(0);
202
151k
        }
203
204
        // reserve enough place for compression
205
3.55k
        _buffer.resize(
206
3.55k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
3.55k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
3.55k
        int64_t bytes =
210
3.55k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
3.55k
                                         num_elems_after_padding, final_size_of_type, 0);
212
3.55k
        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
3.55k
        encode_fixed32_le(&_buffer[0], _count);
222
3.55k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
3.55k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
3.55k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
3.55k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
3.55k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
3.55k
        return _buffer.build();
229
3.55k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
193
19
    OwnedSlice _finish(int final_size_of_type) {
194
19
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
19
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
19
        int padding_elems = num_elems_after_padding - _count;
199
19
        int padding_bytes = padding_elems * final_size_of_type;
200
883
        for (int i = 0; i < padding_bytes; i++) {
201
864
            _data.push_back(0);
202
864
        }
203
204
        // reserve enough place for compression
205
19
        _buffer.resize(
206
19
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
19
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
19
        int64_t bytes =
210
19
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
19
                                         num_elems_after_padding, final_size_of_type, 0);
212
19
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
19
        encode_fixed32_le(&_buffer[0], _count);
222
19
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
19
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
19
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
19
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
19
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
19
        return _buffer.build();
229
19
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
193
2
    OwnedSlice _finish(int final_size_of_type) {
194
2
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
2
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
2
        int padding_elems = num_elems_after_padding - _count;
199
2
        int padding_bytes = padding_elems * final_size_of_type;
200
170
        for (int i = 0; i < padding_bytes; i++) {
201
168
            _data.push_back(0);
202
168
        }
203
204
        // reserve enough place for compression
205
2
        _buffer.resize(
206
2
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
2
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
2
        int64_t bytes =
210
2
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
2
                                         num_elems_after_padding, final_size_of_type, 0);
212
2
        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
2
        encode_fixed32_le(&_buffer[0], _count);
222
2
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
2
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
2
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
2
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
2
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
2
        return _buffer.build();
229
2
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
193
242
    OwnedSlice _finish(int final_size_of_type) {
194
242
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
242
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
242
        int padding_elems = num_elems_after_padding - _count;
199
242
        int padding_bytes = padding_elems * final_size_of_type;
200
5.45k
        for (int i = 0; i < padding_bytes; i++) {
201
5.20k
            _data.push_back(0);
202
5.20k
        }
203
204
        // reserve enough place for compression
205
242
        _buffer.resize(
206
242
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
242
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
242
        int64_t bytes =
210
242
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
242
                                         num_elems_after_padding, final_size_of_type, 0);
212
242
        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
242
        encode_fixed32_le(&_buffer[0], _count);
222
242
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
242
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
242
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
242
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
242
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
242
        return _buffer.build();
229
242
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
444
    OwnedSlice _finish(int final_size_of_type) {
194
444
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
444
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
444
        int padding_elems = num_elems_after_padding - _count;
199
444
        int padding_bytes = padding_elems * final_size_of_type;
200
18.3k
        for (int i = 0; i < padding_bytes; i++) {
201
17.8k
            _data.push_back(0);
202
17.8k
        }
203
204
        // reserve enough place for compression
205
444
        _buffer.resize(
206
444
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
444
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
444
        int64_t bytes =
210
444
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
444
                                         num_elems_after_padding, final_size_of_type, 0);
212
444
        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
444
        encode_fixed32_le(&_buffer[0], _count);
222
444
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
444
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
444
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
444
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
444
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
444
        return _buffer.build();
229
444
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
193
442
    OwnedSlice _finish(int final_size_of_type) {
194
442
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
442
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
442
        int padding_elems = num_elems_after_padding - _count;
199
442
        int padding_bytes = padding_elems * final_size_of_type;
200
40.9k
        for (int i = 0; i < padding_bytes; i++) {
201
40.5k
            _data.push_back(0);
202
40.5k
        }
203
204
        // reserve enough place for compression
205
442
        _buffer.resize(
206
442
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
442
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
442
        int64_t bytes =
210
442
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
442
                                         num_elems_after_padding, final_size_of_type, 0);
212
442
        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
442
        encode_fixed32_le(&_buffer[0], _count);
222
442
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
442
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
442
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
442
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
442
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
442
        return _buffer.build();
229
442
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE7_finishEi
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
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
309k
                                       int& size_of_element) {
253
309k
    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
309k
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
309k
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
309k
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
309k
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
309k
    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
309k
    switch (size_of_element) {
271
63.8k
    case 1:
272
66.1k
    case 2:
273
66.1k
    case 3:
274
239k
    case 4:
275
305k
    case 8:
276
306k
    case 12:
277
309k
    case 16:
278
309k
    case 32:
279
309k
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
309k
    }
283
309k
    return Status::OK();
284
309k
}
285
286
template <FieldType Type>
287
class BitShufflePageDecoder : public PageDecoder {
288
public:
289
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
290
165k
            : _data(data),
291
165k
              _options(options),
292
165k
              _parsed(false),
293
165k
              _num_elements(0),
294
165k
              _num_element_after_padding(0),
295
165k
              _size_of_element(0),
296
165k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
86.1k
            : _data(data),
291
86.1k
              _options(options),
292
86.1k
              _parsed(false),
293
86.1k
              _num_elements(0),
294
86.1k
              _num_element_after_padding(0),
295
86.1k
              _size_of_element(0),
296
86.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
40.1k
            : _data(data),
291
40.1k
              _options(options),
292
40.1k
              _parsed(false),
293
40.1k
              _num_elements(0),
294
40.1k
              _num_element_after_padding(0),
295
40.1k
              _size_of_element(0),
296
40.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.14k
            : _data(data),
291
1.14k
              _options(options),
292
1.14k
              _parsed(false),
293
1.14k
              _num_elements(0),
294
1.14k
              _num_element_after_padding(0),
295
1.14k
              _size_of_element(0),
296
1.14k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
23.9k
            : _data(data),
291
23.9k
              _options(options),
292
23.9k
              _parsed(false),
293
23.9k
              _num_elements(0),
294
23.9k
              _num_element_after_padding(0),
295
23.9k
              _size_of_element(0),
296
23.9k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
3.70k
            : _data(data),
291
3.70k
              _options(options),
292
3.70k
              _parsed(false),
293
3.70k
              _num_elements(0),
294
3.70k
              _num_element_after_padding(0),
295
3.70k
              _size_of_element(0),
296
3.70k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
794
            : _data(data),
291
794
              _options(options),
292
794
              _parsed(false),
293
794
              _num_elements(0),
294
794
              _num_element_after_padding(0),
295
794
              _size_of_element(0),
296
794
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
875
            : _data(data),
291
875
              _options(options),
292
875
              _parsed(false),
293
875
              _num_elements(0),
294
875
              _num_element_after_padding(0),
295
875
              _size_of_element(0),
296
875
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
858
            : _data(data),
291
858
              _options(options),
292
858
              _parsed(false),
293
858
              _num_elements(0),
294
858
              _num_element_after_padding(0),
295
858
              _size_of_element(0),
296
858
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
8
            : _data(data),
291
8
              _options(options),
292
8
              _parsed(false),
293
8
              _num_elements(0),
294
8
              _num_element_after_padding(0),
295
8
              _size_of_element(0),
296
8
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.49k
            : _data(data),
291
1.49k
              _options(options),
292
1.49k
              _parsed(false),
293
1.49k
              _num_elements(0),
294
1.49k
              _num_element_after_padding(0),
295
1.49k
              _size_of_element(0),
296
1.49k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
4.48k
            : _data(data),
291
4.48k
              _options(options),
292
4.48k
              _parsed(false),
293
4.48k
              _num_elements(0),
294
4.48k
              _num_element_after_padding(0),
295
4.48k
              _size_of_element(0),
296
4.48k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
173
            : _data(data),
291
173
              _options(options),
292
173
              _parsed(false),
293
173
              _num_elements(0),
294
173
              _num_element_after_padding(0),
295
173
              _size_of_element(0),
296
173
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
4
            : _data(data),
291
4
              _options(options),
292
4
              _parsed(false),
293
4
              _num_elements(0),
294
4
              _num_element_after_padding(0),
295
4
              _size_of_element(0),
296
4
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
442
            : _data(data),
291
442
              _options(options),
292
442
              _parsed(false),
293
442
              _num_elements(0),
294
442
              _num_element_after_padding(0),
295
442
              _size_of_element(0),
296
442
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
640
            : _data(data),
291
640
              _options(options),
292
640
              _parsed(false),
293
640
              _num_elements(0),
294
640
              _num_element_after_padding(0),
295
640
              _size_of_element(0),
296
640
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
836
            : _data(data),
291
836
              _options(options),
292
836
              _parsed(false),
293
836
              _num_elements(0),
294
836
              _num_element_after_padding(0),
295
836
              _size_of_element(0),
296
836
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
297
298
165k
    Status init() override {
299
165k
        CHECK(!_parsed);
300
165k
        size_t unused;
301
165k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
165k
                                                 _num_element_after_padding, _size_of_element));
303
304
165k
        if (_data.size !=
305
165k
            _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
165k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
165k
                     _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
165k
        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
165k
        _parsed = true;
325
165k
        return Status::OK();
326
165k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
298
86.1k
    Status init() override {
299
86.1k
        CHECK(!_parsed);
300
86.1k
        size_t unused;
301
86.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
86.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
86.1k
        if (_data.size !=
305
86.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
86.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
86.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
86.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
86.1k
        _parsed = true;
325
86.1k
        return Status::OK();
326
86.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
40.1k
    Status init() override {
299
40.1k
        CHECK(!_parsed);
300
40.1k
        size_t unused;
301
40.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
40.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
40.1k
        if (_data.size !=
305
40.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
40.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
40.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
40.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
40.1k
        _parsed = true;
325
40.1k
        return Status::OK();
326
40.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
1.14k
    Status init() override {
299
1.14k
        CHECK(!_parsed);
300
1.14k
        size_t unused;
301
1.14k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.14k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.14k
        if (_data.size !=
305
1.14k
            _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.14k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.14k
                     _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.14k
        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.14k
        _parsed = true;
325
1.14k
        return Status::OK();
326
1.14k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
23.9k
    Status init() override {
299
23.9k
        CHECK(!_parsed);
300
23.9k
        size_t unused;
301
23.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
23.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
23.9k
        if (_data.size !=
305
23.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
23.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
23.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
23.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
23.9k
        _parsed = true;
325
23.9k
        return Status::OK();
326
23.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
298
3.70k
    Status init() override {
299
3.70k
        CHECK(!_parsed);
300
3.70k
        size_t unused;
301
3.70k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
3.70k
                                                 _num_element_after_padding, _size_of_element));
303
304
3.70k
        if (_data.size !=
305
3.70k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
3.70k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
3.70k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
3.70k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
3.70k
        _parsed = true;
325
3.70k
        return Status::OK();
326
3.70k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
298
794
    Status init() override {
299
794
        CHECK(!_parsed);
300
794
        size_t unused;
301
794
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
794
                                                 _num_element_after_padding, _size_of_element));
303
304
794
        if (_data.size !=
305
794
            _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
794
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
794
                     _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
794
        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
794
        _parsed = true;
325
794
        return Status::OK();
326
794
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
298
875
    Status init() override {
299
875
        CHECK(!_parsed);
300
875
        size_t unused;
301
875
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
875
                                                 _num_element_after_padding, _size_of_element));
303
304
875
        if (_data.size !=
305
875
            _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
875
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
875
                     _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
875
        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
875
        _parsed = true;
325
875
        return Status::OK();
326
875
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
298
858
    Status init() override {
299
858
        CHECK(!_parsed);
300
858
        size_t unused;
301
858
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
858
                                                 _num_element_after_padding, _size_of_element));
303
304
858
        if (_data.size !=
305
858
            _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
858
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
858
                     _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
858
        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
858
        _parsed = true;
325
858
        return Status::OK();
326
858
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
8
    Status init() override {
299
8
        CHECK(!_parsed);
300
8
        size_t unused;
301
8
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
8
                                                 _num_element_after_padding, _size_of_element));
303
304
8
        if (_data.size !=
305
8
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
8
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
8
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
8
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
8
        _parsed = true;
325
8
        return Status::OK();
326
8
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
1.49k
    Status init() override {
299
1.49k
        CHECK(!_parsed);
300
1.49k
        size_t unused;
301
1.49k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.49k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.49k
        if (_data.size !=
305
1.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
1.49k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.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
1.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
1.49k
        _parsed = true;
325
1.49k
        return Status::OK();
326
1.49k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
298
4.48k
    Status init() override {
299
4.48k
        CHECK(!_parsed);
300
4.48k
        size_t unused;
301
4.48k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
4.48k
                                                 _num_element_after_padding, _size_of_element));
303
304
4.48k
        if (_data.size !=
305
4.48k
            _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
4.48k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
4.48k
                     _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
4.48k
        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
4.48k
        _parsed = true;
325
4.48k
        return Status::OK();
326
4.48k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
298
173
    Status init() override {
299
173
        CHECK(!_parsed);
300
173
        size_t unused;
301
173
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
173
                                                 _num_element_after_padding, _size_of_element));
303
304
173
        if (_data.size !=
305
173
            _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
173
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
173
                     _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
173
        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
173
        _parsed = true;
325
173
        return Status::OK();
326
173
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
298
4
    Status init() override {
299
4
        CHECK(!_parsed);
300
4
        size_t unused;
301
4
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
4
                                                 _num_element_after_padding, _size_of_element));
303
304
4
        if (_data.size !=
305
4
            _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
4
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
4
                     _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
4
        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
4
        _parsed = true;
325
4
        return Status::OK();
326
4
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
298
442
    Status init() override {
299
442
        CHECK(!_parsed);
300
442
        size_t unused;
301
442
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
442
                                                 _num_element_after_padding, _size_of_element));
303
304
442
        if (_data.size !=
305
442
            _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
442
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
442
                     _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
442
        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
442
        _parsed = true;
325
442
        return Status::OK();
326
442
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
298
640
    Status init() override {
299
640
        CHECK(!_parsed);
300
640
        size_t unused;
301
640
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
640
                                                 _num_element_after_padding, _size_of_element));
303
304
640
        if (_data.size !=
305
640
            _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
640
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
640
                     _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
640
        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
640
        _parsed = true;
325
640
        return Status::OK();
326
640
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
298
836
    Status init() override {
299
836
        CHECK(!_parsed);
300
836
        size_t unused;
301
836
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
836
                                                 _num_element_after_padding, _size_of_element));
303
304
836
        if (_data.size !=
305
836
            _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
836
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
836
                     _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
836
        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
836
        _parsed = true;
325
836
        return Status::OK();
326
836
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
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
33.1k
    Status seek_to_position_in_page(size_t pos) override {
335
33.1k
        DCHECK(_parsed) << "Must call init()";
336
33.1k
        if (_num_elements == 0) [[unlikely]] {
337
1.69k
            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.69k
        }
342
343
33.1k
        DCHECK_LE(pos, _num_elements);
344
33.1k
        _cur_index = pos;
345
33.1k
        return Status::OK();
346
33.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
14.1k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
14.1k
        if (_num_elements == 0) [[unlikely]] {
337
314
            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
314
        }
342
343
14.1k
        DCHECK_LE(pos, _num_elements);
344
14.1k
        _cur_index = pos;
345
14.1k
        return Status::OK();
346
14.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
6.53k
    Status seek_to_position_in_page(size_t pos) override {
335
6.53k
        DCHECK(_parsed) << "Must call init()";
336
6.53k
        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
6.53k
        DCHECK_LE(pos, _num_elements);
344
6.53k
        _cur_index = pos;
345
6.53k
        return Status::OK();
346
6.53k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
2.89k
    Status seek_to_position_in_page(size_t pos) override {
335
2.89k
        DCHECK(_parsed) << "Must call init()";
336
2.89k
        if (_num_elements == 0) [[unlikely]] {
337
1.35k
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
1.35k
        }
342
343
2.89k
        DCHECK_LE(pos, _num_elements);
344
2.89k
        _cur_index = pos;
345
2.89k
        return Status::OK();
346
2.89k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
540
    Status seek_to_position_in_page(size_t pos) override {
335
540
        DCHECK(_parsed) << "Must call init()";
336
540
        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
540
        DCHECK_LE(pos, _num_elements);
344
540
        _cur_index = pos;
345
540
        return Status::OK();
346
540
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
334
31
    Status seek_to_position_in_page(size_t pos) override {
335
31
        DCHECK(_parsed) << "Must call init()";
336
31
        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
31
        DCHECK_LE(pos, _num_elements);
344
31
        _cur_index = pos;
345
31
        return Status::OK();
346
31
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
334
232
    Status seek_to_position_in_page(size_t pos) override {
335
232
        DCHECK(_parsed) << "Must call init()";
336
232
        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
232
        DCHECK_LE(pos, _num_elements);
344
232
        _cur_index = pos;
345
232
        return Status::OK();
346
232
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
12
    Status seek_to_position_in_page(size_t pos) override {
335
12
        DCHECK(_parsed) << "Must call init()";
336
12
        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
12
        DCHECK_LE(pos, _num_elements);
344
12
        _cur_index = pos;
345
12
        return Status::OK();
346
12
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
334
8.23k
    Status seek_to_position_in_page(size_t pos) override {
335
8.23k
        DCHECK(_parsed) << "Must call init()";
336
8.23k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
8.23k
        DCHECK_LE(pos, _num_elements);
344
8.23k
        _cur_index = pos;
345
8.23k
        return Status::OK();
346
8.23k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
334
362
    Status seek_to_position_in_page(size_t pos) override {
335
362
        DCHECK(_parsed) << "Must call init()";
336
362
        if (_num_elements == 0) [[unlikely]] {
337
4
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
4
        }
342
343
362
        DCHECK_LE(pos, _num_elements);
344
362
        _cur_index = pos;
345
362
        return Status::OK();
346
362
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
181
    Status seek_to_position_in_page(size_t pos) override {
335
181
        DCHECK(_parsed) << "Must call init()";
336
181
        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
181
        DCHECK_LE(pos, _num_elements);
344
181
        _cur_index = pos;
345
181
        return Status::OK();
346
181
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE24seek_to_position_in_pageEm
347
348
0
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
349
0
        DCHECK(_parsed) << "Must call init() firstly";
350
351
0
        if (_num_elements == 0) {
352
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
353
0
        }
354
355
0
        size_t left = 0;
356
0
        size_t right = _num_elements;
357
358
0
        void* mid_value = nullptr;
359
360
        // find the first value >= target. after loop,
361
        // - left == index of first value >= target when found
362
        // - left == _num_elements when not found (all values < target)
363
0
        while (left < right) {
364
0
            size_t mid = left + (right - left) / 2;
365
0
            mid_value = get_data(mid);
366
0
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
367
0
                left = mid + 1;
368
0
            } else {
369
0
                right = mid;
370
0
            }
371
0
        }
372
0
        if (left >= _num_elements) {
373
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
374
0
        }
375
0
        void* find_value = get_data(left);
376
0
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
377
0
            *exact_match = true;
378
0
        } else {
379
0
            *exact_match = false;
380
0
        }
381
382
0
        _cur_index = left;
383
0
        return Status::OK();
384
0
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE22seek_at_or_after_valueEPKvPb
385
386
    template <bool forward_index = true>
387
103k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
103k
        DCHECK(_parsed);
389
103k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
103k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
103k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
103k
        *n = max_fetch;
398
103k
        if constexpr (forward_index) {
399
100k
            _cur_index += max_fetch;
400
100k
        }
401
402
103k
        return Status::OK();
403
103k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
28.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
28.4k
        DCHECK(_parsed);
389
28.4k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
28.4k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
28.4k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
28.4k
        *n = max_fetch;
398
28.4k
        if constexpr (forward_index) {
399
28.4k
            _cur_index += max_fetch;
400
28.4k
        }
401
402
28.4k
        return Status::OK();
403
28.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
30.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
30.1k
        DCHECK(_parsed);
389
30.1k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
30.1k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
30.1k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
30.1k
        *n = max_fetch;
398
30.1k
        if constexpr (forward_index) {
399
30.1k
            _cur_index += max_fetch;
400
30.1k
        }
401
402
30.1k
        return Status::OK();
403
30.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
1.99k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.99k
        DCHECK(_parsed);
389
1.99k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.99k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
1.99k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.99k
        *n = max_fetch;
398
1.99k
        if constexpr (forward_index) {
399
1.99k
            _cur_index += max_fetch;
400
1.99k
        }
401
402
1.99k
        return Status::OK();
403
1.99k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
20.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
20.1k
        DCHECK(_parsed);
389
20.1k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
20.1k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
20.1k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
20.1k
        *n = max_fetch;
398
20.1k
        if constexpr (forward_index) {
399
20.1k
            _cur_index += max_fetch;
400
20.1k
        }
401
402
20.1k
        return Status::OK();
403
20.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.79k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.79k
        DCHECK(_parsed);
389
3.79k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.79k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
3.79k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.79k
        *n = max_fetch;
398
3.79k
        if constexpr (forward_index) {
399
3.79k
            _cur_index += max_fetch;
400
3.79k
        }
401
402
3.79k
        return Status::OK();
403
3.79k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.62k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.62k
        DCHECK(_parsed);
389
3.62k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.62k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
3.62k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.62k
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
3.62k
        return Status::OK();
403
3.62k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
548
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
548
        DCHECK(_parsed);
389
548
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
548
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
548
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
548
        *n = max_fetch;
398
548
        if constexpr (forward_index) {
399
548
            _cur_index += max_fetch;
400
548
        }
401
402
548
        return Status::OK();
403
548
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
523
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
523
        DCHECK(_parsed);
389
523
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
523
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
523
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
523
        *n = max_fetch;
398
523
        if constexpr (forward_index) {
399
523
            _cur_index += max_fetch;
400
523
        }
401
402
523
        return Status::OK();
403
523
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
600
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
600
        DCHECK(_parsed);
389
600
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
600
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
600
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
600
        *n = max_fetch;
398
600
        if constexpr (forward_index) {
399
600
            _cur_index += max_fetch;
400
600
        }
401
402
600
        return Status::OK();
403
600
    }
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
4
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
4
        DCHECK(_parsed);
389
4
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
4
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
4
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
4
        *n = max_fetch;
398
4
        if constexpr (forward_index) {
399
4
            _cur_index += max_fetch;
400
4
        }
401
402
4
        return Status::OK();
403
4
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
10.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
10.6k
        DCHECK(_parsed);
389
10.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
10.6k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
10.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
10.6k
        *n = max_fetch;
398
10.6k
        if constexpr (forward_index) {
399
10.6k
            _cur_index += max_fetch;
400
10.6k
        }
401
402
10.6k
        return Status::OK();
403
10.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
2.35k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
2.35k
        DCHECK(_parsed);
389
2.35k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
2.35k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
2.35k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
2.35k
        *n = max_fetch;
398
2.35k
        if constexpr (forward_index) {
399
2.35k
            _cur_index += max_fetch;
400
2.35k
        }
401
402
2.35k
        return Status::OK();
403
2.35k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
229
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
229
        DCHECK(_parsed);
389
229
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
229
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
229
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
229
        *n = max_fetch;
398
229
        if constexpr (forward_index) {
399
229
            _cur_index += max_fetch;
400
229
        }
401
402
229
        return Status::OK();
403
229
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
2
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
2
        DCHECK(_parsed);
389
2
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
2
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
2
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
2
        *n = max_fetch;
398
2
        if constexpr (forward_index) {
399
2
            _cur_index += max_fetch;
400
2
        }
401
402
2
        return Status::OK();
403
2
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
74
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
74
        DCHECK(_parsed);
389
74
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
74
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
74
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
74
        *n = max_fetch;
398
74
        if constexpr (forward_index) {
399
74
            _cur_index += max_fetch;
400
74
        }
401
402
74
        return Status::OK();
403
74
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
312
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
312
        DCHECK(_parsed);
389
312
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
312
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
312
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
312
        *n = max_fetch;
398
312
        if constexpr (forward_index) {
399
312
            _cur_index += max_fetch;
400
312
        }
401
402
312
        return Status::OK();
403
312
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
238
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
238
        DCHECK(_parsed);
389
238
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
238
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
238
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
238
        *n = max_fetch;
398
238
        if constexpr (forward_index) {
399
238
            _cur_index += max_fetch;
400
238
        }
401
402
238
        return Status::OK();
403
238
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
404
405
100k
    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
28.4k
    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
30.1k
    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
1.99k
    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
20.1k
    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
3.79k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
548
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
523
    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
600
    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
4
    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
10.6k
    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
2.35k
    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
229
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
2
    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
74
    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
312
    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
238
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
406
407
    Status read_by_rowids(const rowid_t* rowids, ordinal_t page_first_ordinal, size_t* n,
408
48.3k
                          MutableColumnPtr& dst) override {
409
48.3k
        DCHECK(_parsed);
410
48.3k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
48.3k
        auto total = *n;
416
48.3k
        auto read_count = 0;
417
48.3k
        _buffer.resize(total);
418
3.51M
        for (size_t i = 0; i < total; ++i) {
419
3.46M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
3.46M
            if (UNLIKELY(ord >= _num_elements)) {
421
9
                break;
422
9
            }
423
424
3.46M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
3.46M
        }
426
427
48.3k
        if (LIKELY(read_count > 0)) {
428
48.3k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
48.3k
        }
430
431
48.3k
        *n = read_count;
432
48.3k
        return Status::OK();
433
48.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.5k
                          MutableColumnPtr& dst) override {
409
13.5k
        DCHECK(_parsed);
410
13.5k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.5k
        auto total = *n;
416
13.5k
        auto read_count = 0;
417
13.5k
        _buffer.resize(total);
418
2.84M
        for (size_t i = 0; i < total; ++i) {
419
2.83M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
2.83M
            if (UNLIKELY(ord >= _num_elements)) {
421
9
                break;
422
9
            }
423
424
2.83M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
2.83M
        }
426
427
13.5k
        if (LIKELY(read_count > 0)) {
428
13.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.5k
        }
430
431
13.5k
        *n = read_count;
432
13.5k
        return Status::OK();
433
13.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
17.4k
                          MutableColumnPtr& dst) override {
409
17.4k
        DCHECK(_parsed);
410
17.4k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
17.4k
        auto total = *n;
416
17.4k
        auto read_count = 0;
417
17.4k
        _buffer.resize(total);
418
589k
        for (size_t i = 0; i < total; ++i) {
419
572k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
572k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
572k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
572k
        }
426
427
17.4k
        if (LIKELY(read_count > 0)) {
428
17.4k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
17.4k
        }
430
431
17.4k
        *n = read_count;
432
17.4k
        return Status::OK();
433
17.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
544
                          MutableColumnPtr& dst) override {
409
544
        DCHECK(_parsed);
410
544
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
544
        auto total = *n;
416
544
        auto read_count = 0;
417
544
        _buffer.resize(total);
418
1.10k
        for (size_t i = 0; i < total; ++i) {
419
556
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
556
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
556
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
556
        }
426
427
544
        if (LIKELY(read_count > 0)) {
428
544
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
544
        }
430
431
544
        *n = read_count;
432
544
        return Status::OK();
433
544
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
10.9k
                          MutableColumnPtr& dst) override {
409
10.9k
        DCHECK(_parsed);
410
10.9k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
10.9k
        auto total = *n;
416
10.9k
        auto read_count = 0;
417
10.9k
        _buffer.resize(total);
418
25.3k
        for (size_t i = 0; i < total; ++i) {
419
14.4k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.4k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
14.4k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.4k
        }
426
427
10.9k
        if (LIKELY(read_count > 0)) {
428
10.9k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
10.9k
        }
430
431
10.9k
        *n = read_count;
432
10.9k
        return Status::OK();
433
10.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
526
                          MutableColumnPtr& dst) override {
409
526
        DCHECK(_parsed);
410
526
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
526
        auto total = *n;
416
526
        auto read_count = 0;
417
526
        _buffer.resize(total);
418
6.75k
        for (size_t i = 0; i < total; ++i) {
419
6.22k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
6.22k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
6.22k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
6.22k
        }
426
427
526
        if (LIKELY(read_count > 0)) {
428
526
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
526
        }
430
431
526
        *n = read_count;
432
526
        return Status::OK();
433
526
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
332
                          MutableColumnPtr& dst) override {
409
332
        DCHECK(_parsed);
410
332
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
332
        auto total = *n;
416
332
        auto read_count = 0;
417
332
        _buffer.resize(total);
418
664
        for (size_t i = 0; i < total; ++i) {
419
332
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
332
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
332
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
332
        }
426
427
332
        if (LIKELY(read_count > 0)) {
428
332
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
332
        }
430
431
332
        *n = read_count;
432
332
        return Status::OK();
433
332
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
278
                          MutableColumnPtr& dst) override {
409
278
        DCHECK(_parsed);
410
278
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
278
        auto total = *n;
416
278
        auto read_count = 0;
417
278
        _buffer.resize(total);
418
574
        for (size_t i = 0; i < total; ++i) {
419
296
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
296
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
296
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
296
        }
426
427
278
        if (LIKELY(read_count > 0)) {
428
278
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
278
        }
430
431
278
        *n = read_count;
432
278
        return Status::OK();
433
278
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
258
                          MutableColumnPtr& dst) override {
409
258
        DCHECK(_parsed);
410
258
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
258
        auto total = *n;
416
258
        auto read_count = 0;
417
258
        _buffer.resize(total);
418
516
        for (size_t i = 0; i < total; ++i) {
419
258
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
258
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
258
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
258
        }
426
427
258
        if (LIKELY(read_count > 0)) {
428
258
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
258
        }
430
431
258
        *n = read_count;
432
258
        return Status::OK();
433
258
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4
                          MutableColumnPtr& dst) override {
409
4
        DCHECK(_parsed);
410
4
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4
        auto total = *n;
416
4
        auto read_count = 0;
417
4
        _buffer.resize(total);
418
8
        for (size_t i = 0; i < total; ++i) {
419
4
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
4
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
4
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
4
        }
426
427
4
        if (LIKELY(read_count > 0)) {
428
4
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4
        }
430
431
4
        *n = read_count;
432
4
        return Status::OK();
433
4
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
848
                          MutableColumnPtr& dst) override {
409
848
        DCHECK(_parsed);
410
848
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
848
        auto total = *n;
416
848
        auto read_count = 0;
417
848
        _buffer.resize(total);
418
1.72k
        for (size_t i = 0; i < total; ++i) {
419
880
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
880
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
880
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
880
        }
426
427
848
        if (LIKELY(read_count > 0)) {
428
848
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
848
        }
430
431
848
        *n = read_count;
432
848
        return Status::OK();
433
848
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
2.37k
                          MutableColumnPtr& dst) override {
409
2.37k
        DCHECK(_parsed);
410
2.37k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
2.37k
        auto total = *n;
416
2.37k
        auto read_count = 0;
417
2.37k
        _buffer.resize(total);
418
42.3k
        for (size_t i = 0; i < total; ++i) {
419
39.9k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
39.9k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
39.9k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
39.9k
        }
426
427
2.37k
        if (LIKELY(read_count > 0)) {
428
2.37k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
2.37k
        }
430
431
2.37k
        *n = read_count;
432
2.37k
        return Status::OK();
433
2.37k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
60
                          MutableColumnPtr& dst) override {
409
60
        DCHECK(_parsed);
410
60
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
60
        auto total = *n;
416
60
        auto read_count = 0;
417
60
        _buffer.resize(total);
418
152
        for (size_t i = 0; i < total; ++i) {
419
92
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
92
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
92
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
92
        }
426
427
60
        if (LIKELY(read_count > 0)) {
428
60
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
60
        }
430
431
60
        *n = read_count;
432
60
        return Status::OK();
433
60
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
2
                          MutableColumnPtr& dst) override {
409
2
        DCHECK(_parsed);
410
2
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
2
        auto total = *n;
416
2
        auto read_count = 0;
417
2
        _buffer.resize(total);
418
4
        for (size_t i = 0; i < total; ++i) {
419
2
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
2
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
2
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
2
        }
426
427
2
        if (LIKELY(read_count > 0)) {
428
2
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
2
        }
430
431
2
        *n = read_count;
432
2
        return Status::OK();
433
2
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
312
                          MutableColumnPtr& dst) override {
409
312
        DCHECK(_parsed);
410
312
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
312
        auto total = *n;
416
312
        auto read_count = 0;
417
312
        _buffer.resize(total);
418
624
        for (size_t i = 0; i < total; ++i) {
419
312
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
312
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
312
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
312
        }
426
427
312
        if (LIKELY(read_count > 0)) {
428
312
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
312
        }
430
431
312
        *n = read_count;
432
312
        return Status::OK();
433
312
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
272
                          MutableColumnPtr& dst) override {
409
272
        DCHECK(_parsed);
410
272
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
272
        auto total = *n;
416
272
        auto read_count = 0;
417
272
        _buffer.resize(total);
418
544
        for (size_t i = 0; i < total; ++i) {
419
272
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
272
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
272
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
272
        }
426
427
272
        if (LIKELY(read_count > 0)) {
428
272
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
272
        }
430
431
272
        *n = read_count;
432
272
        return Status::OK();
433
272
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
528
                          MutableColumnPtr& dst) override {
409
528
        DCHECK(_parsed);
410
528
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
528
        auto total = *n;
416
528
        auto read_count = 0;
417
528
        _buffer.resize(total);
418
1.05k
        for (size_t i = 0; i < total; ++i) {
419
528
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
528
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
528
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
528
        }
426
427
528
        if (LIKELY(read_count > 0)) {
428
528
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
528
        }
430
431
528
        *n = read_count;
432
528
        return Status::OK();
433
528
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
434
435
3.62k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
3.62k
        return next_batch<false>(n, dst);
437
3.62k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
435
3.62k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
3.62k
        return next_batch<false>(n, dst);
437
3.62k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
438
439
3
    size_t count() const override { return _num_elements; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
439
3
    size_t count() const override { return _num_elements; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE5countEv
440
441
10.9k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
9.19k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
441
130
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
441
134
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
556
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
441
92
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE13current_indexEv
Line
Count
Source
441
76
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
108
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
441
102
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
441
164
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
441
172
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE13current_indexEv
Line
Count
Source
441
64
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
441
74
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
441
68
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
442
443
3.64M
    char* get_data(size_t index) const {
444
3.64M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
3.64M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
2.92M
    char* get_data(size_t index) const {
444
2.92M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
2.92M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
602k
    char* get_data(size_t index) const {
444
602k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
602k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
443
2.55k
    char* get_data(size_t index) const {
444
2.55k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
2.55k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
443
34.6k
    char* get_data(size_t index) const {
444
34.6k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
34.6k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
13.6k
    char* get_data(size_t index) const {
444
13.6k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
13.6k
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
880
    char* get_data(size_t index) const {
444
880
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
880
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
819
    char* get_data(size_t index) const {
444
819
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
819
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
858
    char* get_data(size_t index) const {
444
858
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
858
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
8
    char* get_data(size_t index) const {
444
8
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
8
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
11.5k
    char* get_data(size_t index) const {
444
11.5k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
11.5k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
443
42.3k
    char* get_data(size_t index) const {
444
42.3k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
42.3k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
443
321
    char* get_data(size_t index) const {
444
321
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
321
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
443
4
    char* get_data(size_t index) const {
444
4
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
4
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
443
386
    char* get_data(size_t index) const {
444
386
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
386
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
443
584
    char* get_data(size_t index) const {
444
584
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
584
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
766
    char* get_data(size_t index) const {
444
766
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
766
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
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