Coverage Report

Created: 2026-10-14 05:39

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
19.2k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
13.7k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
877
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
95
30
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
95
52
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
141
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
1.64k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
119
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
108
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
95
934
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
Line
Count
Source
95
1
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
Line
Count
Source
95
2
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
146
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
150
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
95
143
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE4initEv
Line
Count
Source
95
2
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
153
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
95
142
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
95
138
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
95
138
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
95
138
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
95
139
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
95
138
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
95
138
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE4initEv
Line
Count
Source
95
3
    Status init() override { return reset(); }
96
97
2.03M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
2.00M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
13.0k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12is_page_fullEv
Line
Count
Source
97
88
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
97
110
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
97
207
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
4.15k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
222
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
179
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
974
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12is_page_fullEv
Line
Count
Source
97
194
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12is_page_fullEv
Line
Count
Source
97
229
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
215
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
210
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE12is_page_fullEv
Line
Count
Source
97
60
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
97
220
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
Line
Count
Source
97
209
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
97
199
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
201
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
97
209
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Line
Count
Source
97
226
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Line
Count
Source
97
199
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
97
209
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE12is_page_fullEv
Line
Count
Source
97
70
    bool is_page_full() override { return _remain_element_capacity == 0; }
98
99
689k
    Status add(const uint8_t* vals, size_t* count) override {
100
689k
        return add_internal<false>(vals, count);
101
689k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
99
668k
    Status add(const uint8_t* vals, size_t* count) override {
100
668k
        return add_internal<false>(vals, count);
101
668k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
13.0k
    Status add(const uint8_t* vals, size_t* count) override {
100
13.0k
        return add_internal<false>(vals, count);
101
13.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
99
90
    Status add(const uint8_t* vals, size_t* count) override {
100
90
        return add_internal<false>(vals, count);
101
90
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
99
114
    Status add(const uint8_t* vals, size_t* count) override {
100
114
        return add_internal<false>(vals, count);
101
114
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
208
    Status add(const uint8_t* vals, size_t* count) override {
100
208
        return add_internal<false>(vals, count);
101
208
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
4.15k
    Status add(const uint8_t* vals, size_t* count) override {
100
4.15k
        return add_internal<false>(vals, count);
101
4.15k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
222
    Status add(const uint8_t* vals, size_t* count) override {
100
222
        return add_internal<false>(vals, count);
101
222
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
179
    Status add(const uint8_t* vals, size_t* count) override {
100
179
        return add_internal<false>(vals, count);
101
179
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
974
    Status add(const uint8_t* vals, size_t* count) override {
100
974
        return add_internal<false>(vals, count);
101
974
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
Line
Count
Source
99
194
    Status add(const uint8_t* vals, size_t* count) override {
100
194
        return add_internal<false>(vals, count);
101
194
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
229
    Status add(const uint8_t* vals, size_t* count) override {
100
229
        return add_internal<false>(vals, count);
101
229
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
215
    Status add(const uint8_t* vals, size_t* count) override {
100
215
        return add_internal<false>(vals, count);
101
215
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
210
    Status add(const uint8_t* vals, size_t* count) override {
100
210
        return add_internal<false>(vals, count);
101
210
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE3addEPKhPm
Line
Count
Source
99
60
    Status add(const uint8_t* vals, size_t* count) override {
100
60
        return add_internal<false>(vals, count);
101
60
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
99
220
    Status add(const uint8_t* vals, size_t* count) override {
100
220
        return add_internal<false>(vals, count);
101
220
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
Line
Count
Source
99
209
    Status add(const uint8_t* vals, size_t* count) override {
100
209
        return add_internal<false>(vals, count);
101
209
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
99
199
    Status add(const uint8_t* vals, size_t* count) override {
100
199
        return add_internal<false>(vals, count);
101
199
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
201
    Status add(const uint8_t* vals, size_t* count) override {
100
201
        return add_internal<false>(vals, count);
101
201
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
99
209
    Status add(const uint8_t* vals, size_t* count) override {
100
209
        return add_internal<false>(vals, count);
101
209
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Line
Count
Source
99
226
    Status add(const uint8_t* vals, size_t* count) override {
100
226
        return add_internal<false>(vals, count);
101
226
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Line
Count
Source
99
199
    Status add(const uint8_t* vals, size_t* count) override {
100
199
        return add_internal<false>(vals, count);
101
199
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
99
209
    Status add(const uint8_t* vals, size_t* count) override {
100
209
        return add_internal<false>(vals, count);
101
209
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE3addEPKhPm
Line
Count
Source
99
70
    Status add(const uint8_t* vals, size_t* count) override {
100
70
        return add_internal<false>(vals, count);
101
70
    }
102
103
1.31M
    Status single_add(const uint8_t* vals, size_t* count) {
104
1.31M
        return add_internal<true>(vals, count);
105
1.31M
    }
106
107
    template <bool single>
108
2.00M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
2.00M
        DCHECK(!_finished);
110
2.00M
        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.00M
        uint32_t to_add = cast_set<UInt32>(
126
2.00M
                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.00M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
2.00M
        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.00M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
2.00M
        _count += to_add;
134
2.00M
        _remain_element_capacity -= to_add;
135
2.00M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
2.00M
        *num_written = to_add;
138
2.00M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
1.31M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
1.31M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
1.31M
                        *reinterpret_cast<const uint32_t*>(vals);
149
1.31M
                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
1.31M
        }
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
2.00M
        return Status::OK();
159
2.00M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
668k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
668k
        DCHECK(!_finished);
110
668k
        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
668k
        uint32_t to_add = cast_set<UInt32>(
126
668k
                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
668k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
668k
        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
668k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
668k
        _count += to_add;
134
668k
        _remain_element_capacity -= to_add;
135
668k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
668k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
668k
        memcpy(&_data[orig_size], vals, to_add_size);
158
668k
        return Status::OK();
159
668k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
13.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
13.0k
        DCHECK(!_finished);
110
13.0k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
13.0k
        uint32_t to_add = cast_set<UInt32>(
126
13.0k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
13.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
13.0k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
13.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
13.0k
        _count += to_add;
134
13.0k
        _remain_element_capacity -= to_add;
135
13.0k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
13.0k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
13.0k
        memcpy(&_data[orig_size], vals, to_add_size);
158
13.0k
        return Status::OK();
159
13.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
90
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
90
        DCHECK(!_finished);
110
90
        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
90
        uint32_t to_add = cast_set<UInt32>(
126
90
                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
90
        int to_add_size = to_add * SIZE_OF_TYPE;
129
90
        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
90
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
90
        _count += to_add;
134
90
        _remain_element_capacity -= to_add;
135
90
        _raw_data_size += to_add_size;
136
        // return added number through count
137
90
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
90
        memcpy(&_data[orig_size], vals, to_add_size);
158
90
        return Status::OK();
159
90
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
114
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
114
        DCHECK(!_finished);
110
114
        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
114
        uint32_t to_add = cast_set<UInt32>(
126
114
                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
114
        int to_add_size = to_add * SIZE_OF_TYPE;
129
114
        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
114
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
114
        _count += to_add;
134
114
        _remain_element_capacity -= to_add;
135
114
        _raw_data_size += to_add_size;
136
        // return added number through count
137
114
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
114
        memcpy(&_data[orig_size], vals, to_add_size);
158
114
        return Status::OK();
159
114
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
208
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
208
        DCHECK(!_finished);
110
208
        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
208
        uint32_t to_add = cast_set<UInt32>(
126
208
                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
208
        int to_add_size = to_add * SIZE_OF_TYPE;
129
208
        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
208
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
208
        _count += to_add;
134
208
        _remain_element_capacity -= to_add;
135
208
        _raw_data_size += to_add_size;
136
        // return added number through count
137
208
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
208
        memcpy(&_data[orig_size], vals, to_add_size);
158
208
        return Status::OK();
159
208
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
4.15k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
4.15k
        DCHECK(!_finished);
110
4.15k
        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.15k
        uint32_t to_add = cast_set<UInt32>(
126
4.15k
                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.15k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
4.15k
        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.15k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
4.15k
        _count += to_add;
134
4.15k
        _remain_element_capacity -= to_add;
135
4.15k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
4.15k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
4.15k
        memcpy(&_data[orig_size], vals, to_add_size);
158
4.15k
        return Status::OK();
159
4.15k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
222
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
222
        DCHECK(!_finished);
110
222
        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
222
        uint32_t to_add = cast_set<UInt32>(
126
222
                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
222
        int to_add_size = to_add * SIZE_OF_TYPE;
129
222
        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
222
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
222
        _count += to_add;
134
222
        _remain_element_capacity -= to_add;
135
222
        _raw_data_size += to_add_size;
136
        // return added number through count
137
222
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
222
        memcpy(&_data[orig_size], vals, to_add_size);
158
222
        return Status::OK();
159
222
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
179
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
179
        DCHECK(!_finished);
110
179
        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
179
        uint32_t to_add = cast_set<UInt32>(
126
179
                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
179
        int to_add_size = to_add * SIZE_OF_TYPE;
129
179
        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
179
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
179
        _count += to_add;
134
179
        _remain_element_capacity -= to_add;
135
179
        _raw_data_size += to_add_size;
136
        // return added number through count
137
179
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
179
        memcpy(&_data[orig_size], vals, to_add_size);
158
179
        return Status::OK();
159
179
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
974
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
974
        DCHECK(!_finished);
110
974
        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
974
        uint32_t to_add = cast_set<UInt32>(
126
974
                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
974
        int to_add_size = to_add * SIZE_OF_TYPE;
129
974
        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
974
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
974
        _count += to_add;
134
974
        _remain_element_capacity -= to_add;
135
974
        _raw_data_size += to_add_size;
136
        // return added number through count
137
974
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
974
        memcpy(&_data[orig_size], vals, to_add_size);
158
974
        return Status::OK();
159
974
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
194
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
194
        DCHECK(!_finished);
110
194
        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
194
        uint32_t to_add = cast_set<UInt32>(
126
194
                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
194
        int to_add_size = to_add * SIZE_OF_TYPE;
129
194
        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
194
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
194
        _count += to_add;
134
194
        _remain_element_capacity -= to_add;
135
194
        _raw_data_size += to_add_size;
136
        // return added number through count
137
194
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
194
        memcpy(&_data[orig_size], vals, to_add_size);
158
194
        return Status::OK();
159
194
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
229
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
229
        DCHECK(!_finished);
110
229
        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
229
        uint32_t to_add = cast_set<UInt32>(
126
229
                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
229
        int to_add_size = to_add * SIZE_OF_TYPE;
129
229
        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
229
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
229
        _count += to_add;
134
229
        _remain_element_capacity -= to_add;
135
229
        _raw_data_size += to_add_size;
136
        // return added number through count
137
229
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
229
        memcpy(&_data[orig_size], vals, to_add_size);
158
229
        return Status::OK();
159
229
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
215
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
215
        DCHECK(!_finished);
110
215
        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
215
        uint32_t to_add = cast_set<UInt32>(
126
215
                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
215
        int to_add_size = to_add * SIZE_OF_TYPE;
129
215
        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
215
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
215
        _count += to_add;
134
215
        _remain_element_capacity -= to_add;
135
215
        _raw_data_size += to_add_size;
136
        // return added number through count
137
215
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
215
        memcpy(&_data[orig_size], vals, to_add_size);
158
215
        return Status::OK();
159
215
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
210
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
210
        DCHECK(!_finished);
110
210
        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
210
        uint32_t to_add = cast_set<UInt32>(
126
210
                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
210
        int to_add_size = to_add * SIZE_OF_TYPE;
129
210
        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
210
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
210
        _count += to_add;
134
210
        _remain_element_capacity -= to_add;
135
210
        _raw_data_size += to_add_size;
136
        // return added number through count
137
210
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
210
        memcpy(&_data[orig_size], vals, to_add_size);
158
210
        return Status::OK();
159
210
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
60
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
60
        DCHECK(!_finished);
110
60
        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
60
        uint32_t to_add = cast_set<UInt32>(
126
60
                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
60
        int to_add_size = to_add * SIZE_OF_TYPE;
129
60
        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
60
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
60
        _count += to_add;
134
60
        _remain_element_capacity -= to_add;
135
60
        _raw_data_size += to_add_size;
136
        // return added number through count
137
60
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
60
        memcpy(&_data[orig_size], vals, to_add_size);
158
60
        return Status::OK();
159
60
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
220
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
220
        DCHECK(!_finished);
110
220
        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
220
        uint32_t to_add = cast_set<UInt32>(
126
220
                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
220
        int to_add_size = to_add * SIZE_OF_TYPE;
129
220
        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
220
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
220
        _count += to_add;
134
220
        _remain_element_capacity -= to_add;
135
220
        _raw_data_size += to_add_size;
136
        // return added number through count
137
220
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
220
        memcpy(&_data[orig_size], vals, to_add_size);
158
220
        return Status::OK();
159
220
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
209
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
209
        DCHECK(!_finished);
110
209
        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
209
        uint32_t to_add = cast_set<UInt32>(
126
209
                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
209
        int to_add_size = to_add * SIZE_OF_TYPE;
129
209
        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
209
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
209
        _count += to_add;
134
209
        _remain_element_capacity -= to_add;
135
209
        _raw_data_size += to_add_size;
136
        // return added number through count
137
209
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
209
        memcpy(&_data[orig_size], vals, to_add_size);
158
209
        return Status::OK();
159
209
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
199
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
199
        DCHECK(!_finished);
110
199
        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
199
        uint32_t to_add = cast_set<UInt32>(
126
199
                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
199
        int to_add_size = to_add * SIZE_OF_TYPE;
129
199
        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
199
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
199
        _count += to_add;
134
199
        _remain_element_capacity -= to_add;
135
199
        _raw_data_size += to_add_size;
136
        // return added number through count
137
199
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
199
        memcpy(&_data[orig_size], vals, to_add_size);
158
199
        return Status::OK();
159
199
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
201
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
201
        DCHECK(!_finished);
110
201
        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
201
        uint32_t to_add = cast_set<UInt32>(
126
201
                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
201
        int to_add_size = to_add * SIZE_OF_TYPE;
129
201
        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
201
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
201
        _count += to_add;
134
201
        _remain_element_capacity -= to_add;
135
201
        _raw_data_size += to_add_size;
136
        // return added number through count
137
201
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
201
        memcpy(&_data[orig_size], vals, to_add_size);
158
201
        return Status::OK();
159
201
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
209
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
209
        DCHECK(!_finished);
110
209
        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
209
        uint32_t to_add = cast_set<UInt32>(
126
209
                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
209
        int to_add_size = to_add * SIZE_OF_TYPE;
129
209
        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
209
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
209
        _count += to_add;
134
209
        _remain_element_capacity -= to_add;
135
209
        _raw_data_size += to_add_size;
136
        // return added number through count
137
209
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
209
        memcpy(&_data[orig_size], vals, to_add_size);
158
209
        return Status::OK();
159
209
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
226
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
226
        DCHECK(!_finished);
110
226
        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
226
        uint32_t to_add = cast_set<UInt32>(
126
226
                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
226
        int to_add_size = to_add * SIZE_OF_TYPE;
129
226
        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
226
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
226
        _count += to_add;
134
226
        _remain_element_capacity -= to_add;
135
226
        _raw_data_size += to_add_size;
136
        // return added number through count
137
226
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
226
        memcpy(&_data[orig_size], vals, to_add_size);
158
226
        return Status::OK();
159
226
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
199
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
199
        DCHECK(!_finished);
110
199
        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
199
        uint32_t to_add = cast_set<UInt32>(
126
199
                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
199
        int to_add_size = to_add * SIZE_OF_TYPE;
129
199
        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
199
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
199
        _count += to_add;
134
199
        _remain_element_capacity -= to_add;
135
199
        _raw_data_size += to_add_size;
136
        // return added number through count
137
199
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
199
        memcpy(&_data[orig_size], vals, to_add_size);
158
199
        return Status::OK();
159
199
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
209
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
209
        DCHECK(!_finished);
110
209
        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
209
        uint32_t to_add = cast_set<UInt32>(
126
209
                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
209
        int to_add_size = to_add * SIZE_OF_TYPE;
129
209
        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
209
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
209
        _count += to_add;
134
209
        _remain_element_capacity -= to_add;
135
209
        _raw_data_size += to_add_size;
136
        // return added number through count
137
209
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
209
        memcpy(&_data[orig_size], vals, to_add_size);
158
209
        return Status::OK();
159
209
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
70
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
70
        DCHECK(!_finished);
110
70
        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
70
        uint32_t to_add = cast_set<UInt32>(
126
70
                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
70
        int to_add_size = to_add * SIZE_OF_TYPE;
129
70
        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
70
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
70
        _count += to_add;
134
70
        _remain_element_capacity -= to_add;
135
70
        _raw_data_size += to_add_size;
136
        // return added number through count
137
70
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
70
        memcpy(&_data[orig_size], vals, to_add_size);
158
70
        return Status::OK();
159
70
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
1.31M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
1.31M
        DCHECK(!_finished);
110
1.31M
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
1.31M
        uint32_t to_add = cast_set<UInt32>(
126
1.31M
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
1.31M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
1.31M
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
1.31M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
1.31M
        _count += to_add;
134
1.31M
        _remain_element_capacity -= to_add;
135
1.31M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
1.31M
        *num_written = to_add;
138
1.31M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
1.31M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
1.31M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
1.31M
                        *reinterpret_cast<const uint32_t*>(vals);
149
1.31M
                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
1.31M
        }
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
1.31M
        return Status::OK();
159
1.31M
    }
160
161
19.5k
    Status finish(OwnedSlice* slice) override {
162
19.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
19.5k
        return Status::OK();
164
19.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
13.9k
    Status finish(OwnedSlice* slice) override {
162
13.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
13.9k
        return Status::OK();
164
13.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
857
    Status finish(OwnedSlice* slice) override {
162
857
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
857
        return Status::OK();
164
857
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
34
    Status finish(OwnedSlice* slice) override {
162
34
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
34
        return Status::OK();
164
34
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
58
    Status finish(OwnedSlice* slice) override {
162
58
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
58
        return Status::OK();
164
58
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
150
    Status finish(OwnedSlice* slice) override {
162
150
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
150
        return Status::OK();
164
150
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
1.65k
    Status finish(OwnedSlice* slice) override {
162
1.65k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
1.65k
        return Status::OK();
164
1.65k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
122
    Status finish(OwnedSlice* slice) override {
162
122
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
122
        return Status::OK();
164
122
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
121
    Status finish(OwnedSlice* slice) override {
162
121
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
121
        return Status::OK();
164
121
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
945
    Status finish(OwnedSlice* slice) override {
162
945
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
945
        return Status::OK();
164
945
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
6
    Status finish(OwnedSlice* slice) override {
162
6
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
6
        return Status::OK();
164
6
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
149
    Status finish(OwnedSlice* slice) override {
162
149
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
149
        return Status::OK();
164
149
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
153
    Status finish(OwnedSlice* slice) override {
162
153
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
153
        return Status::OK();
164
153
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
148
    Status finish(OwnedSlice* slice) override {
162
148
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
148
        return Status::OK();
164
148
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
8
    Status finish(OwnedSlice* slice) override {
162
8
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
8
        return Status::OK();
164
8
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
158
    Status finish(OwnedSlice* slice) override {
162
158
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
158
        return Status::OK();
164
158
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
147
    Status finish(OwnedSlice* slice) override {
162
147
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
147
        return Status::OK();
164
147
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
141
    Status finish(OwnedSlice* slice) override {
162
141
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
141
        return Status::OK();
164
141
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
143
    Status finish(OwnedSlice* slice) override {
162
143
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
143
        return Status::OK();
164
143
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
151
    Status finish(OwnedSlice* slice) override {
162
151
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
151
        return Status::OK();
164
151
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
168
    Status finish(OwnedSlice* slice) override {
162
168
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
168
        return Status::OK();
164
168
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
141
    Status finish(OwnedSlice* slice) override {
162
141
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
141
        return Status::OK();
164
141
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
151
    Status finish(OwnedSlice* slice) override {
162
151
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
151
        return Status::OK();
164
151
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
17
    Status finish(OwnedSlice* slice) override {
162
17
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
17
        return Status::OK();
164
17
    }
165
166
43.3k
    Status reset() override {
167
43.3k
        RETURN_IF_CATCH_EXCEPTION({
168
43.3k
            size_t block_size = _options.data_page_size;
169
43.3k
            _count = 0;
170
43.3k
            _raw_data_size = 0;
171
43.3k
            _data.clear();
172
43.3k
            _data.reserve(block_size);
173
43.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
43.3k
                    << "buffer must be naturally-aligned";
175
43.3k
            _buffer.clear();
176
43.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
43.3k
            _finished = false;
178
43.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
43.3k
        });
180
43.3k
        return Status::OK();
181
43.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
166
32.2k
    Status reset() override {
167
32.2k
        RETURN_IF_CATCH_EXCEPTION({
168
32.2k
            size_t block_size = _options.data_page_size;
169
32.2k
            _count = 0;
170
32.2k
            _raw_data_size = 0;
171
32.2k
            _data.clear();
172
32.2k
            _data.reserve(block_size);
173
32.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
32.2k
                    << "buffer must be naturally-aligned";
175
32.2k
            _buffer.clear();
176
32.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
32.2k
            _finished = false;
178
32.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
32.2k
        });
180
32.2k
        return Status::OK();
181
32.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
1.73k
    Status reset() override {
167
1.73k
        RETURN_IF_CATCH_EXCEPTION({
168
1.73k
            size_t block_size = _options.data_page_size;
169
1.73k
            _count = 0;
170
1.73k
            _raw_data_size = 0;
171
1.73k
            _data.clear();
172
1.73k
            _data.reserve(block_size);
173
1.73k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.73k
                    << "buffer must be naturally-aligned";
175
1.73k
            _buffer.clear();
176
1.73k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.73k
            _finished = false;
178
1.73k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.73k
        });
180
1.73k
        return Status::OK();
181
1.73k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
166
62
    Status reset() override {
167
62
        RETURN_IF_CATCH_EXCEPTION({
168
62
            size_t block_size = _options.data_page_size;
169
62
            _count = 0;
170
62
            _raw_data_size = 0;
171
62
            _data.clear();
172
62
            _data.reserve(block_size);
173
62
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
62
                    << "buffer must be naturally-aligned";
175
62
            _buffer.clear();
176
62
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
62
            _finished = false;
178
62
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
62
        });
180
62
        return Status::OK();
181
62
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
166
106
    Status reset() override {
167
106
        RETURN_IF_CATCH_EXCEPTION({
168
106
            size_t block_size = _options.data_page_size;
169
106
            _count = 0;
170
106
            _raw_data_size = 0;
171
106
            _data.clear();
172
106
            _data.reserve(block_size);
173
106
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
106
                    << "buffer must be naturally-aligned";
175
106
            _buffer.clear();
176
106
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
106
            _finished = false;
178
106
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
106
        });
180
106
        return Status::OK();
181
106
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
166
290
    Status reset() override {
167
290
        RETURN_IF_CATCH_EXCEPTION({
168
290
            size_t block_size = _options.data_page_size;
169
290
            _count = 0;
170
290
            _raw_data_size = 0;
171
290
            _data.clear();
172
290
            _data.reserve(block_size);
173
290
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
290
                    << "buffer must be naturally-aligned";
175
290
            _buffer.clear();
176
290
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
290
            _finished = false;
178
290
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
290
        });
180
290
        return Status::OK();
181
290
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
3.29k
    Status reset() override {
167
3.29k
        RETURN_IF_CATCH_EXCEPTION({
168
3.29k
            size_t block_size = _options.data_page_size;
169
3.29k
            _count = 0;
170
3.29k
            _raw_data_size = 0;
171
3.29k
            _data.clear();
172
3.29k
            _data.reserve(block_size);
173
3.29k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
3.29k
                    << "buffer must be naturally-aligned";
175
3.29k
            _buffer.clear();
176
3.29k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
3.29k
            _finished = false;
178
3.29k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
3.29k
        });
180
3.29k
        return Status::OK();
181
3.29k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
166
241
    Status reset() override {
167
241
        RETURN_IF_CATCH_EXCEPTION({
168
241
            size_t block_size = _options.data_page_size;
169
241
            _count = 0;
170
241
            _raw_data_size = 0;
171
241
            _data.clear();
172
241
            _data.reserve(block_size);
173
241
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
241
                    << "buffer must be naturally-aligned";
175
241
            _buffer.clear();
176
241
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
241
            _finished = false;
178
241
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
241
        });
180
241
        return Status::OK();
181
241
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
166
229
    Status reset() override {
167
229
        RETURN_IF_CATCH_EXCEPTION({
168
229
            size_t block_size = _options.data_page_size;
169
229
            _count = 0;
170
229
            _raw_data_size = 0;
171
229
            _data.clear();
172
229
            _data.reserve(block_size);
173
229
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
229
                    << "buffer must be naturally-aligned";
175
229
            _buffer.clear();
176
229
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
229
            _finished = false;
178
229
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
229
        });
180
229
        return Status::OK();
181
229
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
166
1.87k
    Status reset() override {
167
1.87k
        RETURN_IF_CATCH_EXCEPTION({
168
1.87k
            size_t block_size = _options.data_page_size;
169
1.87k
            _count = 0;
170
1.87k
            _raw_data_size = 0;
171
1.87k
            _data.clear();
172
1.87k
            _data.reserve(block_size);
173
1.87k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.87k
                    << "buffer must be naturally-aligned";
175
1.87k
            _buffer.clear();
176
1.87k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.87k
            _finished = false;
178
1.87k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.87k
        });
180
1.87k
        return Status::OK();
181
1.87k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
Line
Count
Source
166
1
    Status reset() override {
167
1
        RETURN_IF_CATCH_EXCEPTION({
168
1
            size_t block_size = _options.data_page_size;
169
1
            _count = 0;
170
1
            _raw_data_size = 0;
171
1
            _data.clear();
172
1
            _data.reserve(block_size);
173
1
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1
                    << "buffer must be naturally-aligned";
175
1
            _buffer.clear();
176
1
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1
            _finished = false;
178
1
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1
        });
180
1
        return Status::OK();
181
1
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
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_9FieldTypeE14EE5resetEv
Line
Count
Source
166
295
    Status reset() override {
167
295
        RETURN_IF_CATCH_EXCEPTION({
168
295
            size_t block_size = _options.data_page_size;
169
295
            _count = 0;
170
295
            _raw_data_size = 0;
171
295
            _data.clear();
172
295
            _data.reserve(block_size);
173
295
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
295
                    << "buffer must be naturally-aligned";
175
295
            _buffer.clear();
176
295
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
295
            _finished = false;
178
295
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
295
        });
180
295
        return Status::OK();
181
295
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
166
303
    Status reset() override {
167
303
        RETURN_IF_CATCH_EXCEPTION({
168
303
            size_t block_size = _options.data_page_size;
169
303
            _count = 0;
170
303
            _raw_data_size = 0;
171
303
            _data.clear();
172
303
            _data.reserve(block_size);
173
303
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
303
                    << "buffer must be naturally-aligned";
175
303
            _buffer.clear();
176
303
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
303
            _finished = false;
178
303
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
303
        });
180
303
        return Status::OK();
181
303
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
166
291
    Status reset() override {
167
291
        RETURN_IF_CATCH_EXCEPTION({
168
291
            size_t block_size = _options.data_page_size;
169
291
            _count = 0;
170
291
            _raw_data_size = 0;
171
291
            _data.clear();
172
291
            _data.reserve(block_size);
173
291
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
291
                    << "buffer must be naturally-aligned";
175
291
            _buffer.clear();
176
291
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
291
            _finished = false;
178
291
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
291
        });
180
291
        return Status::OK();
181
291
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE5resetEv
Line
Count
Source
166
10
    Status reset() override {
167
10
        RETURN_IF_CATCH_EXCEPTION({
168
10
            size_t block_size = _options.data_page_size;
169
10
            _count = 0;
170
10
            _raw_data_size = 0;
171
10
            _data.clear();
172
10
            _data.reserve(block_size);
173
10
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
10
                    << "buffer must be naturally-aligned";
175
10
            _buffer.clear();
176
10
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
10
            _finished = false;
178
10
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
10
        });
180
10
        return Status::OK();
181
10
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
166
311
    Status reset() override {
167
311
        RETURN_IF_CATCH_EXCEPTION({
168
311
            size_t block_size = _options.data_page_size;
169
311
            _count = 0;
170
311
            _raw_data_size = 0;
171
311
            _data.clear();
172
311
            _data.reserve(block_size);
173
311
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
311
                    << "buffer must be naturally-aligned";
175
311
            _buffer.clear();
176
311
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
311
            _finished = false;
178
311
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
311
        });
180
311
        return Status::OK();
181
311
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
Line
Count
Source
166
289
    Status reset() override {
167
289
        RETURN_IF_CATCH_EXCEPTION({
168
289
            size_t block_size = _options.data_page_size;
169
289
            _count = 0;
170
289
            _raw_data_size = 0;
171
289
            _data.clear();
172
289
            _data.reserve(block_size);
173
289
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
289
                    << "buffer must be naturally-aligned";
175
289
            _buffer.clear();
176
289
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
289
            _finished = false;
178
289
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
289
        });
180
289
        return Status::OK();
181
289
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
166
279
    Status reset() override {
167
279
        RETURN_IF_CATCH_EXCEPTION({
168
279
            size_t block_size = _options.data_page_size;
169
279
            _count = 0;
170
279
            _raw_data_size = 0;
171
279
            _data.clear();
172
279
            _data.reserve(block_size);
173
279
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
279
                    << "buffer must be naturally-aligned";
175
279
            _buffer.clear();
176
279
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
279
            _finished = false;
178
279
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
279
        });
180
279
        return Status::OK();
181
279
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
281
    Status reset() override {
167
281
        RETURN_IF_CATCH_EXCEPTION({
168
281
            size_t block_size = _options.data_page_size;
169
281
            _count = 0;
170
281
            _raw_data_size = 0;
171
281
            _data.clear();
172
281
            _data.reserve(block_size);
173
281
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
281
                    << "buffer must be naturally-aligned";
175
281
            _buffer.clear();
176
281
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
281
            _finished = false;
178
281
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
281
        });
180
281
        return Status::OK();
181
281
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
166
289
    Status reset() override {
167
289
        RETURN_IF_CATCH_EXCEPTION({
168
289
            size_t block_size = _options.data_page_size;
169
289
            _count = 0;
170
289
            _raw_data_size = 0;
171
289
            _data.clear();
172
289
            _data.reserve(block_size);
173
289
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
289
                    << "buffer must be naturally-aligned";
175
289
            _buffer.clear();
176
289
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
289
            _finished = false;
178
289
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
289
        });
180
289
        return Status::OK();
181
289
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Line
Count
Source
166
307
    Status reset() override {
167
307
        RETURN_IF_CATCH_EXCEPTION({
168
307
            size_t block_size = _options.data_page_size;
169
307
            _count = 0;
170
307
            _raw_data_size = 0;
171
307
            _data.clear();
172
307
            _data.reserve(block_size);
173
307
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
307
                    << "buffer must be naturally-aligned";
175
307
            _buffer.clear();
176
307
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
307
            _finished = false;
178
307
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
307
        });
180
307
        return Status::OK();
181
307
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Line
Count
Source
166
279
    Status reset() override {
167
279
        RETURN_IF_CATCH_EXCEPTION({
168
279
            size_t block_size = _options.data_page_size;
169
279
            _count = 0;
170
279
            _raw_data_size = 0;
171
279
            _data.clear();
172
279
            _data.reserve(block_size);
173
279
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
279
                    << "buffer must be naturally-aligned";
175
279
            _buffer.clear();
176
279
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
279
            _finished = false;
178
279
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
279
        });
180
279
        return Status::OK();
181
279
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
166
289
    Status reset() override {
167
289
        RETURN_IF_CATCH_EXCEPTION({
168
289
            size_t block_size = _options.data_page_size;
169
289
            _count = 0;
170
289
            _raw_data_size = 0;
171
289
            _data.clear();
172
289
            _data.reserve(block_size);
173
289
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
289
                    << "buffer must be naturally-aligned";
175
289
            _buffer.clear();
176
289
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
289
            _finished = false;
178
289
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
289
        });
180
289
        return Status::OK();
181
289
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE5resetEv
Line
Count
Source
166
20
    Status reset() override {
167
20
        RETURN_IF_CATCH_EXCEPTION({
168
20
            size_t block_size = _options.data_page_size;
169
20
            _count = 0;
170
20
            _raw_data_size = 0;
171
20
            _data.clear();
172
20
            _data.reserve(block_size);
173
20
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
20
                    << "buffer must be naturally-aligned";
175
20
            _buffer.clear();
176
20
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
20
            _finished = false;
178
20
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
20
        });
180
20
        return Status::OK();
181
20
    }
182
183
4
    size_t count() const override { return _count; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
183
4
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_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
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE5countEv
184
185
13.5k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
9.85k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
376
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
14
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
185
4
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4sizeEv
Line
Count
Source
185
104
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
185
1.67k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
185
103
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
92
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
148
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4sizeEv
Line
Count
Source
185
112
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4sizeEv
Line
Count
Source
185
113
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
106
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4sizeEv
Line
Count
Source
185
119
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4sizeEv
Line
Count
Source
185
106
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4sizeEv
Line
Count
Source
185
102
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
185
102
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
185
102
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4sizeEv
Line
Count
Source
185
102
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4sizeEv
Line
Count
Source
185
102
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4sizeEv
Line
Count
Source
185
102
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE4sizeEv
186
187
13.8k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
8.24k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
856
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
187
32
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
54
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
187
149
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
1.65k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
122
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
187
121
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
945
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE17get_raw_data_sizeEv
Line
Count
Source
187
6
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE17get_raw_data_sizeEv
Line
Count
Source
187
149
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
187
153
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
187
148
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE17get_raw_data_sizeEv
Line
Count
Source
187
8
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
187
158
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
Line
Count
Source
187
147
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
187
141
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
143
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
187
151
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE17get_raw_data_sizeEv
Line
Count
Source
187
168
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Line
Count
Source
187
141
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
187
151
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE17get_raw_data_sizeEv
Line
Count
Source
187
17
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
19.2k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
13.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
877
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
30
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
52
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
141
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1.64k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
119
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
108
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
934
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
2
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
146
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
150
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
143
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
2
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
153
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
142
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
138
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
138
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
138
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
139
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
138
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
138
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
3
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
192
193
19.5k
    OwnedSlice _finish(int final_size_of_type) {
194
19.5k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
19.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
19.5k
        int padding_elems = num_elems_after_padding - _count;
199
19.5k
        int padding_bytes = padding_elems * final_size_of_type;
200
284k
        for (int i = 0; i < padding_bytes; i++) {
201
264k
            _data.push_back(0);
202
264k
        }
203
204
        // reserve enough place for compression
205
19.5k
        _buffer.resize(
206
19.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
19.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
19.5k
        int64_t bytes =
210
19.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
19.5k
                                         num_elems_after_padding, final_size_of_type, 0);
212
19.5k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
19.5k
        encode_fixed32_le(&_buffer[0], _count);
222
19.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
19.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
19.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
19.5k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
19.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
19.5k
        return _buffer.build();
229
19.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
13.9k
    OwnedSlice _finish(int final_size_of_type) {
194
13.9k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
13.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
13.9k
        int padding_elems = num_elems_after_padding - _count;
199
13.9k
        int padding_bytes = padding_elems * final_size_of_type;
200
126k
        for (int i = 0; i < padding_bytes; i++) {
201
112k
            _data.push_back(0);
202
112k
        }
203
204
        // reserve enough place for compression
205
13.9k
        _buffer.resize(
206
13.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
13.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
13.9k
        int64_t bytes =
210
13.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
13.9k
                                         num_elems_after_padding, final_size_of_type, 0);
212
13.9k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
13.9k
        encode_fixed32_le(&_buffer[0], _count);
222
13.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
13.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
13.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
13.9k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
13.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
13.9k
        return _buffer.build();
229
13.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
857
    OwnedSlice _finish(int final_size_of_type) {
194
857
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
857
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
857
        int padding_elems = num_elems_after_padding - _count;
199
857
        int padding_bytes = padding_elems * final_size_of_type;
200
24.0k
        for (int i = 0; i < padding_bytes; i++) {
201
23.1k
            _data.push_back(0);
202
23.1k
        }
203
204
        // reserve enough place for compression
205
857
        _buffer.resize(
206
857
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
857
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
857
        int64_t bytes =
210
857
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
857
                                         num_elems_after_padding, final_size_of_type, 0);
212
857
        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
857
        encode_fixed32_le(&_buffer[0], _count);
222
857
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
857
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
857
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
857
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
857
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
857
        return _buffer.build();
229
857
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
34
    OwnedSlice _finish(int final_size_of_type) {
194
34
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
34
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
34
        int padding_elems = num_elems_after_padding - _count;
199
34
        int padding_bytes = padding_elems * final_size_of_type;
200
242
        for (int i = 0; i < padding_bytes; i++) {
201
208
            _data.push_back(0);
202
208
        }
203
204
        // reserve enough place for compression
205
34
        _buffer.resize(
206
34
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
34
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
34
        int64_t bytes =
210
34
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
34
                                         num_elems_after_padding, final_size_of_type, 0);
212
34
        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
34
        encode_fixed32_le(&_buffer[0], _count);
222
34
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
34
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
34
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
34
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
34
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
34
        return _buffer.build();
229
34
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
58
    OwnedSlice _finish(int final_size_of_type) {
194
58
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
58
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
58
        int padding_elems = num_elems_after_padding - _count;
199
58
        int padding_bytes = padding_elems * final_size_of_type;
200
2.61k
        for (int i = 0; i < padding_bytes; i++) {
201
2.56k
            _data.push_back(0);
202
2.56k
        }
203
204
        // reserve enough place for compression
205
58
        _buffer.resize(
206
58
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
58
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
58
        int64_t bytes =
210
58
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
58
                                         num_elems_after_padding, final_size_of_type, 0);
212
58
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
58
        encode_fixed32_le(&_buffer[0], _count);
222
58
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
58
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
58
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
58
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
58
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
58
        return _buffer.build();
229
58
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
193
150
    OwnedSlice _finish(int final_size_of_type) {
194
150
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
150
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
150
        int padding_elems = num_elems_after_padding - _count;
199
150
        int padding_bytes = padding_elems * final_size_of_type;
200
9.55k
        for (int i = 0; i < padding_bytes; i++) {
201
9.40k
            _data.push_back(0);
202
9.40k
        }
203
204
        // reserve enough place for compression
205
150
        _buffer.resize(
206
150
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
150
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
150
        int64_t bytes =
210
150
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
150
                                         num_elems_after_padding, final_size_of_type, 0);
212
150
        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
150
        encode_fixed32_le(&_buffer[0], _count);
222
150
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
150
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
150
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
150
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
150
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
150
        return _buffer.build();
229
150
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
1.65k
    OwnedSlice _finish(int final_size_of_type) {
194
1.65k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
1.65k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
1.65k
        int padding_elems = num_elems_after_padding - _count;
199
1.65k
        int padding_bytes = padding_elems * final_size_of_type;
200
4.43k
        for (int i = 0; i < padding_bytes; i++) {
201
2.77k
            _data.push_back(0);
202
2.77k
        }
203
204
        // reserve enough place for compression
205
1.65k
        _buffer.resize(
206
1.65k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
1.65k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
1.65k
        int64_t bytes =
210
1.65k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
1.65k
                                         num_elems_after_padding, final_size_of_type, 0);
212
1.65k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
1.65k
        encode_fixed32_le(&_buffer[0], _count);
222
1.65k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
1.65k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
1.65k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
1.65k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
1.65k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
1.65k
        return _buffer.build();
229
1.65k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
122
    OwnedSlice _finish(int final_size_of_type) {
194
122
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
122
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
122
        int padding_elems = num_elems_after_padding - _count;
199
122
        int padding_bytes = padding_elems * final_size_of_type;
200
1.34k
        for (int i = 0; i < padding_bytes; i++) {
201
1.22k
            _data.push_back(0);
202
1.22k
        }
203
204
        // reserve enough place for compression
205
122
        _buffer.resize(
206
122
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
122
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
122
        int64_t bytes =
210
122
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
122
                                         num_elems_after_padding, final_size_of_type, 0);
212
122
        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
122
        encode_fixed32_le(&_buffer[0], _count);
222
122
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
122
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
122
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
122
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
122
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
122
        return _buffer.build();
229
122
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
121
    OwnedSlice _finish(int final_size_of_type) {
194
121
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
121
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
121
        int padding_elems = num_elems_after_padding - _count;
199
121
        int padding_bytes = padding_elems * final_size_of_type;
200
8.88k
        for (int i = 0; i < padding_bytes; i++) {
201
8.76k
            _data.push_back(0);
202
8.76k
        }
203
204
        // reserve enough place for compression
205
121
        _buffer.resize(
206
121
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
121
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
121
        int64_t bytes =
210
121
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
121
                                         num_elems_after_padding, final_size_of_type, 0);
212
121
        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
121
        encode_fixed32_le(&_buffer[0], _count);
222
121
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
121
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
121
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
121
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
121
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
121
        return _buffer.build();
229
121
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
945
    OwnedSlice _finish(int final_size_of_type) {
194
945
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
945
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
945
        int padding_elems = num_elems_after_padding - _count;
199
945
        int padding_bytes = padding_elems * final_size_of_type;
200
24.6k
        for (int i = 0; i < padding_bytes; i++) {
201
23.6k
            _data.push_back(0);
202
23.6k
        }
203
204
        // reserve enough place for compression
205
945
        _buffer.resize(
206
945
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
945
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
945
        int64_t bytes =
210
945
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
945
                                         num_elems_after_padding, final_size_of_type, 0);
212
945
        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
945
        encode_fixed32_le(&_buffer[0], _count);
222
945
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
945
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
945
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
945
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
945
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
945
        return _buffer.build();
229
945
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
Line
Count
Source
193
6
    OwnedSlice _finish(int final_size_of_type) {
194
6
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
6
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
6
        int padding_elems = num_elems_after_padding - _count;
199
6
        int padding_bytes = padding_elems * final_size_of_type;
200
18
        for (int i = 0; i < padding_bytes; i++) {
201
12
            _data.push_back(0);
202
12
        }
203
204
        // reserve enough place for compression
205
6
        _buffer.resize(
206
6
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
6
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
6
        int64_t bytes =
210
6
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
6
                                         num_elems_after_padding, final_size_of_type, 0);
212
6
        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
6
        encode_fixed32_le(&_buffer[0], _count);
222
6
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
6
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
6
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
6
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
6
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
6
        return _buffer.build();
229
6
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
149
    OwnedSlice _finish(int final_size_of_type) {
194
149
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
149
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
149
        int padding_elems = num_elems_after_padding - _count;
199
149
        int padding_bytes = padding_elems * final_size_of_type;
200
2.50k
        for (int i = 0; i < padding_bytes; i++) {
201
2.35k
            _data.push_back(0);
202
2.35k
        }
203
204
        // reserve enough place for compression
205
149
        _buffer.resize(
206
149
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
149
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
149
        int64_t bytes =
210
149
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
149
                                         num_elems_after_padding, final_size_of_type, 0);
212
149
        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
149
        encode_fixed32_le(&_buffer[0], _count);
222
149
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
149
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
149
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
149
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
149
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
149
        return _buffer.build();
229
149
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
193
153
    OwnedSlice _finish(int final_size_of_type) {
194
153
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
153
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
153
        int padding_elems = num_elems_after_padding - _count;
199
153
        int padding_bytes = padding_elems * final_size_of_type;
200
3.25k
        for (int i = 0; i < padding_bytes; i++) {
201
3.10k
            _data.push_back(0);
202
3.10k
        }
203
204
        // reserve enough place for compression
205
153
        _buffer.resize(
206
153
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
153
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
153
        int64_t bytes =
210
153
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
153
                                         num_elems_after_padding, final_size_of_type, 0);
212
153
        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
153
        encode_fixed32_le(&_buffer[0], _count);
222
153
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
153
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
153
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
153
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
153
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
153
        return _buffer.build();
229
153
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
193
148
    OwnedSlice _finish(int final_size_of_type) {
194
148
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
148
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
148
        int padding_elems = num_elems_after_padding - _count;
199
148
        int padding_bytes = padding_elems * final_size_of_type;
200
6.02k
        for (int i = 0; i < padding_bytes; i++) {
201
5.87k
            _data.push_back(0);
202
5.87k
        }
203
204
        // reserve enough place for compression
205
148
        _buffer.resize(
206
148
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
148
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
148
        int64_t bytes =
210
148
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
148
                                         num_elems_after_padding, final_size_of_type, 0);
212
148
        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
148
        encode_fixed32_le(&_buffer[0], _count);
222
148
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
148
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
148
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
148
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
148
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
148
        return _buffer.build();
229
148
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE7_finishEi
Line
Count
Source
193
8
    OwnedSlice _finish(int final_size_of_type) {
194
8
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
8
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
8
        int padding_elems = num_elems_after_padding - _count;
199
8
        int padding_bytes = padding_elems * final_size_of_type;
200
88
        for (int i = 0; i < padding_bytes; i++) {
201
80
            _data.push_back(0);
202
80
        }
203
204
        // reserve enough place for compression
205
8
        _buffer.resize(
206
8
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
8
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
8
        int64_t bytes =
210
8
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
8
                                         num_elems_after_padding, final_size_of_type, 0);
212
8
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
8
        encode_fixed32_le(&_buffer[0], _count);
222
8
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
8
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
8
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
8
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
8
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
8
        return _buffer.build();
229
8
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
193
158
    OwnedSlice _finish(int final_size_of_type) {
194
158
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
158
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
158
        int padding_elems = num_elems_after_padding - _count;
199
158
        int padding_bytes = padding_elems * final_size_of_type;
200
6.55k
        for (int i = 0; i < padding_bytes; i++) {
201
6.40k
            _data.push_back(0);
202
6.40k
        }
203
204
        // reserve enough place for compression
205
158
        _buffer.resize(
206
158
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
158
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
158
        int64_t bytes =
210
158
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
158
                                         num_elems_after_padding, final_size_of_type, 0);
212
158
        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
158
        encode_fixed32_le(&_buffer[0], _count);
222
158
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
158
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
158
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
158
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
158
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
158
        return _buffer.build();
229
158
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
Line
Count
Source
193
147
    OwnedSlice _finish(int final_size_of_type) {
194
147
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
147
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
147
        int padding_elems = num_elems_after_padding - _count;
199
147
        int padding_bytes = padding_elems * final_size_of_type;
200
5.98k
        for (int i = 0; i < padding_bytes; i++) {
201
5.84k
            _data.push_back(0);
202
5.84k
        }
203
204
        // reserve enough place for compression
205
147
        _buffer.resize(
206
147
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
147
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
147
        int64_t bytes =
210
147
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
147
                                         num_elems_after_padding, final_size_of_type, 0);
212
147
        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
147
        encode_fixed32_le(&_buffer[0], _count);
222
147
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
147
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
147
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
147
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
147
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
147
        return _buffer.build();
229
147
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
193
141
    OwnedSlice _finish(int final_size_of_type) {
194
141
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
141
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
141
        int padding_elems = num_elems_after_padding - _count;
199
141
        int padding_bytes = padding_elems * final_size_of_type;
200
2.95k
        for (int i = 0; i < padding_bytes; i++) {
201
2.81k
            _data.push_back(0);
202
2.81k
        }
203
204
        // reserve enough place for compression
205
141
        _buffer.resize(
206
141
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
141
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
141
        int64_t bytes =
210
141
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
141
                                         num_elems_after_padding, final_size_of_type, 0);
212
141
        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
141
        encode_fixed32_le(&_buffer[0], _count);
222
141
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
141
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
141
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
141
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
141
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
141
        return _buffer.build();
229
141
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
143
    OwnedSlice _finish(int final_size_of_type) {
194
143
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
143
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
143
        int padding_elems = num_elems_after_padding - _count;
199
143
        int padding_bytes = padding_elems * final_size_of_type;
200
5.79k
        for (int i = 0; i < padding_bytes; i++) {
201
5.64k
            _data.push_back(0);
202
5.64k
        }
203
204
        // reserve enough place for compression
205
143
        _buffer.resize(
206
143
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
143
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
143
        int64_t bytes =
210
143
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
143
                                         num_elems_after_padding, final_size_of_type, 0);
212
143
        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
143
        encode_fixed32_le(&_buffer[0], _count);
222
143
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
143
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
143
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
143
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
143
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
143
        return _buffer.build();
229
143
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
193
151
    OwnedSlice _finish(int final_size_of_type) {
194
151
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
151
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
151
        int padding_elems = num_elems_after_padding - _count;
199
151
        int padding_bytes = padding_elems * final_size_of_type;
200
11.4k
        for (int i = 0; i < padding_bytes; i++) {
201
11.2k
            _data.push_back(0);
202
11.2k
        }
203
204
        // reserve enough place for compression
205
151
        _buffer.resize(
206
151
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
151
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
151
        int64_t bytes =
210
151
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
151
                                         num_elems_after_padding, final_size_of_type, 0);
212
151
        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
151
        encode_fixed32_le(&_buffer[0], _count);
222
151
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
151
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
151
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
151
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
151
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
151
        return _buffer.build();
229
151
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE7_finishEi
Line
Count
Source
193
168
    OwnedSlice _finish(int final_size_of_type) {
194
168
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
168
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
168
        int padding_elems = num_elems_after_padding - _count;
199
168
        int padding_bytes = padding_elems * final_size_of_type;
200
22.9k
        for (int i = 0; i < padding_bytes; i++) {
201
22.8k
            _data.push_back(0);
202
22.8k
        }
203
204
        // reserve enough place for compression
205
168
        _buffer.resize(
206
168
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
168
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
168
        int64_t bytes =
210
168
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
168
                                         num_elems_after_padding, final_size_of_type, 0);
212
168
        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
168
        encode_fixed32_le(&_buffer[0], _count);
222
168
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
168
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
168
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
168
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
168
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
168
        return _buffer.build();
229
168
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Line
Count
Source
193
141
    OwnedSlice _finish(int final_size_of_type) {
194
141
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
141
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
141
        int padding_elems = num_elems_after_padding - _count;
199
141
        int padding_bytes = padding_elems * final_size_of_type;
200
2.95k
        for (int i = 0; i < padding_bytes; i++) {
201
2.81k
            _data.push_back(0);
202
2.81k
        }
203
204
        // reserve enough place for compression
205
141
        _buffer.resize(
206
141
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
141
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
141
        int64_t bytes =
210
141
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
141
                                         num_elems_after_padding, final_size_of_type, 0);
212
141
        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
141
        encode_fixed32_le(&_buffer[0], _count);
222
141
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
141
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
141
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
141
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
141
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
141
        return _buffer.build();
229
141
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
193
151
    OwnedSlice _finish(int final_size_of_type) {
194
151
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
151
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
151
        int padding_elems = num_elems_after_padding - _count;
199
151
        int padding_bytes = padding_elems * final_size_of_type;
200
11.4k
        for (int i = 0; i < padding_bytes; i++) {
201
11.2k
            _data.push_back(0);
202
11.2k
        }
203
204
        // reserve enough place for compression
205
151
        _buffer.resize(
206
151
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
151
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
151
        int64_t bytes =
210
151
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
151
                                         num_elems_after_padding, final_size_of_type, 0);
212
151
        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
151
        encode_fixed32_le(&_buffer[0], _count);
222
151
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
151
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
151
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
151
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
151
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
151
        return _buffer.build();
229
151
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE7_finishEi
Line
Count
Source
193
17
    OwnedSlice _finish(int final_size_of_type) {
194
17
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
17
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
17
        int padding_elems = num_elems_after_padding - _count;
199
17
        int padding_bytes = padding_elems * final_size_of_type;
200
273
        for (int i = 0; i < padding_bytes; i++) {
201
256
            _data.push_back(0);
202
256
        }
203
204
        // reserve enough place for compression
205
17
        _buffer.resize(
206
17
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
17
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
17
        int64_t bytes =
210
17
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
17
                                         num_elems_after_padding, final_size_of_type, 0);
212
17
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
17
        encode_fixed32_le(&_buffer[0], _count);
222
17
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
17
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
17
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
17
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
17
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
17
        return _buffer.build();
229
17
    }
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
25.3k
                                       int& size_of_element) {
253
25.3k
    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
25.3k
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
25.3k
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
25.3k
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
25.3k
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
25.3k
    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
25.3k
    switch (size_of_element) {
271
2.25k
    case 1:
272
2.30k
    case 2:
273
2.35k
    case 3:
274
22.8k
    case 4:
275
25.0k
    case 8:
276
25.1k
    case 12:
277
25.2k
    case 16:
278
25.3k
    case 32:
279
25.3k
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
25.3k
    }
283
25.3k
    return Status::OK();
284
25.3k
}
285
286
template <FieldType Type>
287
class BitShufflePageDecoder : public PageDecoder {
288
public:
289
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
290
12.7k
            : _data(data),
291
12.7k
              _options(options),
292
12.7k
              _parsed(false),
293
12.7k
              _num_elements(0),
294
12.7k
              _num_element_after_padding(0),
295
12.7k
              _size_of_element(0),
296
12.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
10.2k
            : _data(data),
291
10.2k
              _options(options),
292
10.2k
              _parsed(false),
293
10.2k
              _num_elements(0),
294
10.2k
              _num_element_after_padding(0),
295
10.2k
              _size_of_element(0),
296
10.2k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
397
            : _data(data),
291
397
              _options(options),
292
397
              _parsed(false),
293
397
              _num_elements(0),
294
397
              _num_element_after_padding(0),
295
397
              _size_of_element(0),
296
397
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_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_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
20
            : _data(data),
291
20
              _options(options),
292
20
              _parsed(false),
293
20
              _num_elements(0),
294
20
              _num_element_after_padding(0),
295
20
              _size_of_element(0),
296
20
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
28
            : _data(data),
291
28
              _options(options),
292
28
              _parsed(false),
293
28
              _num_elements(0),
294
28
              _num_element_after_padding(0),
295
28
              _size_of_element(0),
296
28
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.13k
            : _data(data),
291
1.13k
              _options(options),
292
1.13k
              _parsed(false),
293
1.13k
              _num_elements(0),
294
1.13k
              _num_element_after_padding(0),
295
1.13k
              _size_of_element(0),
296
1.13k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
28
            : _data(data),
291
28
              _options(options),
292
28
              _parsed(false),
293
28
              _num_elements(0),
294
28
              _num_element_after_padding(0),
295
28
              _size_of_element(0),
296
28
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
28
            : _data(data),
291
28
              _options(options),
292
28
              _parsed(false),
293
28
              _num_elements(0),
294
28
              _num_element_after_padding(0),
295
28
              _size_of_element(0),
296
28
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
565
            : _data(data),
291
565
              _options(options),
292
565
              _parsed(false),
293
565
              _num_elements(0),
294
565
              _num_element_after_padding(0),
295
565
              _size_of_element(0),
296
565
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
3
            : _data(data),
291
3
              _options(options),
292
3
              _parsed(false),
293
3
              _num_elements(0),
294
3
              _num_element_after_padding(0),
295
3
              _size_of_element(0),
296
3
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
23
            : _data(data),
291
23
              _options(options),
292
23
              _parsed(false),
293
23
              _num_elements(0),
294
23
              _num_element_after_padding(0),
295
23
              _size_of_element(0),
296
23
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
29
            : _data(data),
291
29
              _options(options),
292
29
              _parsed(false),
293
29
              _num_elements(0),
294
29
              _num_element_after_padding(0),
295
29
              _size_of_element(0),
296
29
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
25
            : _data(data),
291
25
              _options(options),
292
25
              _parsed(false),
293
25
              _num_elements(0),
294
25
              _num_element_after_padding(0),
295
25
              _size_of_element(0),
296
25
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EEC2ENS_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_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
29
            : _data(data),
291
29
              _options(options),
292
29
              _parsed(false),
293
29
              _num_elements(0),
294
29
              _num_element_after_padding(0),
295
29
              _size_of_element(0),
296
29
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
24
            : _data(data),
291
24
              _options(options),
292
24
              _parsed(false),
293
24
              _num_elements(0),
294
24
              _num_element_after_padding(0),
295
24
              _size_of_element(0),
296
24
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
23
            : _data(data),
291
23
              _options(options),
292
23
              _parsed(false),
293
23
              _num_elements(0),
294
23
              _num_element_after_padding(0),
295
23
              _size_of_element(0),
296
23
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
24
            : _data(data),
291
24
              _options(options),
292
24
              _parsed(false),
293
24
              _num_elements(0),
294
24
              _num_element_after_padding(0),
295
24
              _size_of_element(0),
296
24
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
28
            : _data(data),
291
28
              _options(options),
292
28
              _parsed(false),
293
28
              _num_elements(0),
294
28
              _num_element_after_padding(0),
295
28
              _size_of_element(0),
296
28
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
36
            : _data(data),
291
36
              _options(options),
292
36
              _parsed(false),
293
36
              _num_elements(0),
294
36
              _num_element_after_padding(0),
295
36
              _size_of_element(0),
296
36
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
23
            : _data(data),
291
23
              _options(options),
292
23
              _parsed(false),
293
23
              _num_elements(0),
294
23
              _num_element_after_padding(0),
295
23
              _size_of_element(0),
296
23
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
28
            : _data(data),
291
28
              _options(options),
292
28
              _parsed(false),
293
28
              _num_elements(0),
294
28
              _num_element_after_padding(0),
295
28
              _size_of_element(0),
296
28
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
9
            : _data(data),
291
9
              _options(options),
292
9
              _parsed(false),
293
9
              _num_elements(0),
294
9
              _num_element_after_padding(0),
295
9
              _size_of_element(0),
296
9
              _cur_index(0) {}
297
298
12.7k
    Status init() override {
299
12.7k
        CHECK(!_parsed);
300
12.7k
        size_t unused;
301
12.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
12.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
12.7k
        if (_data.size !=
305
12.7k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
13
            std::stringstream ss;
307
13
            ss << "Size information unmatched, _data.size:" << _data.size
308
13
               << ", _num_elements:" << _num_elements << ", expected size is "
309
13
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
13
            return Status::InternalError(ss.str());
311
13
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
12.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
12.7k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
12.7k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
12.7k
        _parsed = true;
325
12.7k
        return Status::OK();
326
12.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
298
10.2k
    Status init() override {
299
10.2k
        CHECK(!_parsed);
300
10.2k
        size_t unused;
301
10.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
10.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
10.2k
        if (_data.size !=
305
10.2k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
5
            std::stringstream ss;
307
5
            ss << "Size information unmatched, _data.size:" << _data.size
308
5
               << ", _num_elements:" << _num_elements << ", expected size is "
309
5
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
5
            return Status::InternalError(ss.str());
311
5
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
10.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
10.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
10.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
10.1k
        _parsed = true;
325
10.1k
        return Status::OK();
326
10.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
397
    Status init() override {
299
397
        CHECK(!_parsed);
300
397
        size_t unused;
301
397
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
397
                                                 _num_element_after_padding, _size_of_element));
303
304
397
        if (_data.size !=
305
397
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
1
            std::stringstream ss;
307
1
            ss << "Size information unmatched, _data.size:" << _data.size
308
1
               << ", _num_elements:" << _num_elements << ", expected size is "
309
1
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
1
            return Status::InternalError(ss.str());
311
1
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
396
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
396
                     _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
396
        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
396
        _parsed = true;
325
396
        return Status::OK();
326
396
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
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
2
            std::stringstream ss;
307
2
            ss << "Size information unmatched, _data.size:" << _data.size
308
2
               << ", _num_elements:" << _num_elements << ", expected size is "
309
2
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
2
            return Status::InternalError(ss.str());
311
2
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
6
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
6
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
6
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
6
        _parsed = true;
325
6
        return Status::OK();
326
6
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
298
20
    Status init() override {
299
20
        CHECK(!_parsed);
300
20
        size_t unused;
301
20
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
20
                                                 _num_element_after_padding, _size_of_element));
303
304
20
        if (_data.size !=
305
20
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
4
            std::stringstream ss;
307
4
            ss << "Size information unmatched, _data.size:" << _data.size
308
4
               << ", _num_elements:" << _num_elements << ", expected size is "
309
4
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
4
            return Status::InternalError(ss.str());
311
4
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
16
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
16
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
16
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
16
        _parsed = true;
325
16
        return Status::OK();
326
16
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
298
28
    Status init() override {
299
28
        CHECK(!_parsed);
300
28
        size_t unused;
301
28
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
28
                                                 _num_element_after_padding, _size_of_element));
303
304
28
        if (_data.size !=
305
28
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
1
            std::stringstream ss;
307
1
            ss << "Size information unmatched, _data.size:" << _data.size
308
1
               << ", _num_elements:" << _num_elements << ", expected size is "
309
1
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
1
            return Status::InternalError(ss.str());
311
1
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
27
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
27
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
27
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
27
        _parsed = true;
325
27
        return Status::OK();
326
27
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
1.13k
    Status init() override {
299
1.13k
        CHECK(!_parsed);
300
1.13k
        size_t unused;
301
1.13k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.13k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.13k
        if (_data.size !=
305
1.13k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.13k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.13k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.13k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.13k
        _parsed = true;
325
1.13k
        return Status::OK();
326
1.13k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
28
    Status init() override {
299
28
        CHECK(!_parsed);
300
28
        size_t unused;
301
28
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
28
                                                 _num_element_after_padding, _size_of_element));
303
304
28
        if (_data.size !=
305
28
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
28
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
28
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
28
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
28
        _parsed = true;
325
28
        return Status::OK();
326
28
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
298
28
    Status init() override {
299
28
        CHECK(!_parsed);
300
28
        size_t unused;
301
28
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
28
                                                 _num_element_after_padding, _size_of_element));
303
304
28
        if (_data.size !=
305
28
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
28
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
28
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
28
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
28
        _parsed = true;
325
28
        return Status::OK();
326
28
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
298
565
    Status init() override {
299
565
        CHECK(!_parsed);
300
565
        size_t unused;
301
565
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
565
                                                 _num_element_after_padding, _size_of_element));
303
304
565
        if (_data.size !=
305
565
            _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
565
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
565
                     _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
565
        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
565
        _parsed = true;
325
565
        return Status::OK();
326
565
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
Line
Count
Source
298
3
    Status init() override {
299
3
        CHECK(!_parsed);
300
3
        size_t unused;
301
3
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
3
                                                 _num_element_after_padding, _size_of_element));
303
304
3
        if (_data.size !=
305
3
            _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
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
3
                     _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
        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
        _parsed = true;
325
3
        return Status::OK();
326
3
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
23
    Status init() override {
299
23
        CHECK(!_parsed);
300
23
        size_t unused;
301
23
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
23
                                                 _num_element_after_padding, _size_of_element));
303
304
23
        if (_data.size !=
305
23
            _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
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
23
                     _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
        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
        _parsed = true;
325
23
        return Status::OK();
326
23
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
29
    Status init() override {
299
29
        CHECK(!_parsed);
300
29
        size_t unused;
301
29
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
29
                                                 _num_element_after_padding, _size_of_element));
303
304
29
        if (_data.size !=
305
29
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
29
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
29
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
29
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
29
        _parsed = true;
325
29
        return Status::OK();
326
29
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
298
25
    Status init() override {
299
25
        CHECK(!_parsed);
300
25
        size_t unused;
301
25
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
25
                                                 _num_element_after_padding, _size_of_element));
303
304
25
        if (_data.size !=
305
25
            _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
25
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
25
                     _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
25
        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
25
        _parsed = true;
325
25
        return Status::OK();
326
25
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE4initEv
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_9FieldTypeE15EE4initEv
Line
Count
Source
298
29
    Status init() override {
299
29
        CHECK(!_parsed);
300
29
        size_t unused;
301
29
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
29
                                                 _num_element_after_padding, _size_of_element));
303
304
29
        if (_data.size !=
305
29
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
29
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
29
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
29
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
29
        _parsed = true;
325
29
        return Status::OK();
326
29
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
298
24
    Status init() override {
299
24
        CHECK(!_parsed);
300
24
        size_t unused;
301
24
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
24
                                                 _num_element_after_padding, _size_of_element));
303
304
24
        if (_data.size !=
305
24
            _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
24
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
24
                     _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
24
        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
24
        _parsed = true;
325
24
        return Status::OK();
326
24
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
298
23
    Status init() override {
299
23
        CHECK(!_parsed);
300
23
        size_t unused;
301
23
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
23
                                                 _num_element_after_padding, _size_of_element));
303
304
23
        if (_data.size !=
305
23
            _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
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
23
                     _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
        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
        _parsed = true;
325
23
        return Status::OK();
326
23
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
298
24
    Status init() override {
299
24
        CHECK(!_parsed);
300
24
        size_t unused;
301
24
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
24
                                                 _num_element_after_padding, _size_of_element));
303
304
24
        if (_data.size !=
305
24
            _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
24
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
24
                     _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
24
        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
24
        _parsed = true;
325
24
        return Status::OK();
326
24
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
298
28
    Status init() override {
299
28
        CHECK(!_parsed);
300
28
        size_t unused;
301
28
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
28
                                                 _num_element_after_padding, _size_of_element));
303
304
28
        if (_data.size !=
305
28
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
28
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
28
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
28
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
28
        _parsed = true;
325
28
        return Status::OK();
326
28
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
298
36
    Status init() override {
299
36
        CHECK(!_parsed);
300
36
        size_t unused;
301
36
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
36
                                                 _num_element_after_padding, _size_of_element));
303
304
36
        if (_data.size !=
305
36
            _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
36
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
36
                     _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
36
        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
36
        _parsed = true;
325
36
        return Status::OK();
326
36
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
298
23
    Status init() override {
299
23
        CHECK(!_parsed);
300
23
        size_t unused;
301
23
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
23
                                                 _num_element_after_padding, _size_of_element));
303
304
23
        if (_data.size !=
305
23
            _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
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
23
                     _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
        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
        _parsed = true;
325
23
        return Status::OK();
326
23
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
298
28
    Status init() override {
299
28
        CHECK(!_parsed);
300
28
        size_t unused;
301
28
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
28
                                                 _num_element_after_padding, _size_of_element));
303
304
28
        if (_data.size !=
305
28
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
28
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
28
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
28
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
28
        _parsed = true;
325
28
        return Status::OK();
326
28
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE4initEv
Line
Count
Source
298
9
    Status init() override {
299
9
        CHECK(!_parsed);
300
9
        size_t unused;
301
9
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
9
                                                 _num_element_after_padding, _size_of_element));
303
304
9
        if (_data.size !=
305
9
            _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
9
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
9
                     _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
9
        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
9
        _parsed = true;
325
9
        return Status::OK();
326
9
    }
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
8.70k
    Status seek_to_position_in_page(size_t pos) override {
335
8.70k
        DCHECK(_parsed) << "Must call init()";
336
8.70k
        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.70k
        DCHECK_LE(pos, _num_elements);
344
8.70k
        _cur_index = pos;
345
8.70k
        return Status::OK();
346
8.70k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
5.88k
    Status seek_to_position_in_page(size_t pos) override {
335
5.88k
        DCHECK(_parsed) << "Must call init()";
336
5.88k
        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
5.88k
        DCHECK_LE(pos, _num_elements);
344
5.88k
        _cur_index = pos;
345
5.88k
        return Status::OK();
346
5.88k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.85k
    Status seek_to_position_in_page(size_t pos) override {
335
1.85k
        DCHECK(_parsed) << "Must call init()";
336
1.85k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
1.85k
        DCHECK_LE(pos, _num_elements);
344
1.85k
        _cur_index = pos;
345
1.85k
        return Status::OK();
346
1.85k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
100
    Status seek_to_position_in_page(size_t pos) override {
335
100
        DCHECK(_parsed) << "Must call init()";
336
100
        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
100
        DCHECK_LE(pos, _num_elements);
344
100
        _cur_index = pos;
345
100
        return Status::OK();
346
100
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
334
300
    Status seek_to_position_in_page(size_t pos) override {
335
300
        DCHECK(_parsed) << "Must call init()";
336
300
        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
300
        DCHECK_LE(pos, _num_elements);
344
300
        _cur_index = pos;
345
300
        return Status::OK();
346
300
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
462
    Status seek_to_position_in_page(size_t pos) override {
335
462
        DCHECK(_parsed) << "Must call init()";
336
462
        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
462
        DCHECK_LE(pos, _num_elements);
344
462
        _cur_index = pos;
345
462
        return Status::OK();
346
462
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
1
    Status seek_to_position_in_page(size_t pos) override {
335
1
        DCHECK(_parsed) << "Must call init()";
336
1
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
1
        DCHECK_LE(pos, _num_elements);
344
1
        _cur_index = pos;
345
1
        return Status::OK();
346
1
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
334
106
    Status seek_to_position_in_page(size_t pos) override {
335
106
        DCHECK(_parsed) << "Must call init()";
336
106
        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
106
        DCHECK_LE(pos, _num_elements);
344
106
        _cur_index = pos;
345
106
        return Status::OK();
346
106
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_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
1
    Status seek_to_position_in_page(size_t pos) override {
335
1
        DCHECK(_parsed) << "Must call init()";
336
1
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
1
        DCHECK_LE(pos, _num_elements);
344
1
        _cur_index = pos;
345
1
        return Status::OK();
346
1
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
1
    Status seek_to_position_in_page(size_t pos) override {
335
1
        DCHECK(_parsed) << "Must call init()";
336
1
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
1
        DCHECK_LE(pos, _num_elements);
344
1
        _cur_index = pos;
345
1
        return Status::OK();
346
1
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_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
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE24seek_to_position_in_pageEm
347
348
15
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
349
15
        DCHECK(_parsed) << "Must call init() firstly";
350
351
15
        if (_num_elements == 0) {
352
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
353
0
        }
354
355
15
        size_t left = 0;
356
15
        size_t right = _num_elements;
357
358
15
        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
162
        while (left < right) {
364
147
            size_t mid = left + (right - left) / 2;
365
147
            mid_value = get_data(mid);
366
147
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
367
66
                left = mid + 1;
368
81
            } else {
369
81
                right = mid;
370
81
            }
371
147
        }
372
15
        if (left >= _num_elements) {
373
3
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
374
3
        }
375
12
        void* find_value = get_data(left);
376
12
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
377
9
            *exact_match = true;
378
9
        } else {
379
3
            *exact_match = false;
380
3
        }
381
382
12
        _cur_index = left;
383
12
        return Status::OK();
384
15
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE22seek_at_or_after_valueEPKvPb
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE22seek_at_or_after_valueEPKvPb
Line
Count
Source
348
5
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
349
5
        DCHECK(_parsed) << "Must call init() firstly";
350
351
5
        if (_num_elements == 0) {
352
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
353
0
        }
354
355
5
        size_t left = 0;
356
5
        size_t right = _num_elements;
357
358
5
        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
54
        while (left < right) {
364
49
            size_t mid = left + (right - left) / 2;
365
49
            mid_value = get_data(mid);
366
49
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
367
21
                left = mid + 1;
368
28
            } else {
369
28
                right = mid;
370
28
            }
371
49
        }
372
5
        if (left >= _num_elements) {
373
1
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
374
1
        }
375
4
        void* find_value = get_data(left);
376
4
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
377
3
            *exact_match = true;
378
3
        } else {
379
1
            *exact_match = false;
380
1
        }
381
382
4
        _cur_index = left;
383
4
        return Status::OK();
384
5
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE22seek_at_or_after_valueEPKvPb
Line
Count
Source
348
5
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
349
5
        DCHECK(_parsed) << "Must call init() firstly";
350
351
5
        if (_num_elements == 0) {
352
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
353
0
        }
354
355
5
        size_t left = 0;
356
5
        size_t right = _num_elements;
357
358
5
        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
54
        while (left < right) {
364
49
            size_t mid = left + (right - left) / 2;
365
49
            mid_value = get_data(mid);
366
49
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
367
22
                left = mid + 1;
368
27
            } else {
369
27
                right = mid;
370
27
            }
371
49
        }
372
5
        if (left >= _num_elements) {
373
1
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
374
1
        }
375
4
        void* find_value = get_data(left);
376
4
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
377
3
            *exact_match = true;
378
3
        } else {
379
1
            *exact_match = false;
380
1
        }
381
382
4
        _cur_index = left;
383
4
        return Status::OK();
384
5
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE22seek_at_or_after_valueEPKvPb
Line
Count
Source
348
5
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
349
5
        DCHECK(_parsed) << "Must call init() firstly";
350
351
5
        if (_num_elements == 0) {
352
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
353
0
        }
354
355
5
        size_t left = 0;
356
5
        size_t right = _num_elements;
357
358
5
        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
54
        while (left < right) {
364
49
            size_t mid = left + (right - left) / 2;
365
49
            mid_value = get_data(mid);
366
49
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
367
23
                left = mid + 1;
368
26
            } else {
369
26
                right = mid;
370
26
            }
371
49
        }
372
5
        if (left >= _num_elements) {
373
1
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
374
1
        }
375
4
        void* find_value = get_data(left);
376
4
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
377
3
            *exact_match = true;
378
3
        } else {
379
1
            *exact_match = false;
380
1
        }
381
382
4
        _cur_index = left;
383
4
        return Status::OK();
384
5
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_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
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE22seek_at_or_after_valueEPKvPb
385
386
    template <bool forward_index = true>
387
57.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
57.4k
        DCHECK(_parsed);
389
57.4k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
57.4k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
57.4k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
57.4k
        *n = max_fetch;
398
57.4k
        if constexpr (forward_index) {
399
56.9k
            _cur_index += max_fetch;
400
56.9k
        }
401
402
57.4k
        return Status::OK();
403
57.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
44.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
44.7k
        DCHECK(_parsed);
389
44.7k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
44.7k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
44.7k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
44.7k
        *n = max_fetch;
398
44.7k
        if constexpr (forward_index) {
399
44.7k
            _cur_index += max_fetch;
400
44.7k
        }
401
402
44.7k
        return Status::OK();
403
44.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
7.22k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
7.22k
        DCHECK(_parsed);
389
7.22k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
7.22k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
7.22k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
7.22k
        *n = max_fetch;
398
7.22k
        if constexpr (forward_index) {
399
7.22k
            _cur_index += max_fetch;
400
7.22k
        }
401
402
7.22k
        return Status::OK();
403
7.22k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
128
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
128
        DCHECK(_parsed);
389
128
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
128
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
128
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
128
        *n = max_fetch;
398
128
        if constexpr (forward_index) {
399
128
            _cur_index += max_fetch;
400
128
        }
401
402
128
        return Status::OK();
403
128
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
337
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
337
        DCHECK(_parsed);
389
337
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
337
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
337
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
337
        *n = max_fetch;
398
337
        if constexpr (forward_index) {
399
337
            _cur_index += max_fetch;
400
337
        }
401
402
337
        return Status::OK();
403
337
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
48
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
48
        DCHECK(_parsed);
389
48
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
48
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
48
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
48
        *n = max_fetch;
398
48
        if constexpr (forward_index) {
399
48
            _cur_index += max_fetch;
400
48
        }
401
402
48
        return Status::OK();
403
48
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.06k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.06k
        DCHECK(_parsed);
389
3.06k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.06k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.06k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.06k
        *n = max_fetch;
398
3.06k
        if constexpr (forward_index) {
399
3.06k
            _cur_index += max_fetch;
400
3.06k
        }
401
402
3.06k
        return Status::OK();
403
3.06k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
67
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
67
        DCHECK(_parsed);
389
67
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
67
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
67
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
67
        *n = max_fetch;
398
67
        if constexpr (forward_index) {
399
67
            _cur_index += max_fetch;
400
67
        }
401
402
67
        return Status::OK();
403
67
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
50
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
50
        DCHECK(_parsed);
389
50
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
50
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
50
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
50
        *n = max_fetch;
398
50
        if constexpr (forward_index) {
399
50
            _cur_index += max_fetch;
400
50
        }
401
402
50
        return Status::OK();
403
50
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
579
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
579
        DCHECK(_parsed);
389
579
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
579
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
579
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
579
        *n = max_fetch;
398
579
        if constexpr (forward_index) {
399
579
            _cur_index += max_fetch;
400
579
        }
401
402
579
        return Status::OK();
403
579
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
553
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
553
        DCHECK(_parsed);
389
553
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
553
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
553
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
553
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
553
        return Status::OK();
403
553
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
93
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
93
        DCHECK(_parsed);
389
93
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
93
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
93
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
93
        *n = max_fetch;
398
93
        if constexpr (forward_index) {
399
93
            _cur_index += max_fetch;
400
93
        }
401
402
93
        return Status::OK();
403
93
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
54
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
54
        DCHECK(_parsed);
389
54
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
54
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
54
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
54
        *n = max_fetch;
398
54
        if constexpr (forward_index) {
399
54
            _cur_index += max_fetch;
400
54
        }
401
402
54
        return Status::OK();
403
54
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
47
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
47
        DCHECK(_parsed);
389
47
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
47
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
47
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
47
        *n = max_fetch;
398
47
        if constexpr (forward_index) {
399
47
            _cur_index += max_fetch;
400
47
        }
401
402
47
        return Status::OK();
403
47
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
46
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
46
        DCHECK(_parsed);
389
46
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
46
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
46
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
46
        *n = max_fetch;
398
46
        if constexpr (forward_index) {
399
46
            _cur_index += max_fetch;
400
46
        }
401
402
46
        return Status::OK();
403
46
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
26
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
26
        DCHECK(_parsed);
389
26
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
26
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
26
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
26
        *n = max_fetch;
398
26
        if constexpr (forward_index) {
399
26
            _cur_index += max_fetch;
400
26
        }
401
402
26
        return Status::OK();
403
26
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
47
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
47
        DCHECK(_parsed);
389
47
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
47
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
47
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
47
        *n = max_fetch;
398
47
        if constexpr (forward_index) {
399
47
            _cur_index += max_fetch;
400
47
        }
401
402
47
        return Status::OK();
403
47
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
46
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
46
        DCHECK(_parsed);
389
46
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
46
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
46
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
46
        *n = max_fetch;
398
46
        if constexpr (forward_index) {
399
46
            _cur_index += max_fetch;
400
46
        }
401
402
46
        return Status::OK();
403
46
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
46
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
46
        DCHECK(_parsed);
389
46
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
46
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
46
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
46
        *n = max_fetch;
398
46
        if constexpr (forward_index) {
399
46
            _cur_index += max_fetch;
400
46
        }
401
402
46
        return Status::OK();
403
46
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
46
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
46
        DCHECK(_parsed);
389
46
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
46
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
46
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
46
        *n = max_fetch;
398
46
        if constexpr (forward_index) {
399
46
            _cur_index += max_fetch;
400
46
        }
401
402
46
        return Status::OK();
403
46
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
50
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
50
        DCHECK(_parsed);
389
50
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
50
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
50
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
50
        *n = max_fetch;
398
50
        if constexpr (forward_index) {
399
50
            _cur_index += max_fetch;
400
50
        }
401
402
50
        return Status::OK();
403
50
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
58
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
58
        DCHECK(_parsed);
389
58
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
58
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
58
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
58
        *n = max_fetch;
398
58
        if constexpr (forward_index) {
399
58
            _cur_index += max_fetch;
400
58
        }
401
402
58
        return Status::OK();
403
58
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
46
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
46
        DCHECK(_parsed);
389
46
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
46
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
46
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
46
        *n = max_fetch;
398
46
        if constexpr (forward_index) {
399
46
            _cur_index += max_fetch;
400
46
        }
401
402
46
        return Status::OK();
403
46
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
50
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
50
        DCHECK(_parsed);
389
50
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
50
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
50
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
50
        *n = max_fetch;
398
50
        if constexpr (forward_index) {
399
50
            _cur_index += max_fetch;
400
50
        }
401
402
50
        return Status::OK();
403
50
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
32
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
32
        DCHECK(_parsed);
389
32
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
32
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
32
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
32
        *n = max_fetch;
398
32
        if constexpr (forward_index) {
399
32
            _cur_index += max_fetch;
400
32
        }
401
402
32
        return Status::OK();
403
32
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
404
405
56.9k
    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
44.7k
    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
7.22k
    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
128
    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
337
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
48
    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
3.06k
    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
67
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
50
    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
579
    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_9FieldTypeE24EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
93
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
54
    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
47
    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
46
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
26
    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
47
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
46
    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
46
    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
46
    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
50
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
58
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
46
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
50
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
32
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
406
407
    Status read_by_rowids(const rowid_t* rowids, ordinal_t page_first_ordinal, size_t* n,
408
3.45k
                          MutableColumnPtr& dst) override {
409
3.45k
        DCHECK(_parsed);
410
3.45k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
3.45k
        auto total = *n;
416
3.45k
        auto read_count = 0;
417
3.45k
        _buffer.resize(total);
418
3.32M
        for (size_t i = 0; i < total; ++i) {
419
3.32M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
3.32M
            if (UNLIKELY(ord >= _num_elements)) {
421
17
                break;
422
17
            }
423
424
3.32M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
3.32M
        }
426
427
3.45k
        if (LIKELY(read_count > 0)) {
428
3.45k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
3.45k
        }
430
431
3.45k
        *n = read_count;
432
3.45k
        return Status::OK();
433
3.45k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
2.53k
                          MutableColumnPtr& dst) override {
409
2.53k
        DCHECK(_parsed);
410
2.53k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
2.53k
        auto total = *n;
416
2.53k
        auto read_count = 0;
417
2.53k
        _buffer.resize(total);
418
2.76M
        for (size_t i = 0; i < total; ++i) {
419
2.76M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
2.76M
            if (UNLIKELY(ord >= _num_elements)) {
421
9
                break;
422
9
            }
423
424
2.76M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
2.76M
        }
426
427
2.53k
        if (LIKELY(read_count > 0)) {
428
2.53k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
2.53k
        }
430
431
2.53k
        *n = read_count;
432
2.53k
        return Status::OK();
433
2.53k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
216
                          MutableColumnPtr& dst) override {
409
216
        DCHECK(_parsed);
410
216
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
216
        auto total = *n;
416
216
        auto read_count = 0;
417
216
        _buffer.resize(total);
418
769
        for (size_t i = 0; i < total; ++i) {
419
553
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
553
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
553
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
553
        }
426
427
216
        if (LIKELY(read_count > 0)) {
428
216
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
216
        }
430
431
216
        *n = read_count;
432
216
        return Status::OK();
433
216
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
568
                          MutableColumnPtr& dst) override {
409
568
        DCHECK(_parsed);
410
568
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
568
        auto total = *n;
416
568
        auto read_count = 0;
417
568
        _buffer.resize(total);
418
549k
        for (size_t i = 0; i < total; ++i) {
419
548k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
548k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
548k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
548k
        }
426
427
568
        if (LIKELY(read_count > 0)) {
428
568
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
568
        }
430
431
568
        *n = read_count;
432
568
        return Status::OK();
433
568
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_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
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
127
                          MutableColumnPtr& dst) override {
409
127
        DCHECK(_parsed);
410
127
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
127
        auto total = *n;
416
127
        auto read_count = 0;
417
127
        _buffer.resize(total);
418
10.9k
        for (size_t i = 0; i < total; ++i) {
419
10.8k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
10.8k
            if (UNLIKELY(ord >= _num_elements)) {
421
8
                break;
422
8
            }
423
424
10.8k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
10.8k
        }
426
427
127
        if (LIKELY(read_count > 0)) {
428
127
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
127
        }
430
431
127
        *n = read_count;
432
127
        return Status::OK();
433
127
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
5
                          MutableColumnPtr& dst) override {
409
5
        DCHECK(_parsed);
410
5
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
5
        auto total = *n;
416
5
        auto read_count = 0;
417
5
        _buffer.resize(total);
418
11
        for (size_t i = 0; i < total; ++i) {
419
6
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
6
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
6
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
6
        }
426
427
5
        if (LIKELY(read_count > 0)) {
428
5
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
5
        }
430
431
5
        *n = read_count;
432
5
        return Status::OK();
433
5
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1
                          MutableColumnPtr& dst) override {
409
1
        DCHECK(_parsed);
410
1
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1
        auto total = *n;
416
1
        auto read_count = 0;
417
1
        _buffer.resize(total);
418
2
        for (size_t i = 0; i < total; ++i) {
419
1
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
1
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1
        }
426
427
1
        if (LIKELY(read_count > 0)) {
428
1
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1
        }
430
431
1
        *n = read_count;
432
1
        return Status::OK();
433
1
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_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
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
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
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
434
435
553
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
553
        return next_batch<false>(n, dst);
437
553
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE15peek_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_9FieldTypeE9EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
435
553
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
553
        return next_batch<false>(n, dst);
437
553
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_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
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
438
439
4
    size_t count() const override { return _num_elements; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
439
4
    size_t count() const override { return _num_elements; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_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
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE5countEv
440
441
8.90k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
4.69k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
3.79k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE13current_indexEv
Line
Count
Source
441
106
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
308
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE13current_indexEv
Line
Count
Source
441
5
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE13current_indexEv
442
443
3.39M
    char* get_data(size_t index) const {
444
3.39M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
3.39M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
2.81M
    char* get_data(size_t index) const {
444
2.81M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
2.81M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
443
7.78k
    char* get_data(size_t index) const {
444
7.78k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
7.78k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
181
    char* get_data(size_t index) const {
444
181
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
181
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
390
    char* get_data(size_t index) const {
444
390
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
390
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
443
101
    char* get_data(size_t index) const {
444
101
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
101
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
551k
    char* get_data(size_t index) const {
444
551k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
551k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
443
71
    char* get_data(size_t index) const {
444
71
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
71
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
50
    char* get_data(size_t index) const {
444
50
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
50
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
12.0k
    char* get_data(size_t index) const {
444
12.0k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
12.0k
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
Line
Count
Source
443
93
    char* get_data(size_t index) const {
444
93
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
93
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
54
    char* get_data(size_t index) const {
444
54
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
54
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
53
    char* get_data(size_t index) const {
444
53
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
53
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
443
47
    char* get_data(size_t index) const {
444
47
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
47
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE8get_dataEm
Line
Count
Source
443
26
    char* get_data(size_t index) const {
444
26
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
26
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
443
51
    char* get_data(size_t index) const {
444
51
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
51
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
443
46
    char* get_data(size_t index) const {
444
46
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
46
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
443
46
    char* get_data(size_t index) const {
444
46
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
46
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
443
46
    char* get_data(size_t index) const {
444
46
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
46
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
50
    char* get_data(size_t index) const {
444
50
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
50
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
443
58
    char* get_data(size_t index) const {
444
58
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
58
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Line
Count
Source
443
46
    char* get_data(size_t index) const {
444
46
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
46
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
Line
Count
Source
443
50
    char* get_data(size_t index) const {
444
50
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
50
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE8get_dataEm
Line
Count
Source
443
32
    char* get_data(size_t index) const {
444
32
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
32
    }
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