Coverage Report

Created: 2026-04-10 04:05

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
18.0k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
16.4k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
626
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
13
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
651
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
95
342
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
2
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
95
2
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
4
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
7
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
11
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
2
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
96
97
1.54M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
1.52M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
1.40k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
13
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
17.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
343
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
2
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12is_page_fullEv
Line
Count
Source
97
2
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12is_page_fullEv
Line
Count
Source
97
4
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
7
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
97
11
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
97
2
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
98
99
683k
    Status add(const uint8_t* vals, size_t* count) override {
100
683k
        return add_internal<false>(vals, count);
101
683k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
99
664k
    Status add(const uint8_t* vals, size_t* count) override {
100
664k
        return add_internal<false>(vals, count);
101
664k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
1.40k
    Status add(const uint8_t* vals, size_t* count) override {
100
1.40k
        return add_internal<false>(vals, count);
101
1.40k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
13
    Status add(const uint8_t* vals, size_t* count) override {
100
13
        return add_internal<false>(vals, count);
101
13
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
17.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
17.3k
        return add_internal<false>(vals, count);
101
17.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
343
    Status add(const uint8_t* vals, size_t* count) override {
100
343
        return add_internal<false>(vals, count);
101
343
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
2
    Status add(const uint8_t* vals, size_t* count) override {
100
2
        return add_internal<false>(vals, count);
101
2
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
99
2
    Status add(const uint8_t* vals, size_t* count) override {
100
2
        return add_internal<false>(vals, count);
101
2
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
4
    Status add(const uint8_t* vals, size_t* count) override {
100
4
        return add_internal<false>(vals, count);
101
4
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
7
    Status add(const uint8_t* vals, size_t* count) override {
100
7
        return add_internal<false>(vals, count);
101
7
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
99
11
    Status add(const uint8_t* vals, size_t* count) override {
100
11
        return add_internal<false>(vals, count);
101
11
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
2
    Status add(const uint8_t* vals, size_t* count) override {
100
2
        return add_internal<false>(vals, count);
101
2
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
102
103
840k
    Status single_add(const uint8_t* vals, size_t* count) {
104
840k
        return add_internal<true>(vals, count);
105
840k
    }
106
107
    template <bool single>
108
1.52M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
1.52M
        DCHECK(!_finished);
110
1.52M
        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.52M
        uint32_t to_add = cast_set<UInt32>(
126
1.52M
                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.52M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
1.52M
        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.52M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
1.52M
        _count += to_add;
134
1.52M
        _remain_element_capacity -= to_add;
135
1.52M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
1.52M
        *num_written = to_add;
138
1.52M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
840k
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
840k
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
840k
                        *reinterpret_cast<const uint32_t*>(vals);
149
840k
                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
840k
        }
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.52M
        return Status::OK();
159
1.52M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
664k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
664k
        DCHECK(!_finished);
110
664k
        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
664k
        uint32_t to_add = cast_set<UInt32>(
126
664k
                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
664k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
664k
        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
664k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
664k
        _count += to_add;
134
664k
        _remain_element_capacity -= to_add;
135
664k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
664k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
664k
        memcpy(&_data[orig_size], vals, to_add_size);
158
664k
        return Status::OK();
159
664k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
840k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
840k
        DCHECK(!_finished);
110
840k
        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
840k
        uint32_t to_add = cast_set<UInt32>(
126
840k
                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
840k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
840k
        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
840k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
840k
        _count += to_add;
134
840k
        _remain_element_capacity -= to_add;
135
840k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
840k
        *num_written = to_add;
138
840k
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
840k
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
840k
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
840k
                        *reinterpret_cast<const uint32_t*>(vals);
149
840k
                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
840k
        }
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
840k
        return Status::OK();
159
840k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
1.40k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
1.40k
        DCHECK(!_finished);
110
1.40k
        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.40k
        uint32_t to_add = cast_set<UInt32>(
126
1.40k
                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.40k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
1.40k
        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.40k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
1.40k
        _count += to_add;
134
1.40k
        _remain_element_capacity -= to_add;
135
1.40k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
1.40k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
1.40k
        memcpy(&_data[orig_size], vals, to_add_size);
158
1.40k
        return Status::OK();
159
1.40k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
13
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
13
        DCHECK(!_finished);
110
13
        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
        uint32_t to_add = cast_set<UInt32>(
126
13
                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
        int to_add_size = to_add * SIZE_OF_TYPE;
129
13
        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
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
13
        _count += to_add;
134
13
        _remain_element_capacity -= to_add;
135
13
        _raw_data_size += to_add_size;
136
        // return added number through count
137
13
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
13
        memcpy(&_data[orig_size], vals, to_add_size);
158
13
        return Status::OK();
159
13
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
17.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
17.3k
        DCHECK(!_finished);
110
17.3k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
17.3k
        uint32_t to_add = cast_set<UInt32>(
126
17.3k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
17.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
17.3k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
17.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
17.3k
        _count += to_add;
134
17.3k
        _remain_element_capacity -= to_add;
135
17.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
17.3k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
17.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
17.3k
        return Status::OK();
159
17.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
343
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
343
        DCHECK(!_finished);
110
343
        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
343
        uint32_t to_add = cast_set<UInt32>(
126
343
                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
343
        int to_add_size = to_add * SIZE_OF_TYPE;
129
343
        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
343
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
343
        _count += to_add;
134
343
        _remain_element_capacity -= to_add;
135
343
        _raw_data_size += to_add_size;
136
        // return added number through count
137
343
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
343
        memcpy(&_data[orig_size], vals, to_add_size);
158
343
        return Status::OK();
159
343
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
2
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
2
        DCHECK(!_finished);
110
2
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
2
        uint32_t to_add = cast_set<UInt32>(
126
2
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
2
        int to_add_size = to_add * SIZE_OF_TYPE;
129
2
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
2
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
2
        _count += to_add;
134
2
        _remain_element_capacity -= to_add;
135
2
        _raw_data_size += to_add_size;
136
        // return added number through count
137
2
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
2
        memcpy(&_data[orig_size], vals, to_add_size);
158
2
        return Status::OK();
159
2
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
2
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
2
        DCHECK(!_finished);
110
2
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
2
        uint32_t to_add = cast_set<UInt32>(
126
2
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
2
        int to_add_size = to_add * SIZE_OF_TYPE;
129
2
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
2
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
2
        _count += to_add;
134
2
        _remain_element_capacity -= to_add;
135
2
        _raw_data_size += to_add_size;
136
        // return added number through count
137
2
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
2
        memcpy(&_data[orig_size], vals, to_add_size);
158
2
        return Status::OK();
159
2
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
4
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
4
        DCHECK(!_finished);
110
4
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
4
        uint32_t to_add = cast_set<UInt32>(
126
4
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
4
        int to_add_size = to_add * SIZE_OF_TYPE;
129
4
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
4
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
4
        _count += to_add;
134
4
        _remain_element_capacity -= to_add;
135
4
        _raw_data_size += to_add_size;
136
        // return added number through count
137
4
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
4
        memcpy(&_data[orig_size], vals, to_add_size);
158
4
        return Status::OK();
159
4
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
7
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
7
        DCHECK(!_finished);
110
7
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
7
        uint32_t to_add = cast_set<UInt32>(
126
7
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
7
        int to_add_size = to_add * SIZE_OF_TYPE;
129
7
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
7
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
7
        _count += to_add;
134
7
        _remain_element_capacity -= to_add;
135
7
        _raw_data_size += to_add_size;
136
        // return added number through count
137
7
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
7
        memcpy(&_data[orig_size], vals, to_add_size);
158
7
        return Status::OK();
159
7
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
11
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
11
        DCHECK(!_finished);
110
11
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
11
        uint32_t to_add = cast_set<UInt32>(
126
11
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
11
        int to_add_size = to_add * SIZE_OF_TYPE;
129
11
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
11
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
11
        _count += to_add;
134
11
        _remain_element_capacity -= to_add;
135
11
        _raw_data_size += to_add_size;
136
        // return added number through count
137
11
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
11
        memcpy(&_data[orig_size], vals, to_add_size);
158
11
        return Status::OK();
159
11
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
2
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
2
        DCHECK(!_finished);
110
2
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
2
        uint32_t to_add = cast_set<UInt32>(
126
2
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
2
        int to_add_size = to_add * SIZE_OF_TYPE;
129
2
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
2
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
2
        _count += to_add;
134
2
        _remain_element_capacity -= to_add;
135
2
        _raw_data_size += to_add_size;
136
        // return added number through count
137
2
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
2
        memcpy(&_data[orig_size], vals, to_add_size);
158
2
        return Status::OK();
159
2
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
160
161
18.5k
    Status finish(OwnedSlice* slice) override {
162
18.5k
        if (_count > 0) {
163
18.5k
            _first_value = cell(0);
164
18.5k
            _last_value = cell(_count - 1);
165
18.5k
        }
166
18.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
167
18.5k
        return Status::OK();
168
18.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
16.9k
    Status finish(OwnedSlice* slice) override {
162
16.9k
        if (_count > 0) {
163
16.9k
            _first_value = cell(0);
164
16.9k
            _last_value = cell(_count - 1);
165
16.9k
        }
166
16.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
167
16.9k
        return Status::OK();
168
16.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
637
    Status finish(OwnedSlice* slice) override {
162
637
        if (_count > 0) {
163
637
            _first_value = cell(0);
164
637
            _last_value = cell(_count - 1);
165
637
        }
166
637
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
167
637
        return Status::OK();
168
637
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
13
    Status finish(OwnedSlice* slice) override {
162
13
        if (_count > 0) {
163
13
            _first_value = cell(0);
164
13
            _last_value = cell(_count - 1);
165
13
        }
166
13
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
167
13
        return Status::OK();
168
13
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
626
    Status finish(OwnedSlice* slice) override {
162
626
        if (_count > 0) {
163
626
            _first_value = cell(0);
164
626
            _last_value = cell(_count - 1);
165
626
        }
166
626
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
167
626
        return Status::OK();
168
626
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
337
    Status finish(OwnedSlice* slice) override {
162
337
        if (_count > 0) {
163
337
            _first_value = cell(0);
164
337
            _last_value = cell(_count - 1);
165
337
        }
166
337
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
167
337
        return Status::OK();
168
337
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
2
    Status finish(OwnedSlice* slice) override {
162
2
        if (_count > 0) {
163
2
            _first_value = cell(0);
164
2
            _last_value = cell(_count - 1);
165
2
        }
166
2
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
167
2
        return Status::OK();
168
2
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
2
    Status finish(OwnedSlice* slice) override {
162
2
        if (_count > 0) {
163
2
            _first_value = cell(0);
164
2
            _last_value = cell(_count - 1);
165
2
        }
166
2
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
167
2
        return Status::OK();
168
2
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
4
    Status finish(OwnedSlice* slice) override {
162
4
        if (_count > 0) {
163
4
            _first_value = cell(0);
164
4
            _last_value = cell(_count - 1);
165
4
        }
166
4
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
167
4
        return Status::OK();
168
4
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7
    Status finish(OwnedSlice* slice) override {
162
7
        if (_count > 0) {
163
7
            _first_value = cell(0);
164
7
            _last_value = cell(_count - 1);
165
7
        }
166
7
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
167
7
        return Status::OK();
168
7
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
11
    Status finish(OwnedSlice* slice) override {
162
11
        if (_count > 0) {
163
11
            _first_value = cell(0);
164
11
            _last_value = cell(_count - 1);
165
11
        }
166
11
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
167
11
        return Status::OK();
168
11
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
2
    Status finish(OwnedSlice* slice) override {
162
2
        if (_count > 0) {
163
2
            _first_value = cell(0);
164
2
            _last_value = cell(_count - 1);
165
2
        }
166
2
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
167
2
        return Status::OK();
168
2
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
169
170
38.9k
    Status reset() override {
171
38.9k
        RETURN_IF_CATCH_EXCEPTION({
172
38.9k
            size_t block_size = _options.data_page_size;
173
38.9k
            _count = 0;
174
38.9k
            _raw_data_size = 0;
175
38.9k
            _data.clear();
176
38.9k
            _data.reserve(block_size);
177
38.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
178
38.9k
                    << "buffer must be naturally-aligned";
179
38.9k
            _buffer.clear();
180
38.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
181
38.9k
            _finished = false;
182
38.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
183
38.9k
        });
184
38.9k
        return Status::OK();
185
38.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
170
35.6k
    Status reset() override {
171
35.6k
        RETURN_IF_CATCH_EXCEPTION({
172
35.6k
            size_t block_size = _options.data_page_size;
173
35.6k
            _count = 0;
174
35.6k
            _raw_data_size = 0;
175
35.6k
            _data.clear();
176
35.6k
            _data.reserve(block_size);
177
35.6k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
178
35.6k
                    << "buffer must be naturally-aligned";
179
35.6k
            _buffer.clear();
180
35.6k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
181
35.6k
            _finished = false;
182
35.6k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
183
35.6k
        });
184
35.6k
        return Status::OK();
185
35.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
170
1.26k
    Status reset() override {
171
1.26k
        RETURN_IF_CATCH_EXCEPTION({
172
1.26k
            size_t block_size = _options.data_page_size;
173
1.26k
            _count = 0;
174
1.26k
            _raw_data_size = 0;
175
1.26k
            _data.clear();
176
1.26k
            _data.reserve(block_size);
177
1.26k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
178
1.26k
                    << "buffer must be naturally-aligned";
179
1.26k
            _buffer.clear();
180
1.26k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
181
1.26k
            _finished = false;
182
1.26k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
183
1.26k
        });
184
1.26k
        return Status::OK();
185
1.26k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
170
26
    Status reset() override {
171
26
        RETURN_IF_CATCH_EXCEPTION({
172
26
            size_t block_size = _options.data_page_size;
173
26
            _count = 0;
174
26
            _raw_data_size = 0;
175
26
            _data.clear();
176
26
            _data.reserve(block_size);
177
26
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
178
26
                    << "buffer must be naturally-aligned";
179
26
            _buffer.clear();
180
26
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
181
26
            _finished = false;
182
26
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
183
26
        });
184
26
        return Status::OK();
185
26
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
170
1.27k
    Status reset() override {
171
1.27k
        RETURN_IF_CATCH_EXCEPTION({
172
1.27k
            size_t block_size = _options.data_page_size;
173
1.27k
            _count = 0;
174
1.27k
            _raw_data_size = 0;
175
1.27k
            _data.clear();
176
1.27k
            _data.reserve(block_size);
177
1.27k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
178
1.27k
                    << "buffer must be naturally-aligned";
179
1.27k
            _buffer.clear();
180
1.27k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
181
1.27k
            _finished = false;
182
1.27k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
183
1.27k
        });
184
1.27k
        return Status::OK();
185
1.27k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
170
679
    Status reset() override {
171
679
        RETURN_IF_CATCH_EXCEPTION({
172
679
            size_t block_size = _options.data_page_size;
173
679
            _count = 0;
174
679
            _raw_data_size = 0;
175
679
            _data.clear();
176
679
            _data.reserve(block_size);
177
679
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
178
679
                    << "buffer must be naturally-aligned";
179
679
            _buffer.clear();
180
679
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
181
679
            _finished = false;
182
679
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
183
679
        });
184
679
        return Status::OK();
185
679
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
170
4
    Status reset() override {
171
4
        RETURN_IF_CATCH_EXCEPTION({
172
4
            size_t block_size = _options.data_page_size;
173
4
            _count = 0;
174
4
            _raw_data_size = 0;
175
4
            _data.clear();
176
4
            _data.reserve(block_size);
177
4
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
178
4
                    << "buffer must be naturally-aligned";
179
4
            _buffer.clear();
180
4
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
181
4
            _finished = false;
182
4
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
183
4
        });
184
4
        return Status::OK();
185
4
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
170
4
    Status reset() override {
171
4
        RETURN_IF_CATCH_EXCEPTION({
172
4
            size_t block_size = _options.data_page_size;
173
4
            _count = 0;
174
4
            _raw_data_size = 0;
175
4
            _data.clear();
176
4
            _data.reserve(block_size);
177
4
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
178
4
                    << "buffer must be naturally-aligned";
179
4
            _buffer.clear();
180
4
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
181
4
            _finished = false;
182
4
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
183
4
        });
184
4
        return Status::OK();
185
4
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
170
8
    Status reset() override {
171
8
        RETURN_IF_CATCH_EXCEPTION({
172
8
            size_t block_size = _options.data_page_size;
173
8
            _count = 0;
174
8
            _raw_data_size = 0;
175
8
            _data.clear();
176
8
            _data.reserve(block_size);
177
8
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
178
8
                    << "buffer must be naturally-aligned";
179
8
            _buffer.clear();
180
8
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
181
8
            _finished = false;
182
8
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
183
8
        });
184
8
        return Status::OK();
185
8
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
170
14
    Status reset() override {
171
14
        RETURN_IF_CATCH_EXCEPTION({
172
14
            size_t block_size = _options.data_page_size;
173
14
            _count = 0;
174
14
            _raw_data_size = 0;
175
14
            _data.clear();
176
14
            _data.reserve(block_size);
177
14
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
178
14
                    << "buffer must be naturally-aligned";
179
14
            _buffer.clear();
180
14
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
181
14
            _finished = false;
182
14
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
183
14
        });
184
14
        return Status::OK();
185
14
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
170
22
    Status reset() override {
171
22
        RETURN_IF_CATCH_EXCEPTION({
172
22
            size_t block_size = _options.data_page_size;
173
22
            _count = 0;
174
22
            _raw_data_size = 0;
175
22
            _data.clear();
176
22
            _data.reserve(block_size);
177
22
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
178
22
                    << "buffer must be naturally-aligned";
179
22
            _buffer.clear();
180
22
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
181
22
            _finished = false;
182
22
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
183
22
        });
184
22
        return Status::OK();
185
22
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
170
4
    Status reset() override {
171
4
        RETURN_IF_CATCH_EXCEPTION({
172
4
            size_t block_size = _options.data_page_size;
173
4
            _count = 0;
174
4
            _raw_data_size = 0;
175
4
            _data.clear();
176
4
            _data.reserve(block_size);
177
4
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
178
4
                    << "buffer must be naturally-aligned";
179
4
            _buffer.clear();
180
4
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
181
4
            _finished = false;
182
4
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
183
4
        });
184
4
        return Status::OK();
185
4
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
186
187
16.4k
    size_t count() const override { return _count; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
187
16.4k
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5countEv
188
189
7.92k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
189
7.13k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
189
738
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
189
13
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
189
7
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
189
4
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
189
2
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
189
2
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4sizeEv
Line
Count
Source
189
6
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4sizeEv
Line
Count
Source
189
7
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4sizeEv
Line
Count
Source
189
13
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4sizeEv
Line
Count
Source
189
2
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4sizeEv
190
191
14.7k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
191
13.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
191
637
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
191
13
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
191
626
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
191
337
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
191
2
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
191
2
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE17get_raw_data_sizeEv
Line
Count
Source
191
4
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
191
7
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
191
11
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
191
2
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
192
193
0
    Status get_first_value(void* value) const override {
194
0
        DCHECK(_finished);
195
0
        if (_count == 0) {
196
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
197
0
        }
198
0
        memcpy(value, &_first_value, SIZE_OF_TYPE);
199
0
        return Status::OK();
200
0
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE15get_first_valueEPv
201
3
    Status get_last_value(void* value) const override {
202
3
        DCHECK(_finished);
203
3
        if (_count == 0) {
204
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
205
0
        }
206
3
        memcpy(value, &_last_value, SIZE_OF_TYPE);
207
3
        return Status::OK();
208
3
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE14get_last_valueEPv
Line
Count
Source
201
3
    Status get_last_value(void* value) const override {
202
3
        DCHECK(_finished);
203
3
        if (_count == 0) {
204
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
205
0
        }
206
3
        memcpy(value, &_last_value, SIZE_OF_TYPE);
207
3
        return Status::OK();
208
3
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE14get_last_valueEPv
209
210
private:
211
    BitshufflePageBuilder(const PageBuilderOptions& options)
212
18.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
212
16.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
212
626
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
212
13
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
212
651
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
212
342
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
212
2
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
212
2
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
212
4
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
212
7
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
212
11
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
212
2
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
213
214
18.5k
    OwnedSlice _finish(int final_size_of_type) {
215
18.5k
        _data.resize(final_size_of_type * _count);
216
217
        // Do padding so that the input num of element is multiple of 8.
218
18.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
219
18.5k
        int padding_elems = num_elems_after_padding - _count;
220
18.5k
        int padding_bytes = padding_elems * final_size_of_type;
221
113k
        for (int i = 0; i < padding_bytes; i++) {
222
94.4k
            _data.push_back(0);
223
94.4k
        }
224
225
        // reserve enough place for compression
226
18.5k
        _buffer.resize(
227
18.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
228
18.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
229
230
18.5k
        int64_t bytes =
231
18.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
232
18.5k
                                         num_elems_after_padding, final_size_of_type, 0);
233
18.5k
        if (bytes < 0) [[unlikely]] {
234
            // This means the bitshuffle function fails.
235
            // Ideally, this should not happen.
236
0
            warn_with_bitshuffle_error(bytes);
237
            // It does not matter what will be returned here,
238
            // since we have logged fatal in warn_with_bitshuffle_error().
239
0
            return OwnedSlice();
240
0
        }
241
        // update header
242
18.5k
        encode_fixed32_le(&_buffer[0], _count);
243
18.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
244
18.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
245
18.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
246
18.5k
        _finished = true;
247
        // before build(), update buffer length to the actual compressed size
248
18.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
249
18.5k
        return _buffer.build();
250
18.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
214
16.9k
    OwnedSlice _finish(int final_size_of_type) {
215
16.9k
        _data.resize(final_size_of_type * _count);
216
217
        // Do padding so that the input num of element is multiple of 8.
218
16.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
219
16.9k
        int padding_elems = num_elems_after_padding - _count;
220
16.9k
        int padding_bytes = padding_elems * final_size_of_type;
221
100k
        for (int i = 0; i < padding_bytes; i++) {
222
83.9k
            _data.push_back(0);
223
83.9k
        }
224
225
        // reserve enough place for compression
226
16.9k
        _buffer.resize(
227
16.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
228
16.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
229
230
16.9k
        int64_t bytes =
231
16.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
232
16.9k
                                         num_elems_after_padding, final_size_of_type, 0);
233
16.9k
        if (bytes < 0) [[unlikely]] {
234
            // This means the bitshuffle function fails.
235
            // Ideally, this should not happen.
236
0
            warn_with_bitshuffle_error(bytes);
237
            // It does not matter what will be returned here,
238
            // since we have logged fatal in warn_with_bitshuffle_error().
239
0
            return OwnedSlice();
240
0
        }
241
        // update header
242
16.9k
        encode_fixed32_le(&_buffer[0], _count);
243
16.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
244
16.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
245
16.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
246
16.9k
        _finished = true;
247
        // before build(), update buffer length to the actual compressed size
248
16.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
249
16.9k
        return _buffer.build();
250
16.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
214
637
    OwnedSlice _finish(int final_size_of_type) {
215
637
        _data.resize(final_size_of_type * _count);
216
217
        // Do padding so that the input num of element is multiple of 8.
218
637
        int num_elems_after_padding = ALIGN_UP(_count, 8);
219
637
        int padding_elems = num_elems_after_padding - _count;
220
637
        int padding_bytes = padding_elems * final_size_of_type;
221
1.28k
        for (int i = 0; i < padding_bytes; i++) {
222
648
            _data.push_back(0);
223
648
        }
224
225
        // reserve enough place for compression
226
637
        _buffer.resize(
227
637
                BITSHUFFLE_PAGE_HEADER_SIZE +
228
637
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
229
230
637
        int64_t bytes =
231
637
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
232
637
                                         num_elems_after_padding, final_size_of_type, 0);
233
637
        if (bytes < 0) [[unlikely]] {
234
            // This means the bitshuffle function fails.
235
            // Ideally, this should not happen.
236
0
            warn_with_bitshuffle_error(bytes);
237
            // It does not matter what will be returned here,
238
            // since we have logged fatal in warn_with_bitshuffle_error().
239
0
            return OwnedSlice();
240
0
        }
241
        // update header
242
637
        encode_fixed32_le(&_buffer[0], _count);
243
637
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
244
637
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
245
637
        encode_fixed32_le(&_buffer[12], final_size_of_type);
246
637
        _finished = true;
247
        // before build(), update buffer length to the actual compressed size
248
637
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
249
637
        return _buffer.build();
250
637
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
214
13
    OwnedSlice _finish(int final_size_of_type) {
215
13
        _data.resize(final_size_of_type * _count);
216
217
        // Do padding so that the input num of element is multiple of 8.
218
13
        int num_elems_after_padding = ALIGN_UP(_count, 8);
219
13
        int padding_elems = num_elems_after_padding - _count;
220
13
        int padding_bytes = padding_elems * final_size_of_type;
221
185
        for (int i = 0; i < padding_bytes; i++) {
222
172
            _data.push_back(0);
223
172
        }
224
225
        // reserve enough place for compression
226
13
        _buffer.resize(
227
13
                BITSHUFFLE_PAGE_HEADER_SIZE +
228
13
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
229
230
13
        int64_t bytes =
231
13
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
232
13
                                         num_elems_after_padding, final_size_of_type, 0);
233
13
        if (bytes < 0) [[unlikely]] {
234
            // This means the bitshuffle function fails.
235
            // Ideally, this should not happen.
236
0
            warn_with_bitshuffle_error(bytes);
237
            // It does not matter what will be returned here,
238
            // since we have logged fatal in warn_with_bitshuffle_error().
239
0
            return OwnedSlice();
240
0
        }
241
        // update header
242
13
        encode_fixed32_le(&_buffer[0], _count);
243
13
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
244
13
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
245
13
        encode_fixed32_le(&_buffer[12], final_size_of_type);
246
13
        _finished = true;
247
        // before build(), update buffer length to the actual compressed size
248
13
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
249
13
        return _buffer.build();
250
13
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
214
626
    OwnedSlice _finish(int final_size_of_type) {
215
626
        _data.resize(final_size_of_type * _count);
216
217
        // Do padding so that the input num of element is multiple of 8.
218
626
        int num_elems_after_padding = ALIGN_UP(_count, 8);
219
626
        int padding_elems = num_elems_after_padding - _count;
220
626
        int padding_bytes = padding_elems * final_size_of_type;
221
8.65k
        for (int i = 0; i < padding_bytes; i++) {
222
8.02k
            _data.push_back(0);
223
8.02k
        }
224
225
        // reserve enough place for compression
226
626
        _buffer.resize(
227
626
                BITSHUFFLE_PAGE_HEADER_SIZE +
228
626
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
229
230
626
        int64_t bytes =
231
626
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
232
626
                                         num_elems_after_padding, final_size_of_type, 0);
233
626
        if (bytes < 0) [[unlikely]] {
234
            // This means the bitshuffle function fails.
235
            // Ideally, this should not happen.
236
0
            warn_with_bitshuffle_error(bytes);
237
            // It does not matter what will be returned here,
238
            // since we have logged fatal in warn_with_bitshuffle_error().
239
0
            return OwnedSlice();
240
0
        }
241
        // update header
242
626
        encode_fixed32_le(&_buffer[0], _count);
243
626
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
244
626
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
245
626
        encode_fixed32_le(&_buffer[12], final_size_of_type);
246
626
        _finished = true;
247
        // before build(), update buffer length to the actual compressed size
248
626
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
249
626
        return _buffer.build();
250
626
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
214
337
    OwnedSlice _finish(int final_size_of_type) {
215
337
        _data.resize(final_size_of_type * _count);
216
217
        // Do padding so that the input num of element is multiple of 8.
218
337
        int num_elems_after_padding = ALIGN_UP(_count, 8);
219
337
        int padding_elems = num_elems_after_padding - _count;
220
337
        int padding_bytes = padding_elems * final_size_of_type;
221
793
        for (int i = 0; i < padding_bytes; i++) {
222
456
            _data.push_back(0);
223
456
        }
224
225
        // reserve enough place for compression
226
337
        _buffer.resize(
227
337
                BITSHUFFLE_PAGE_HEADER_SIZE +
228
337
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
229
230
337
        int64_t bytes =
231
337
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
232
337
                                         num_elems_after_padding, final_size_of_type, 0);
233
337
        if (bytes < 0) [[unlikely]] {
234
            // This means the bitshuffle function fails.
235
            // Ideally, this should not happen.
236
0
            warn_with_bitshuffle_error(bytes);
237
            // It does not matter what will be returned here,
238
            // since we have logged fatal in warn_with_bitshuffle_error().
239
0
            return OwnedSlice();
240
0
        }
241
        // update header
242
337
        encode_fixed32_le(&_buffer[0], _count);
243
337
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
244
337
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
245
337
        encode_fixed32_le(&_buffer[12], final_size_of_type);
246
337
        _finished = true;
247
        // before build(), update buffer length to the actual compressed size
248
337
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
249
337
        return _buffer.build();
250
337
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
214
2
    OwnedSlice _finish(int final_size_of_type) {
215
2
        _data.resize(final_size_of_type * _count);
216
217
        // Do padding so that the input num of element is multiple of 8.
218
2
        int num_elems_after_padding = ALIGN_UP(_count, 8);
219
2
        int padding_elems = num_elems_after_padding - _count;
220
2
        int padding_bytes = padding_elems * final_size_of_type;
221
226
        for (int i = 0; i < padding_bytes; i++) {
222
224
            _data.push_back(0);
223
224
        }
224
225
        // reserve enough place for compression
226
2
        _buffer.resize(
227
2
                BITSHUFFLE_PAGE_HEADER_SIZE +
228
2
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
229
230
2
        int64_t bytes =
231
2
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
232
2
                                         num_elems_after_padding, final_size_of_type, 0);
233
2
        if (bytes < 0) [[unlikely]] {
234
            // This means the bitshuffle function fails.
235
            // Ideally, this should not happen.
236
0
            warn_with_bitshuffle_error(bytes);
237
            // It does not matter what will be returned here,
238
            // since we have logged fatal in warn_with_bitshuffle_error().
239
0
            return OwnedSlice();
240
0
        }
241
        // update header
242
2
        encode_fixed32_le(&_buffer[0], _count);
243
2
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
244
2
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
245
2
        encode_fixed32_le(&_buffer[12], final_size_of_type);
246
2
        _finished = true;
247
        // before build(), update buffer length to the actual compressed size
248
2
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
249
2
        return _buffer.build();
250
2
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
214
2
    OwnedSlice _finish(int final_size_of_type) {
215
2
        _data.resize(final_size_of_type * _count);
216
217
        // Do padding so that the input num of element is multiple of 8.
218
2
        int num_elems_after_padding = ALIGN_UP(_count, 8);
219
2
        int padding_elems = num_elems_after_padding - _count;
220
2
        int padding_bytes = padding_elems * final_size_of_type;
221
2
        for (int i = 0; i < padding_bytes; i++) {
222
0
            _data.push_back(0);
223
0
        }
224
225
        // reserve enough place for compression
226
2
        _buffer.resize(
227
2
                BITSHUFFLE_PAGE_HEADER_SIZE +
228
2
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
229
230
2
        int64_t bytes =
231
2
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
232
2
                                         num_elems_after_padding, final_size_of_type, 0);
233
2
        if (bytes < 0) [[unlikely]] {
234
            // This means the bitshuffle function fails.
235
            // Ideally, this should not happen.
236
0
            warn_with_bitshuffle_error(bytes);
237
            // It does not matter what will be returned here,
238
            // since we have logged fatal in warn_with_bitshuffle_error().
239
0
            return OwnedSlice();
240
0
        }
241
        // update header
242
2
        encode_fixed32_le(&_buffer[0], _count);
243
2
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
244
2
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
245
2
        encode_fixed32_le(&_buffer[12], final_size_of_type);
246
2
        _finished = true;
247
        // before build(), update buffer length to the actual compressed size
248
2
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
249
2
        return _buffer.build();
250
2
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
214
4
    OwnedSlice _finish(int final_size_of_type) {
215
4
        _data.resize(final_size_of_type * _count);
216
217
        // Do padding so that the input num of element is multiple of 8.
218
4
        int num_elems_after_padding = ALIGN_UP(_count, 8);
219
4
        int padding_elems = num_elems_after_padding - _count;
220
4
        int padding_bytes = padding_elems * final_size_of_type;
221
82
        for (int i = 0; i < padding_bytes; i++) {
222
78
            _data.push_back(0);
223
78
        }
224
225
        // reserve enough place for compression
226
4
        _buffer.resize(
227
4
                BITSHUFFLE_PAGE_HEADER_SIZE +
228
4
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
229
230
4
        int64_t bytes =
231
4
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
232
4
                                         num_elems_after_padding, final_size_of_type, 0);
233
4
        if (bytes < 0) [[unlikely]] {
234
            // This means the bitshuffle function fails.
235
            // Ideally, this should not happen.
236
0
            warn_with_bitshuffle_error(bytes);
237
            // It does not matter what will be returned here,
238
            // since we have logged fatal in warn_with_bitshuffle_error().
239
0
            return OwnedSlice();
240
0
        }
241
        // update header
242
4
        encode_fixed32_le(&_buffer[0], _count);
243
4
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
244
4
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
245
4
        encode_fixed32_le(&_buffer[12], final_size_of_type);
246
4
        _finished = true;
247
        // before build(), update buffer length to the actual compressed size
248
4
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
249
4
        return _buffer.build();
250
4
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
214
7
    OwnedSlice _finish(int final_size_of_type) {
215
7
        _data.resize(final_size_of_type * _count);
216
217
        // Do padding so that the input num of element is multiple of 8.
218
7
        int num_elems_after_padding = ALIGN_UP(_count, 8);
219
7
        int padding_elems = num_elems_after_padding - _count;
220
7
        int padding_bytes = padding_elems * final_size_of_type;
221
183
        for (int i = 0; i < padding_bytes; i++) {
222
176
            _data.push_back(0);
223
176
        }
224
225
        // reserve enough place for compression
226
7
        _buffer.resize(
227
7
                BITSHUFFLE_PAGE_HEADER_SIZE +
228
7
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
229
230
7
        int64_t bytes =
231
7
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
232
7
                                         num_elems_after_padding, final_size_of_type, 0);
233
7
        if (bytes < 0) [[unlikely]] {
234
            // This means the bitshuffle function fails.
235
            // Ideally, this should not happen.
236
0
            warn_with_bitshuffle_error(bytes);
237
            // It does not matter what will be returned here,
238
            // since we have logged fatal in warn_with_bitshuffle_error().
239
0
            return OwnedSlice();
240
0
        }
241
        // update header
242
7
        encode_fixed32_le(&_buffer[0], _count);
243
7
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
244
7
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
245
7
        encode_fixed32_le(&_buffer[12], final_size_of_type);
246
7
        _finished = true;
247
        // before build(), update buffer length to the actual compressed size
248
7
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
249
7
        return _buffer.build();
250
7
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
214
11
    OwnedSlice _finish(int final_size_of_type) {
215
11
        _data.resize(final_size_of_type * _count);
216
217
        // Do padding so that the input num of element is multiple of 8.
218
11
        int num_elems_after_padding = ALIGN_UP(_count, 8);
219
11
        int padding_elems = num_elems_after_padding - _count;
220
11
        int padding_bytes = padding_elems * final_size_of_type;
221
571
        for (int i = 0; i < padding_bytes; i++) {
222
560
            _data.push_back(0);
223
560
        }
224
225
        // reserve enough place for compression
226
11
        _buffer.resize(
227
11
                BITSHUFFLE_PAGE_HEADER_SIZE +
228
11
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
229
230
11
        int64_t bytes =
231
11
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
232
11
                                         num_elems_after_padding, final_size_of_type, 0);
233
11
        if (bytes < 0) [[unlikely]] {
234
            // This means the bitshuffle function fails.
235
            // Ideally, this should not happen.
236
0
            warn_with_bitshuffle_error(bytes);
237
            // It does not matter what will be returned here,
238
            // since we have logged fatal in warn_with_bitshuffle_error().
239
0
            return OwnedSlice();
240
0
        }
241
        // update header
242
11
        encode_fixed32_le(&_buffer[0], _count);
243
11
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
244
11
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
245
11
        encode_fixed32_le(&_buffer[12], final_size_of_type);
246
11
        _finished = true;
247
        // before build(), update buffer length to the actual compressed size
248
11
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
249
11
        return _buffer.build();
250
11
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
214
2
    OwnedSlice _finish(int final_size_of_type) {
215
2
        _data.resize(final_size_of_type * _count);
216
217
        // Do padding so that the input num of element is multiple of 8.
218
2
        int num_elems_after_padding = ALIGN_UP(_count, 8);
219
2
        int padding_elems = num_elems_after_padding - _count;
220
2
        int padding_bytes = padding_elems * final_size_of_type;
221
170
        for (int i = 0; i < padding_bytes; i++) {
222
168
            _data.push_back(0);
223
168
        }
224
225
        // reserve enough place for compression
226
2
        _buffer.resize(
227
2
                BITSHUFFLE_PAGE_HEADER_SIZE +
228
2
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
229
230
2
        int64_t bytes =
231
2
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
232
2
                                         num_elems_after_padding, final_size_of_type, 0);
233
2
        if (bytes < 0) [[unlikely]] {
234
            // This means the bitshuffle function fails.
235
            // Ideally, this should not happen.
236
0
            warn_with_bitshuffle_error(bytes);
237
            // It does not matter what will be returned here,
238
            // since we have logged fatal in warn_with_bitshuffle_error().
239
0
            return OwnedSlice();
240
0
        }
241
        // update header
242
2
        encode_fixed32_le(&_buffer[0], _count);
243
2
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
244
2
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
245
2
        encode_fixed32_le(&_buffer[12], final_size_of_type);
246
2
        _finished = true;
247
        // before build(), update buffer length to the actual compressed size
248
2
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
249
2
        return _buffer.build();
250
2
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE7_finishEi
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
251
252
    using CppType = typename TypeTraits<Type>::CppType;
253
254
37.1k
    CppType cell(int idx) const {
255
37.1k
        DCHECK_GE(idx, 0);
256
37.1k
        CppType ret;
257
37.1k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
258
37.1k
        return ret;
259
37.1k
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4cellEi
Line
Count
Source
254
33.8k
    CppType cell(int idx) const {
255
        DCHECK_GE(idx, 0);
256
33.8k
        CppType ret;
257
33.8k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
258
33.8k
        return ret;
259
33.8k
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4cellEi
Line
Count
Source
254
1.27k
    CppType cell(int idx) const {
255
        DCHECK_GE(idx, 0);
256
1.27k
        CppType ret;
257
1.27k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
258
1.27k
        return ret;
259
1.27k
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4cellEi
Line
Count
Source
254
26
    CppType cell(int idx) const {
255
        DCHECK_GE(idx, 0);
256
26
        CppType ret;
257
26
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
258
26
        return ret;
259
26
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4cellEi
Line
Count
Source
254
1.25k
    CppType cell(int idx) const {
255
        DCHECK_GE(idx, 0);
256
1.25k
        CppType ret;
257
1.25k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
258
1.25k
        return ret;
259
1.25k
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4cellEi
Line
Count
Source
254
674
    CppType cell(int idx) const {
255
        DCHECK_GE(idx, 0);
256
674
        CppType ret;
257
674
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
258
674
        return ret;
259
674
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4cellEi
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4cellEi
Line
Count
Source
254
4
    CppType cell(int idx) const {
255
        DCHECK_GE(idx, 0);
256
4
        CppType ret;
257
4
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
258
4
        return ret;
259
4
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4cellEi
Line
Count
Source
254
4
    CppType cell(int idx) const {
255
        DCHECK_GE(idx, 0);
256
4
        CppType ret;
257
4
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
258
4
        return ret;
259
4
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4cellEi
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4cellEi
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4cellEi
Line
Count
Source
254
8
    CppType cell(int idx) const {
255
        DCHECK_GE(idx, 0);
256
8
        CppType ret;
257
8
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
258
8
        return ret;
259
8
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4cellEi
Line
Count
Source
254
14
    CppType cell(int idx) const {
255
        DCHECK_GE(idx, 0);
256
14
        CppType ret;
257
14
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
258
14
        return ret;
259
14
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4cellEi
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4cellEi
Line
Count
Source
254
22
    CppType cell(int idx) const {
255
        DCHECK_GE(idx, 0);
256
22
        CppType ret;
257
22
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
258
22
        return ret;
259
22
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4cellEi
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4cellEi
Line
Count
Source
254
4
    CppType cell(int idx) const {
255
        DCHECK_GE(idx, 0);
256
4
        CppType ret;
257
4
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
258
4
        return ret;
259
4
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4cellEi
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4cellEi
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4cellEi
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4cellEi
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4cellEi
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4cellEi
260
261
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
262
    PageBuilderOptions _options;
263
    uint32_t _count;
264
    uint32_t _remain_element_capacity;
265
    bool _finished;
266
    faststring _data;
267
    faststring _buffer;
268
    CppType _first_value;
269
    CppType _last_value;
270
    uint64_t _raw_data_size = 0;
271
};
272
273
inline Status parse_bit_shuffle_header(const Slice& data, size_t& num_elements,
274
                                       size_t& compressed_size, size_t& num_element_after_padding,
275
28.2k
                                       int& size_of_element) {
276
28.2k
    if (data.size < BITSHUFFLE_PAGE_HEADER_SIZE) {
277
0
        return Status::InternalError("file corruption: invalid data size:{}, header size:{}",
278
0
                                     data.size, BITSHUFFLE_PAGE_HEADER_SIZE);
279
0
    }
280
281
28.2k
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
282
28.2k
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
283
28.2k
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
284
28.2k
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
285
28.2k
    if (num_element_after_padding != ALIGN_UP(num_elements, 8)) {
286
0
        return Status::InternalError(
287
0
                "num of element information corrupted,"
288
0
                " _num_element_after_padding:{}, _num_elements:{}, expected_padding:{},"
289
0
                " compressed_size:{}, size_of_element:{}, data_size:{}",
290
0
                num_element_after_padding, num_elements, ALIGN_UP(num_elements, 8), compressed_size,
291
0
                size_of_element, data.size);
292
0
    }
293
28.2k
    switch (size_of_element) {
294
672
    case 1:
295
682
    case 2:
296
682
    case 3:
297
27.4k
    case 4:
298
28.2k
    case 8:
299
28.2k
    case 12:
300
28.2k
    case 16:
301
28.2k
    case 32:
302
28.2k
        break;
303
0
    default:
304
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
305
28.2k
    }
306
28.2k
    return Status::OK();
307
28.2k
}
308
309
template <FieldType Type>
310
class BitShufflePageDecoder : public PageDecoder {
311
public:
312
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
313
14.1k
            : _data(data),
314
14.1k
              _options(options),
315
14.1k
              _parsed(false),
316
14.1k
              _num_elements(0),
317
14.1k
              _num_element_after_padding(0),
318
14.1k
              _size_of_element(0),
319
14.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
313
13.3k
            : _data(data),
314
13.3k
              _options(options),
315
13.3k
              _parsed(false),
316
13.3k
              _num_elements(0),
317
13.3k
              _num_element_after_padding(0),
318
13.3k
              _size_of_element(0),
319
13.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
313
336
            : _data(data),
314
336
              _options(options),
315
336
              _parsed(false),
316
336
              _num_elements(0),
317
336
              _num_element_after_padding(0),
318
336
              _size_of_element(0),
319
336
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
313
5
            : _data(data),
314
5
              _options(options),
315
5
              _parsed(false),
316
5
              _num_elements(0),
317
5
              _num_element_after_padding(0),
318
5
              _size_of_element(0),
319
5
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
313
220
            : _data(data),
314
220
              _options(options),
315
220
              _parsed(false),
316
220
              _num_elements(0),
317
220
              _num_element_after_padding(0),
318
220
              _size_of_element(0),
319
220
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
313
176
            : _data(data),
314
176
              _options(options),
315
176
              _parsed(false),
316
176
              _num_elements(0),
317
176
              _num_element_after_padding(0),
318
176
              _size_of_element(0),
319
176
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
313
1
            : _data(data),
314
1
              _options(options),
315
1
              _parsed(false),
316
1
              _num_elements(0),
317
1
              _num_element_after_padding(0),
318
1
              _size_of_element(0),
319
1
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
313
5
            : _data(data),
314
5
              _options(options),
315
5
              _parsed(false),
316
5
              _num_elements(0),
317
5
              _num_element_after_padding(0),
318
5
              _size_of_element(0),
319
5
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
313
5
            : _data(data),
314
5
              _options(options),
315
5
              _parsed(false),
316
5
              _num_elements(0),
317
5
              _num_element_after_padding(0),
318
5
              _size_of_element(0),
319
5
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
320
321
14.1k
    Status init() override {
322
14.1k
        CHECK(!_parsed);
323
14.1k
        size_t unused;
324
14.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
325
14.1k
                                                 _num_element_after_padding, _size_of_element));
326
327
14.1k
        if (_data.size !=
328
14.1k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
329
0
            std::stringstream ss;
330
0
            ss << "Size information unmatched, _data.size:" << _data.size
331
0
               << ", _num_elements:" << _num_elements << ", expected size is "
332
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
333
0
            return Status::InternalError(ss.str());
334
0
        }
335
336
        // Currently, only the UINT32 block encoder supports expanding size:
337
14.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
338
14.1k
                     _size_of_element != SIZE_OF_TYPE)) {
339
0
            return Status::InternalError(
340
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
341
0
                    _size_of_element, SIZE_OF_TYPE, Type);
342
0
        }
343
14.1k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
344
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
345
0
                                         _size_of_element, SIZE_OF_TYPE);
346
0
        }
347
14.1k
        _parsed = true;
348
14.1k
        return Status::OK();
349
14.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
321
13.3k
    Status init() override {
322
13.3k
        CHECK(!_parsed);
323
13.3k
        size_t unused;
324
13.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
325
13.3k
                                                 _num_element_after_padding, _size_of_element));
326
327
13.3k
        if (_data.size !=
328
13.3k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
329
0
            std::stringstream ss;
330
0
            ss << "Size information unmatched, _data.size:" << _data.size
331
0
               << ", _num_elements:" << _num_elements << ", expected size is "
332
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
333
0
            return Status::InternalError(ss.str());
334
0
        }
335
336
        // Currently, only the UINT32 block encoder supports expanding size:
337
13.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
338
13.3k
                     _size_of_element != SIZE_OF_TYPE)) {
339
0
            return Status::InternalError(
340
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
341
0
                    _size_of_element, SIZE_OF_TYPE, Type);
342
0
        }
343
13.3k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
344
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
345
0
                                         _size_of_element, SIZE_OF_TYPE);
346
0
        }
347
13.3k
        _parsed = true;
348
13.3k
        return Status::OK();
349
13.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
321
336
    Status init() override {
322
336
        CHECK(!_parsed);
323
336
        size_t unused;
324
336
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
325
336
                                                 _num_element_after_padding, _size_of_element));
326
327
336
        if (_data.size !=
328
336
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
329
0
            std::stringstream ss;
330
0
            ss << "Size information unmatched, _data.size:" << _data.size
331
0
               << ", _num_elements:" << _num_elements << ", expected size is "
332
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
333
0
            return Status::InternalError(ss.str());
334
0
        }
335
336
        // Currently, only the UINT32 block encoder supports expanding size:
337
336
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
338
336
                     _size_of_element != SIZE_OF_TYPE)) {
339
0
            return Status::InternalError(
340
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
341
0
                    _size_of_element, SIZE_OF_TYPE, Type);
342
0
        }
343
336
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
344
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
345
0
                                         _size_of_element, SIZE_OF_TYPE);
346
0
        }
347
336
        _parsed = true;
348
336
        return Status::OK();
349
336
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
321
5
    Status init() override {
322
5
        CHECK(!_parsed);
323
5
        size_t unused;
324
5
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
325
5
                                                 _num_element_after_padding, _size_of_element));
326
327
5
        if (_data.size !=
328
5
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
329
0
            std::stringstream ss;
330
0
            ss << "Size information unmatched, _data.size:" << _data.size
331
0
               << ", _num_elements:" << _num_elements << ", expected size is "
332
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
333
0
            return Status::InternalError(ss.str());
334
0
        }
335
336
        // Currently, only the UINT32 block encoder supports expanding size:
337
5
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
338
5
                     _size_of_element != SIZE_OF_TYPE)) {
339
0
            return Status::InternalError(
340
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
341
0
                    _size_of_element, SIZE_OF_TYPE, Type);
342
0
        }
343
5
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
344
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
345
0
                                         _size_of_element, SIZE_OF_TYPE);
346
0
        }
347
5
        _parsed = true;
348
5
        return Status::OK();
349
5
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
321
220
    Status init() override {
322
220
        CHECK(!_parsed);
323
220
        size_t unused;
324
220
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
325
220
                                                 _num_element_after_padding, _size_of_element));
326
327
220
        if (_data.size !=
328
220
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
329
0
            std::stringstream ss;
330
0
            ss << "Size information unmatched, _data.size:" << _data.size
331
0
               << ", _num_elements:" << _num_elements << ", expected size is "
332
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
333
0
            return Status::InternalError(ss.str());
334
0
        }
335
336
        // Currently, only the UINT32 block encoder supports expanding size:
337
220
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
338
220
                     _size_of_element != SIZE_OF_TYPE)) {
339
0
            return Status::InternalError(
340
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
341
0
                    _size_of_element, SIZE_OF_TYPE, Type);
342
0
        }
343
220
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
344
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
345
0
                                         _size_of_element, SIZE_OF_TYPE);
346
0
        }
347
220
        _parsed = true;
348
220
        return Status::OK();
349
220
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
321
176
    Status init() override {
322
176
        CHECK(!_parsed);
323
176
        size_t unused;
324
176
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
325
176
                                                 _num_element_after_padding, _size_of_element));
326
327
176
        if (_data.size !=
328
176
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
329
0
            std::stringstream ss;
330
0
            ss << "Size information unmatched, _data.size:" << _data.size
331
0
               << ", _num_elements:" << _num_elements << ", expected size is "
332
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
333
0
            return Status::InternalError(ss.str());
334
0
        }
335
336
        // Currently, only the UINT32 block encoder supports expanding size:
337
176
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
338
176
                     _size_of_element != SIZE_OF_TYPE)) {
339
0
            return Status::InternalError(
340
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
341
0
                    _size_of_element, SIZE_OF_TYPE, Type);
342
0
        }
343
176
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
344
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
345
0
                                         _size_of_element, SIZE_OF_TYPE);
346
0
        }
347
176
        _parsed = true;
348
176
        return Status::OK();
349
176
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
321
1
    Status init() override {
322
1
        CHECK(!_parsed);
323
1
        size_t unused;
324
1
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
325
1
                                                 _num_element_after_padding, _size_of_element));
326
327
1
        if (_data.size !=
328
1
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
329
0
            std::stringstream ss;
330
0
            ss << "Size information unmatched, _data.size:" << _data.size
331
0
               << ", _num_elements:" << _num_elements << ", expected size is "
332
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
333
0
            return Status::InternalError(ss.str());
334
0
        }
335
336
        // Currently, only the UINT32 block encoder supports expanding size:
337
1
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
338
1
                     _size_of_element != SIZE_OF_TYPE)) {
339
0
            return Status::InternalError(
340
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
341
0
                    _size_of_element, SIZE_OF_TYPE, Type);
342
0
        }
343
1
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
344
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
345
0
                                         _size_of_element, SIZE_OF_TYPE);
346
0
        }
347
1
        _parsed = true;
348
1
        return Status::OK();
349
1
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
321
5
    Status init() override {
322
5
        CHECK(!_parsed);
323
5
        size_t unused;
324
5
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
325
5
                                                 _num_element_after_padding, _size_of_element));
326
327
5
        if (_data.size !=
328
5
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
329
0
            std::stringstream ss;
330
0
            ss << "Size information unmatched, _data.size:" << _data.size
331
0
               << ", _num_elements:" << _num_elements << ", expected size is "
332
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
333
0
            return Status::InternalError(ss.str());
334
0
        }
335
336
        // Currently, only the UINT32 block encoder supports expanding size:
337
5
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
338
5
                     _size_of_element != SIZE_OF_TYPE)) {
339
0
            return Status::InternalError(
340
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
341
0
                    _size_of_element, SIZE_OF_TYPE, Type);
342
0
        }
343
5
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
344
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
345
0
                                         _size_of_element, SIZE_OF_TYPE);
346
0
        }
347
5
        _parsed = true;
348
5
        return Status::OK();
349
5
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
321
5
    Status init() override {
322
5
        CHECK(!_parsed);
323
5
        size_t unused;
324
5
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
325
5
                                                 _num_element_after_padding, _size_of_element));
326
327
5
        if (_data.size !=
328
5
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
329
0
            std::stringstream ss;
330
0
            ss << "Size information unmatched, _data.size:" << _data.size
331
0
               << ", _num_elements:" << _num_elements << ", expected size is "
332
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
333
0
            return Status::InternalError(ss.str());
334
0
        }
335
336
        // Currently, only the UINT32 block encoder supports expanding size:
337
5
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
338
5
                     _size_of_element != SIZE_OF_TYPE)) {
339
0
            return Status::InternalError(
340
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
341
0
                    _size_of_element, SIZE_OF_TYPE, Type);
342
0
        }
343
5
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
344
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
345
0
                                         _size_of_element, SIZE_OF_TYPE);
346
0
        }
347
5
        _parsed = true;
348
5
        return Status::OK();
349
5
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
350
351
    // If the page only contains null, then _num_elements == 0, and the nullmap has
352
    // some value. But in _seek_columns --> seek_to_ordinal --> _seek_to_pos_in_page
353
    // in this call stack it will pass pos == 0 to this method. Although we can add some
354
    // code such as check if the count == 0, then skip seek, but there are other method such
355
    // as init will also call seek with pos == 0. And the seek is useless when _num_elements
356
    // == 0, because next batch will return empty in this method.
357
5.00k
    Status seek_to_position_in_page(size_t pos) override {
358
5.00k
        DCHECK(_parsed) << "Must call init()";
359
5.00k
        if (_num_elements == 0) [[unlikely]] {
360
0
            if (pos != 0) {
361
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
362
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
363
0
            }
364
0
        }
365
366
5.00k
        DCHECK_LE(pos, _num_elements);
367
5.00k
        _cur_index = pos;
368
5.00k
        return Status::OK();
369
5.00k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
357
4.20k
    Status seek_to_position_in_page(size_t pos) override {
358
4.20k
        DCHECK(_parsed) << "Must call init()";
359
4.20k
        if (_num_elements == 0) [[unlikely]] {
360
0
            if (pos != 0) {
361
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
362
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
363
0
            }
364
0
        }
365
366
4.20k
        DCHECK_LE(pos, _num_elements);
367
4.20k
        _cur_index = pos;
368
4.20k
        return Status::OK();
369
4.20k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
357
591
    Status seek_to_position_in_page(size_t pos) override {
358
591
        DCHECK(_parsed) << "Must call init()";
359
591
        if (_num_elements == 0) [[unlikely]] {
360
0
            if (pos != 0) {
361
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
362
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
363
0
            }
364
0
        }
365
366
591
        DCHECK_LE(pos, _num_elements);
367
591
        _cur_index = pos;
368
591
        return Status::OK();
369
591
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
357
1
    Status seek_to_position_in_page(size_t pos) override {
358
1
        DCHECK(_parsed) << "Must call init()";
359
1
        if (_num_elements == 0) [[unlikely]] {
360
0
            if (pos != 0) {
361
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
362
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
363
0
            }
364
0
        }
365
366
1
        DCHECK_LE(pos, _num_elements);
367
1
        _cur_index = pos;
368
1
        return Status::OK();
369
1
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
357
182
    Status seek_to_position_in_page(size_t pos) override {
358
182
        DCHECK(_parsed) << "Must call init()";
359
182
        if (_num_elements == 0) [[unlikely]] {
360
0
            if (pos != 0) {
361
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
362
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
363
0
            }
364
0
        }
365
366
182
        DCHECK_LE(pos, _num_elements);
367
182
        _cur_index = pos;
368
182
        return Status::OK();
369
182
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
357
17
    Status seek_to_position_in_page(size_t pos) override {
358
17
        DCHECK(_parsed) << "Must call init()";
359
17
        if (_num_elements == 0) [[unlikely]] {
360
0
            if (pos != 0) {
361
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
362
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
363
0
            }
364
0
        }
365
366
17
        DCHECK_LE(pos, _num_elements);
367
17
        _cur_index = pos;
368
17
        return Status::OK();
369
17
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
357
1
    Status seek_to_position_in_page(size_t pos) override {
358
1
        DCHECK(_parsed) << "Must call init()";
359
1
        if (_num_elements == 0) [[unlikely]] {
360
0
            if (pos != 0) {
361
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
362
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
363
0
            }
364
0
        }
365
366
1
        DCHECK_LE(pos, _num_elements);
367
1
        _cur_index = pos;
368
1
        return Status::OK();
369
1
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
357
1
    Status seek_to_position_in_page(size_t pos) override {
358
1
        DCHECK(_parsed) << "Must call init()";
359
1
        if (_num_elements == 0) [[unlikely]] {
360
0
            if (pos != 0) {
361
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
362
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
363
0
            }
364
0
        }
365
366
1
        DCHECK_LE(pos, _num_elements);
367
1
        _cur_index = pos;
368
1
        return Status::OK();
369
1
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE24seek_to_position_in_pageEm
370
371
0
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
372
0
        DCHECK(_parsed) << "Must call init() firstly";
373
374
0
        if (_num_elements == 0) {
375
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
376
0
        }
377
378
0
        size_t left = 0;
379
0
        size_t right = _num_elements;
380
381
0
        void* mid_value = nullptr;
382
383
        // find the first value >= target. after loop,
384
        // - left == index of first value >= target when found
385
        // - left == _num_elements when not found (all values < target)
386
0
        while (left < right) {
387
0
            size_t mid = left + (right - left) / 2;
388
0
            mid_value = get_data(mid);
389
0
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
390
0
                left = mid + 1;
391
0
            } else {
392
0
                right = mid;
393
0
            }
394
0
        }
395
0
        if (left >= _num_elements) {
396
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
397
0
        }
398
0
        void* find_value = get_data(left);
399
0
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
400
0
            *exact_match = true;
401
0
        } else {
402
0
            *exact_match = false;
403
0
        }
404
405
0
        _cur_index = left;
406
0
        return Status::OK();
407
0
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE22seek_at_or_after_valueEPKvPb
408
409
    template <bool forward_index = true>
410
32.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
411
32.6k
        DCHECK(_parsed);
412
32.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
32.6k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
418
419
32.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
420
32.6k
        *n = max_fetch;
421
32.6k
        if constexpr (forward_index) {
422
32.4k
            _cur_index += max_fetch;
423
32.4k
        }
424
425
32.6k
        return Status::OK();
426
32.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
24.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
411
24.6k
        DCHECK(_parsed);
412
24.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
24.6k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
418
419
24.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
420
24.6k
        *n = max_fetch;
421
24.6k
        if constexpr (forward_index) {
422
24.6k
            _cur_index += max_fetch;
423
24.6k
        }
424
425
24.6k
        return Status::OK();
426
24.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
1.57k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
411
1.57k
        DCHECK(_parsed);
412
1.57k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
1.57k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
418
419
1.57k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
420
1.57k
        *n = max_fetch;
421
1.57k
        if constexpr (forward_index) {
422
1.57k
            _cur_index += max_fetch;
423
1.57k
        }
424
425
1.57k
        return Status::OK();
426
1.57k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
1
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
411
1
        DCHECK(_parsed);
412
1
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
1
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
418
419
1
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
420
1
        *n = max_fetch;
421
1
        if constexpr (forward_index) {
422
1
            _cur_index += max_fetch;
423
1
        }
424
425
1
        return Status::OK();
426
1
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
6.05k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
411
6.05k
        DCHECK(_parsed);
412
6.05k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
6.05k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
418
419
6.05k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
420
6.05k
        *n = max_fetch;
421
6.05k
        if constexpr (forward_index) {
422
6.05k
            _cur_index += max_fetch;
423
6.05k
        }
424
425
6.05k
        return Status::OK();
426
6.05k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
178
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
411
178
        DCHECK(_parsed);
412
178
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
178
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
418
419
178
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
420
178
        *n = max_fetch;
421
178
        if constexpr (forward_index) {
422
178
            _cur_index += max_fetch;
423
178
        }
424
425
178
        return Status::OK();
426
178
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
179
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
411
179
        DCHECK(_parsed);
412
179
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
179
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
418
419
179
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
420
179
        *n = max_fetch;
421
        if constexpr (forward_index) {
422
            _cur_index += max_fetch;
423
        }
424
425
179
        return Status::OK();
426
179
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
1
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
411
1
        DCHECK(_parsed);
412
1
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
1
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
418
419
1
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
420
1
        *n = max_fetch;
421
1
        if constexpr (forward_index) {
422
1
            _cur_index += max_fetch;
423
1
        }
424
425
1
        return Status::OK();
426
1
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
1
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
411
1
        DCHECK(_parsed);
412
1
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
1
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
418
419
1
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
420
1
        *n = max_fetch;
421
1
        if constexpr (forward_index) {
422
1
            _cur_index += max_fetch;
423
1
        }
424
425
1
        return Status::OK();
426
1
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
1
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
411
1
        DCHECK(_parsed);
412
1
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
1
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
418
419
1
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
420
1
        *n = max_fetch;
421
1
        if constexpr (forward_index) {
422
1
            _cur_index += max_fetch;
423
1
        }
424
425
1
        return Status::OK();
426
1
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
427
428
32.4k
    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
428
24.6k
    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
428
1.57k
    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
428
1
    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
428
6.05k
    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
428
178
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
428
1
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
428
1
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
428
1
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
429
430
    Status read_by_rowids(const rowid_t* rowids, ordinal_t page_first_ordinal, size_t* n,
431
4.72k
                          MutableColumnPtr& dst) override {
432
4.72k
        DCHECK(_parsed);
433
4.72k
        if (*n == 0) [[unlikely]] {
434
0
            *n = 0;
435
0
            return Status::OK();
436
0
        }
437
438
4.72k
        auto total = *n;
439
4.72k
        auto read_count = 0;
440
4.72k
        _buffer.resize(total);
441
3.31M
        for (size_t i = 0; i < total; ++i) {
442
3.31M
            ordinal_t ord = rowids[i] - page_first_ordinal;
443
3.31M
            if (UNLIKELY(ord >= _num_elements)) {
444
9
                break;
445
9
            }
446
447
3.31M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
448
3.31M
        }
449
450
4.72k
        if (LIKELY(read_count > 0)) {
451
4.72k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
452
4.72k
        }
453
454
4.72k
        *n = read_count;
455
4.72k
        return Status::OK();
456
4.72k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
431
3.94k
                          MutableColumnPtr& dst) override {
432
3.94k
        DCHECK(_parsed);
433
3.94k
        if (*n == 0) [[unlikely]] {
434
0
            *n = 0;
435
0
            return Status::OK();
436
0
        }
437
438
3.94k
        auto total = *n;
439
3.94k
        auto read_count = 0;
440
3.94k
        _buffer.resize(total);
441
2.76M
        for (size_t i = 0; i < total; ++i) {
442
2.76M
            ordinal_t ord = rowids[i] - page_first_ordinal;
443
2.76M
            if (UNLIKELY(ord >= _num_elements)) {
444
9
                break;
445
9
            }
446
447
2.76M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
448
2.76M
        }
449
450
3.94k
        if (LIKELY(read_count > 0)) {
451
3.94k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
452
3.94k
        }
453
454
3.94k
        *n = read_count;
455
3.94k
        return Status::OK();
456
3.94k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
431
658
                          MutableColumnPtr& dst) override {
432
658
        DCHECK(_parsed);
433
658
        if (*n == 0) [[unlikely]] {
434
0
            *n = 0;
435
0
            return Status::OK();
436
0
        }
437
438
658
        auto total = *n;
439
658
        auto read_count = 0;
440
658
        _buffer.resize(total);
441
548k
        for (size_t i = 0; i < total; ++i) {
442
547k
            ordinal_t ord = rowids[i] - page_first_ordinal;
443
547k
            if (UNLIKELY(ord >= _num_elements)) {
444
0
                break;
445
0
            }
446
447
547k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
448
547k
        }
449
450
658
        if (LIKELY(read_count > 0)) {
451
658
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
452
658
        }
453
454
658
        *n = read_count;
455
658
        return Status::OK();
456
658
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
431
4
                          MutableColumnPtr& dst) override {
432
4
        DCHECK(_parsed);
433
4
        if (*n == 0) [[unlikely]] {
434
0
            *n = 0;
435
0
            return Status::OK();
436
0
        }
437
438
4
        auto total = *n;
439
4
        auto read_count = 0;
440
4
        _buffer.resize(total);
441
8
        for (size_t i = 0; i < total; ++i) {
442
4
            ordinal_t ord = rowids[i] - page_first_ordinal;
443
4
            if (UNLIKELY(ord >= _num_elements)) {
444
0
                break;
445
0
            }
446
447
4
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
448
4
        }
449
450
4
        if (LIKELY(read_count > 0)) {
451
4
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
452
4
        }
453
454
4
        *n = read_count;
455
4
        return Status::OK();
456
4
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
431
94
                          MutableColumnPtr& dst) override {
432
94
        DCHECK(_parsed);
433
94
        if (*n == 0) [[unlikely]] {
434
0
            *n = 0;
435
0
            return Status::OK();
436
0
        }
437
438
94
        auto total = *n;
439
94
        auto read_count = 0;
440
94
        _buffer.resize(total);
441
349
        for (size_t i = 0; i < total; ++i) {
442
255
            ordinal_t ord = rowids[i] - page_first_ordinal;
443
255
            if (UNLIKELY(ord >= _num_elements)) {
444
0
                break;
445
0
            }
446
447
255
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
448
255
        }
449
450
94
        if (LIKELY(read_count > 0)) {
451
94
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
452
94
        }
453
454
94
        *n = read_count;
455
94
        return Status::OK();
456
94
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
431
12
                          MutableColumnPtr& dst) override {
432
12
        DCHECK(_parsed);
433
12
        if (*n == 0) [[unlikely]] {
434
0
            *n = 0;
435
0
            return Status::OK();
436
0
        }
437
438
12
        auto total = *n;
439
12
        auto read_count = 0;
440
12
        _buffer.resize(total);
441
4.87k
        for (size_t i = 0; i < total; ++i) {
442
4.85k
            ordinal_t ord = rowids[i] - page_first_ordinal;
443
4.85k
            if (UNLIKELY(ord >= _num_elements)) {
444
0
                break;
445
0
            }
446
447
4.85k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
448
4.85k
        }
449
450
12
        if (LIKELY(read_count > 0)) {
451
12
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
452
12
        }
453
454
12
        *n = read_count;
455
12
        return Status::OK();
456
12
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
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_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
431
4
                          MutableColumnPtr& dst) override {
432
4
        DCHECK(_parsed);
433
4
        if (*n == 0) [[unlikely]] {
434
0
            *n = 0;
435
0
            return Status::OK();
436
0
        }
437
438
4
        auto total = *n;
439
4
        auto read_count = 0;
440
4
        _buffer.resize(total);
441
8
        for (size_t i = 0; i < total; ++i) {
442
4
            ordinal_t ord = rowids[i] - page_first_ordinal;
443
4
            if (UNLIKELY(ord >= _num_elements)) {
444
0
                break;
445
0
            }
446
447
4
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
448
4
        }
449
450
4
        if (LIKELY(read_count > 0)) {
451
4
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
452
4
        }
453
454
4
        *n = read_count;
455
4
        return Status::OK();
456
4
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
431
4
                          MutableColumnPtr& dst) override {
432
4
        DCHECK(_parsed);
433
4
        if (*n == 0) [[unlikely]] {
434
0
            *n = 0;
435
0
            return Status::OK();
436
0
        }
437
438
4
        auto total = *n;
439
4
        auto read_count = 0;
440
4
        _buffer.resize(total);
441
8
        for (size_t i = 0; i < total; ++i) {
442
4
            ordinal_t ord = rowids[i] - page_first_ordinal;
443
4
            if (UNLIKELY(ord >= _num_elements)) {
444
0
                break;
445
0
            }
446
447
4
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
448
4
        }
449
450
4
        if (LIKELY(read_count > 0)) {
451
4
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
452
4
        }
453
454
4
        *n = read_count;
455
4
        return Status::OK();
456
4
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_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
457
458
179
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
459
179
        return next_batch<false>(n, dst);
460
179
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
458
179
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
459
179
        return next_batch<false>(n, dst);
460
179
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
461
462
3
    size_t count() const override { return _num_elements; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
462
3
    size_t count() const override { return _num_elements; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE5countEv
463
464
551
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
464
199
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
464
352
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_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_9FieldTypeE15EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE13current_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
465
466
3.35M
    char* get_data(size_t index) const {
467
3.35M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
468
3.35M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
466
2.79M
    char* get_data(size_t index) const {
467
2.79M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
468
2.79M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
466
549k
    char* get_data(size_t index) const {
467
549k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
468
549k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
466
5
    char* get_data(size_t index) const {
467
5
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
468
5
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
466
6.30k
    char* get_data(size_t index) const {
467
6.30k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
468
6.30k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
466
5.21k
    char* get_data(size_t index) const {
467
5.21k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
468
5.21k
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
466
1
    char* get_data(size_t index) const {
467
1
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
468
1
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
466
5
    char* get_data(size_t index) const {
467
5
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
468
5
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
466
5
    char* get_data(size_t index) const {
467
5
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
468
5
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
469
470
private:
471
    void _copy_next_values(size_t n, void* data) {
472
        memcpy(data, get_data(_cur_index), n * SIZE_OF_TYPE);
473
    }
474
475
    using CppType = typename TypeTraits<Type>::CppType;
476
477
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
478
479
    Slice _data;
480
    PageDecoderOptions _options;
481
    bool _parsed;
482
    size_t _num_elements;
483
    size_t _num_element_after_padding;
484
485
    int _size_of_element;
486
    size_t _cur_index;
487
488
    std::vector<std::conditional_t<std::is_same_v<CppType, bool>, uint8_t, CppType>> _buffer;
489
490
    friend class BinaryDictPageDecoder;
491
};
492
493
} // namespace segment_v2
494
} // namespace doris