Coverage Report

Created: 2026-03-13 21:50

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
#include "common/compile_check_begin.h"
50
51
enum { BITSHUFFLE_PAGE_HEADER_SIZE = 16 };
52
53
void warn_with_bitshuffle_error(int64_t val);
54
55
// BitshufflePageBuilder bitshuffles and compresses the bits of fixed
56
// size type blocks with lz4.
57
//
58
// The page format is as follows:
59
//
60
// 1. Header: (16 bytes total)
61
//
62
//    <num_elements> [32-bit]
63
//      The number of elements encoded in the page.
64
//
65
//    <compressed_size> [32-bit]
66
//      The post-compression size of the page, including this header.
67
//
68
//    <padded_num_elements> [32-bit]
69
//      Padding is needed to meet the requirements of the bitshuffle
70
//      library such that the input/output is a multiple of 8. Some
71
//      ignored elements are appended to the end of the page if necessary
72
//      to meet this requirement.
73
//
74
//      This header field is the post-padding element count.
75
//
76
//    <elem_size_bytes> [32-bit]
77
//      The size of the elements, in bytes, as actually encoded. In the
78
//      case that all of the data in a page can fit into a smaller
79
//      integer type, then we may choose to encode that smaller type
80
//      to save CPU costs.
81
//
82
//      This is currently only implemented in the UINT32 page type.
83
//
84
//   NOTE: all on-disk ints are encoded little-endian
85
//
86
// 2. Element data
87
//
88
//    The header is followed by the bitshuffle-compressed element data.
89
//
90
template <FieldType Type>
91
class BitshufflePageBuilder : public PageBuilderHelper<BitshufflePageBuilder<Type>> {
92
public:
93
    using Self = BitshufflePageBuilder<Type>;
94
    friend class PageBuilderHelper<Self>;
95
96
18.0k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
96
16.3k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
96
623
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
96
13
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
96
643
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
96
340
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
96
2
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
96
2
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
96
4
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
96
7
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
96
11
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
96
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
97
98
1.54M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
98
1.52M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
98
1.40k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
98
13
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
98
17.2k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
98
340
    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
98
2
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12is_page_fullEv
Line
Count
Source
98
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
98
4
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
98
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
98
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
98
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
99
100
683k
    Status add(const uint8_t* vals, size_t* count) override {
101
683k
        return add_internal<false>(vals, count);
102
683k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
100
664k
    Status add(const uint8_t* vals, size_t* count) override {
101
664k
        return add_internal<false>(vals, count);
102
664k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
100
1.40k
    Status add(const uint8_t* vals, size_t* count) override {
101
1.40k
        return add_internal<false>(vals, count);
102
1.40k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
100
13
    Status add(const uint8_t* vals, size_t* count) override {
101
13
        return add_internal<false>(vals, count);
102
13
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
100
17.2k
    Status add(const uint8_t* vals, size_t* count) override {
101
17.2k
        return add_internal<false>(vals, count);
102
17.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
100
340
    Status add(const uint8_t* vals, size_t* count) override {
101
340
        return add_internal<false>(vals, count);
102
340
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
100
2
    Status add(const uint8_t* vals, size_t* count) override {
101
2
        return add_internal<false>(vals, count);
102
2
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
100
2
    Status add(const uint8_t* vals, size_t* count) override {
101
2
        return add_internal<false>(vals, count);
102
2
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
100
4
    Status add(const uint8_t* vals, size_t* count) override {
101
4
        return add_internal<false>(vals, count);
102
4
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
100
7
    Status add(const uint8_t* vals, size_t* count) override {
101
7
        return add_internal<false>(vals, count);
102
7
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
100
11
    Status add(const uint8_t* vals, size_t* count) override {
101
11
        return add_internal<false>(vals, count);
102
11
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
100
2
    Status add(const uint8_t* vals, size_t* count) override {
101
2
        return add_internal<false>(vals, count);
102
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
103
104
838k
    Status single_add(const uint8_t* vals, size_t* count) {
105
838k
        return add_internal<true>(vals, count);
106
838k
    }
107
108
    template <bool single>
109
1.52M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
1.52M
        DCHECK(!_finished);
111
1.52M
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
1.52M
        uint32_t to_add = cast_set<UInt32>(
127
1.52M
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
1.52M
        int to_add_size = to_add * SIZE_OF_TYPE;
130
1.52M
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
1.52M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
1.52M
        _count += to_add;
135
1.52M
        _remain_element_capacity -= to_add;
136
1.52M
        _raw_data_size += to_add_size;
137
        // return added number through count
138
1.52M
        *num_written = to_add;
139
1.52M
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
838k
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
838k
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
838k
                        *reinterpret_cast<const uint32_t*>(vals);
150
838k
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
838k
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
0
        memcpy(&_data[orig_size], vals, to_add_size);
159
1.52M
        return Status::OK();
160
1.52M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
664k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
664k
        DCHECK(!_finished);
111
664k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
664k
        uint32_t to_add = cast_set<UInt32>(
127
664k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
664k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
664k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
664k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
664k
        _count += to_add;
135
664k
        _remain_element_capacity -= to_add;
136
664k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
664k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
664k
        memcpy(&_data[orig_size], vals, to_add_size);
159
664k
        return Status::OK();
160
664k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
109
838k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
838k
        DCHECK(!_finished);
111
838k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
838k
        uint32_t to_add = cast_set<UInt32>(
127
838k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
838k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
838k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
838k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
838k
        _count += to_add;
135
838k
        _remain_element_capacity -= to_add;
136
838k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
838k
        *num_written = to_add;
139
838k
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
838k
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
838k
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
838k
                        *reinterpret_cast<const uint32_t*>(vals);
150
838k
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
838k
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
0
        memcpy(&_data[orig_size], vals, to_add_size);
159
838k
        return Status::OK();
160
838k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
1.40k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
1.40k
        DCHECK(!_finished);
111
1.40k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
1.40k
        uint32_t to_add = cast_set<UInt32>(
127
1.40k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
1.40k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
1.40k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
1.40k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
1.40k
        _count += to_add;
135
1.40k
        _remain_element_capacity -= to_add;
136
1.40k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
1.40k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
1.40k
        memcpy(&_data[orig_size], vals, to_add_size);
159
1.40k
        return Status::OK();
160
1.40k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
13
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
13
        DCHECK(!_finished);
111
13
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
13
        uint32_t to_add = cast_set<UInt32>(
127
13
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
13
        int to_add_size = to_add * SIZE_OF_TYPE;
130
13
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
13
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
13
        _count += to_add;
135
13
        _remain_element_capacity -= to_add;
136
13
        _raw_data_size += to_add_size;
137
        // return added number through count
138
13
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
13
        memcpy(&_data[orig_size], vals, to_add_size);
159
13
        return Status::OK();
160
13
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
17.2k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
17.2k
        DCHECK(!_finished);
111
17.2k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
17.2k
        uint32_t to_add = cast_set<UInt32>(
127
17.2k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
17.2k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
17.2k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
17.2k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
17.2k
        _count += to_add;
135
17.2k
        _remain_element_capacity -= to_add;
136
17.2k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
17.2k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
17.2k
        memcpy(&_data[orig_size], vals, to_add_size);
159
17.2k
        return Status::OK();
160
17.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
340
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
340
        DCHECK(!_finished);
111
340
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
340
        uint32_t to_add = cast_set<UInt32>(
127
340
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
340
        int to_add_size = to_add * SIZE_OF_TYPE;
130
340
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
340
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
340
        _count += to_add;
135
340
        _remain_element_capacity -= to_add;
136
340
        _raw_data_size += to_add_size;
137
        // return added number through count
138
340
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
340
        memcpy(&_data[orig_size], vals, to_add_size);
159
340
        return Status::OK();
160
340
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
2
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
2
        DCHECK(!_finished);
111
2
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
2
        uint32_t to_add = cast_set<UInt32>(
127
2
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
2
        int to_add_size = to_add * SIZE_OF_TYPE;
130
2
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
2
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
2
        _count += to_add;
135
2
        _remain_element_capacity -= to_add;
136
2
        _raw_data_size += to_add_size;
137
        // return added number through count
138
2
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
2
        memcpy(&_data[orig_size], vals, to_add_size);
159
2
        return Status::OK();
160
2
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
2
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
2
        DCHECK(!_finished);
111
2
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
2
        uint32_t to_add = cast_set<UInt32>(
127
2
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
2
        int to_add_size = to_add * SIZE_OF_TYPE;
130
2
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
2
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
2
        _count += to_add;
135
2
        _remain_element_capacity -= to_add;
136
2
        _raw_data_size += to_add_size;
137
        // return added number through count
138
2
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
2
        memcpy(&_data[orig_size], vals, to_add_size);
159
2
        return Status::OK();
160
2
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
4
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
4
        DCHECK(!_finished);
111
4
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
4
        uint32_t to_add = cast_set<UInt32>(
127
4
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
4
        int to_add_size = to_add * SIZE_OF_TYPE;
130
4
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
4
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
4
        _count += to_add;
135
4
        _remain_element_capacity -= to_add;
136
4
        _raw_data_size += to_add_size;
137
        // return added number through count
138
4
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
4
        memcpy(&_data[orig_size], vals, to_add_size);
159
4
        return Status::OK();
160
4
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
7
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
7
        DCHECK(!_finished);
111
7
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
7
        uint32_t to_add = cast_set<UInt32>(
127
7
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
7
        int to_add_size = to_add * SIZE_OF_TYPE;
130
7
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
7
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
7
        _count += to_add;
135
7
        _remain_element_capacity -= to_add;
136
7
        _raw_data_size += to_add_size;
137
        // return added number through count
138
7
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
7
        memcpy(&_data[orig_size], vals, to_add_size);
159
7
        return Status::OK();
160
7
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
11
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
11
        DCHECK(!_finished);
111
11
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
11
        uint32_t to_add = cast_set<UInt32>(
127
11
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
11
        int to_add_size = to_add * SIZE_OF_TYPE;
130
11
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
11
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
11
        _count += to_add;
135
11
        _remain_element_capacity -= to_add;
136
11
        _raw_data_size += to_add_size;
137
        // return added number through count
138
11
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
11
        memcpy(&_data[orig_size], vals, to_add_size);
159
11
        return Status::OK();
160
11
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
2
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
2
        DCHECK(!_finished);
111
2
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
2
        uint32_t to_add = cast_set<UInt32>(
127
2
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
2
        int to_add_size = to_add * SIZE_OF_TYPE;
130
2
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
2
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
2
        _count += to_add;
135
2
        _remain_element_capacity -= to_add;
136
2
        _raw_data_size += to_add_size;
137
        // return added number through count
138
2
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
2
        memcpy(&_data[orig_size], vals, to_add_size);
159
2
        return Status::OK();
160
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
161
162
18.5k
    Status finish(OwnedSlice* slice) override {
163
18.5k
        if (_count > 0) {
164
18.5k
            _first_value = cell(0);
165
18.5k
            _last_value = cell(_count - 1);
166
18.5k
        }
167
18.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
18.5k
        return Status::OK();
169
18.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
16.9k
    Status finish(OwnedSlice* slice) override {
163
16.9k
        if (_count > 0) {
164
16.9k
            _first_value = cell(0);
165
16.9k
            _last_value = cell(_count - 1);
166
16.9k
        }
167
16.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
16.9k
        return Status::OK();
169
16.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
634
    Status finish(OwnedSlice* slice) override {
163
634
        if (_count > 0) {
164
634
            _first_value = cell(0);
165
634
            _last_value = cell(_count - 1);
166
634
        }
167
634
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
634
        return Status::OK();
169
634
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
13
    Status finish(OwnedSlice* slice) override {
163
13
        if (_count > 0) {
164
13
            _first_value = cell(0);
165
13
            _last_value = cell(_count - 1);
166
13
        }
167
13
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
13
        return Status::OK();
169
13
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
618
    Status finish(OwnedSlice* slice) override {
163
618
        if (_count > 0) {
164
618
            _first_value = cell(0);
165
618
            _last_value = cell(_count - 1);
166
618
        }
167
618
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
618
        return Status::OK();
169
618
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
335
    Status finish(OwnedSlice* slice) override {
163
335
        if (_count > 0) {
164
335
            _first_value = cell(0);
165
335
            _last_value = cell(_count - 1);
166
335
        }
167
335
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
335
        return Status::OK();
169
335
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
2
    Status finish(OwnedSlice* slice) override {
163
2
        if (_count > 0) {
164
2
            _first_value = cell(0);
165
2
            _last_value = cell(_count - 1);
166
2
        }
167
2
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
2
        return Status::OK();
169
2
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
2
    Status finish(OwnedSlice* slice) override {
163
2
        if (_count > 0) {
164
2
            _first_value = cell(0);
165
2
            _last_value = cell(_count - 1);
166
2
        }
167
2
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
2
        return Status::OK();
169
2
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
4
    Status finish(OwnedSlice* slice) override {
163
4
        if (_count > 0) {
164
4
            _first_value = cell(0);
165
4
            _last_value = cell(_count - 1);
166
4
        }
167
4
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
4
        return Status::OK();
169
4
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
7
    Status finish(OwnedSlice* slice) override {
163
7
        if (_count > 0) {
164
7
            _first_value = cell(0);
165
7
            _last_value = cell(_count - 1);
166
7
        }
167
7
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
7
        return Status::OK();
169
7
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
11
    Status finish(OwnedSlice* slice) override {
163
11
        if (_count > 0) {
164
11
            _first_value = cell(0);
165
11
            _last_value = cell(_count - 1);
166
11
        }
167
11
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
11
        return Status::OK();
169
11
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
2
    Status finish(OwnedSlice* slice) override {
163
2
        if (_count > 0) {
164
2
            _first_value = cell(0);
165
2
            _last_value = cell(_count - 1);
166
2
        }
167
2
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
2
        return Status::OK();
169
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
170
171
38.8k
    Status reset() override {
172
38.8k
        RETURN_IF_CATCH_EXCEPTION({
173
38.8k
            size_t block_size = _options.data_page_size;
174
38.8k
            _count = 0;
175
38.8k
            _raw_data_size = 0;
176
38.8k
            _data.clear();
177
38.8k
            _data.reserve(block_size);
178
38.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
38.8k
                    << "buffer must be naturally-aligned";
180
38.8k
            _buffer.clear();
181
38.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
38.8k
            _finished = false;
183
38.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
38.8k
        });
185
38.8k
        return Status::OK();
186
38.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
171
35.5k
    Status reset() override {
172
35.5k
        RETURN_IF_CATCH_EXCEPTION({
173
35.5k
            size_t block_size = _options.data_page_size;
174
35.5k
            _count = 0;
175
35.5k
            _raw_data_size = 0;
176
35.5k
            _data.clear();
177
35.5k
            _data.reserve(block_size);
178
35.5k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
35.5k
                    << "buffer must be naturally-aligned";
180
35.5k
            _buffer.clear();
181
35.5k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
35.5k
            _finished = false;
183
35.5k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
35.5k
        });
185
35.5k
        return Status::OK();
186
35.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
171
1.25k
    Status reset() override {
172
1.25k
        RETURN_IF_CATCH_EXCEPTION({
173
1.25k
            size_t block_size = _options.data_page_size;
174
1.25k
            _count = 0;
175
1.25k
            _raw_data_size = 0;
176
1.25k
            _data.clear();
177
1.25k
            _data.reserve(block_size);
178
1.25k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
1.25k
                    << "buffer must be naturally-aligned";
180
1.25k
            _buffer.clear();
181
1.25k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
1.25k
            _finished = false;
183
1.25k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
1.25k
        });
185
1.25k
        return Status::OK();
186
1.25k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
171
26
    Status reset() override {
172
26
        RETURN_IF_CATCH_EXCEPTION({
173
26
            size_t block_size = _options.data_page_size;
174
26
            _count = 0;
175
26
            _raw_data_size = 0;
176
26
            _data.clear();
177
26
            _data.reserve(block_size);
178
26
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
26
                    << "buffer must be naturally-aligned";
180
26
            _buffer.clear();
181
26
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
26
            _finished = false;
183
26
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
26
        });
185
26
        return Status::OK();
186
26
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
171
1.26k
    Status reset() override {
172
1.26k
        RETURN_IF_CATCH_EXCEPTION({
173
1.26k
            size_t block_size = _options.data_page_size;
174
1.26k
            _count = 0;
175
1.26k
            _raw_data_size = 0;
176
1.26k
            _data.clear();
177
1.26k
            _data.reserve(block_size);
178
1.26k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
1.26k
                    << "buffer must be naturally-aligned";
180
1.26k
            _buffer.clear();
181
1.26k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
1.26k
            _finished = false;
183
1.26k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
1.26k
        });
185
1.26k
        return Status::OK();
186
1.26k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
171
675
    Status reset() override {
172
675
        RETURN_IF_CATCH_EXCEPTION({
173
675
            size_t block_size = _options.data_page_size;
174
675
            _count = 0;
175
675
            _raw_data_size = 0;
176
675
            _data.clear();
177
675
            _data.reserve(block_size);
178
675
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
675
                    << "buffer must be naturally-aligned";
180
675
            _buffer.clear();
181
675
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
675
            _finished = false;
183
675
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
675
        });
185
675
        return Status::OK();
186
675
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
171
4
    Status reset() override {
172
4
        RETURN_IF_CATCH_EXCEPTION({
173
4
            size_t block_size = _options.data_page_size;
174
4
            _count = 0;
175
4
            _raw_data_size = 0;
176
4
            _data.clear();
177
4
            _data.reserve(block_size);
178
4
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
4
                    << "buffer must be naturally-aligned";
180
4
            _buffer.clear();
181
4
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
4
            _finished = false;
183
4
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
4
        });
185
4
        return Status::OK();
186
4
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
171
4
    Status reset() override {
172
4
        RETURN_IF_CATCH_EXCEPTION({
173
4
            size_t block_size = _options.data_page_size;
174
4
            _count = 0;
175
4
            _raw_data_size = 0;
176
4
            _data.clear();
177
4
            _data.reserve(block_size);
178
4
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
4
                    << "buffer must be naturally-aligned";
180
4
            _buffer.clear();
181
4
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
4
            _finished = false;
183
4
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
4
        });
185
4
        return Status::OK();
186
4
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
171
8
    Status reset() override {
172
8
        RETURN_IF_CATCH_EXCEPTION({
173
8
            size_t block_size = _options.data_page_size;
174
8
            _count = 0;
175
8
            _raw_data_size = 0;
176
8
            _data.clear();
177
8
            _data.reserve(block_size);
178
8
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
8
                    << "buffer must be naturally-aligned";
180
8
            _buffer.clear();
181
8
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
8
            _finished = false;
183
8
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
8
        });
185
8
        return Status::OK();
186
8
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
171
14
    Status reset() override {
172
14
        RETURN_IF_CATCH_EXCEPTION({
173
14
            size_t block_size = _options.data_page_size;
174
14
            _count = 0;
175
14
            _raw_data_size = 0;
176
14
            _data.clear();
177
14
            _data.reserve(block_size);
178
14
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
14
                    << "buffer must be naturally-aligned";
180
14
            _buffer.clear();
181
14
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
14
            _finished = false;
183
14
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
14
        });
185
14
        return Status::OK();
186
14
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
171
22
    Status reset() override {
172
22
        RETURN_IF_CATCH_EXCEPTION({
173
22
            size_t block_size = _options.data_page_size;
174
22
            _count = 0;
175
22
            _raw_data_size = 0;
176
22
            _data.clear();
177
22
            _data.reserve(block_size);
178
22
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
22
                    << "buffer must be naturally-aligned";
180
22
            _buffer.clear();
181
22
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
22
            _finished = false;
183
22
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
22
        });
185
22
        return Status::OK();
186
22
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
171
4
    Status reset() override {
172
4
        RETURN_IF_CATCH_EXCEPTION({
173
4
            size_t block_size = _options.data_page_size;
174
4
            _count = 0;
175
4
            _raw_data_size = 0;
176
4
            _data.clear();
177
4
            _data.reserve(block_size);
178
4
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
4
                    << "buffer must be naturally-aligned";
180
4
            _buffer.clear();
181
4
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
4
            _finished = false;
183
4
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
4
        });
185
4
        return Status::OK();
186
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
187
188
16.3k
    size_t count() const override { return _count; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
188
16.3k
    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
189
190
7.92k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
190
7.13k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
190
738
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
190
13
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
190
7
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
190
4
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
190
2
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
190
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
190
6
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4sizeEv
Line
Count
Source
190
7
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4sizeEv
Line
Count
Source
190
13
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4sizeEv
Line
Count
Source
190
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
191
192
14.7k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
192
13.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
192
634
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
192
13
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
192
618
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
192
335
    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
192
2
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
192
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
192
4
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
192
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
192
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
192
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
193
194
0
    Status get_first_value(void* value) const override {
195
0
        DCHECK(_finished);
196
0
        if (_count == 0) {
197
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
198
0
        }
199
0
        memcpy(value, &_first_value, SIZE_OF_TYPE);
200
0
        return Status::OK();
201
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
202
3
    Status get_last_value(void* value) const override {
203
3
        DCHECK(_finished);
204
3
        if (_count == 0) {
205
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
206
0
        }
207
3
        memcpy(value, &_last_value, SIZE_OF_TYPE);
208
3
        return Status::OK();
209
3
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE14get_last_valueEPv
Line
Count
Source
202
3
    Status get_last_value(void* value) const override {
203
3
        DCHECK(_finished);
204
3
        if (_count == 0) {
205
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
206
0
        }
207
3
        memcpy(value, &_last_value, SIZE_OF_TYPE);
208
3
        return Status::OK();
209
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
210
211
private:
212
    BitshufflePageBuilder(const PageBuilderOptions& options)
213
18.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
16.3k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
623
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
13
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
643
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
340
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
2
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
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
213
4
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
7
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
11
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
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
214
215
18.5k
    OwnedSlice _finish(int final_size_of_type) {
216
18.5k
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
18.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
18.5k
        int padding_elems = num_elems_after_padding - _count;
221
18.5k
        int padding_bytes = padding_elems * final_size_of_type;
222
112k
        for (int i = 0; i < padding_bytes; i++) {
223
93.6k
            _data.push_back(0);
224
93.6k
        }
225
226
        // reserve enough place for compression
227
18.5k
        _buffer.resize(
228
18.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
18.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
18.5k
        int64_t bytes =
232
18.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
18.5k
                                         num_elems_after_padding, final_size_of_type, 0);
234
18.5k
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
18.5k
        encode_fixed32_le(&_buffer[0], _count);
244
18.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
18.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
18.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
18.5k
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
18.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
18.5k
        return _buffer.build();
251
18.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
215
16.9k
    OwnedSlice _finish(int final_size_of_type) {
216
16.9k
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
16.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
16.9k
        int padding_elems = num_elems_after_padding - _count;
221
16.9k
        int padding_bytes = padding_elems * final_size_of_type;
222
100k
        for (int i = 0; i < padding_bytes; i++) {
223
83.7k
            _data.push_back(0);
224
83.7k
        }
225
226
        // reserve enough place for compression
227
16.9k
        _buffer.resize(
228
16.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
16.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
16.9k
        int64_t bytes =
232
16.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
16.9k
                                         num_elems_after_padding, final_size_of_type, 0);
234
16.9k
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
16.9k
        encode_fixed32_le(&_buffer[0], _count);
244
16.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
16.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
16.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
16.9k
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
16.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
16.9k
        return _buffer.build();
251
16.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
215
634
    OwnedSlice _finish(int final_size_of_type) {
216
634
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
634
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
634
        int padding_elems = num_elems_after_padding - _count;
221
634
        int padding_bytes = padding_elems * final_size_of_type;
222
1.26k
        for (int i = 0; i < padding_bytes; i++) {
223
631
            _data.push_back(0);
224
631
        }
225
226
        // reserve enough place for compression
227
634
        _buffer.resize(
228
634
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
634
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
634
        int64_t bytes =
232
634
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
634
                                         num_elems_after_padding, final_size_of_type, 0);
234
634
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
634
        encode_fixed32_le(&_buffer[0], _count);
244
634
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
634
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
634
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
634
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
634
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
634
        return _buffer.build();
251
634
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
215
13
    OwnedSlice _finish(int final_size_of_type) {
216
13
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
13
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
13
        int padding_elems = num_elems_after_padding - _count;
221
13
        int padding_bytes = padding_elems * final_size_of_type;
222
185
        for (int i = 0; i < padding_bytes; i++) {
223
172
            _data.push_back(0);
224
172
        }
225
226
        // reserve enough place for compression
227
13
        _buffer.resize(
228
13
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
13
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
13
        int64_t bytes =
232
13
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
13
                                         num_elems_after_padding, final_size_of_type, 0);
234
13
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
13
        encode_fixed32_le(&_buffer[0], _count);
244
13
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
13
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
13
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
13
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
13
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
13
        return _buffer.build();
251
13
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
215
618
    OwnedSlice _finish(int final_size_of_type) {
216
618
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
618
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
618
        int padding_elems = num_elems_after_padding - _count;
221
618
        int padding_bytes = padding_elems * final_size_of_type;
222
8.23k
        for (int i = 0; i < padding_bytes; i++) {
223
7.61k
            _data.push_back(0);
224
7.61k
        }
225
226
        // reserve enough place for compression
227
618
        _buffer.resize(
228
618
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
618
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
618
        int64_t bytes =
232
618
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
618
                                         num_elems_after_padding, final_size_of_type, 0);
234
618
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
618
        encode_fixed32_le(&_buffer[0], _count);
244
618
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
618
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
618
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
618
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
618
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
618
        return _buffer.build();
251
618
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
215
335
    OwnedSlice _finish(int final_size_of_type) {
216
335
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
335
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
335
        int padding_elems = num_elems_after_padding - _count;
221
335
        int padding_bytes = padding_elems * final_size_of_type;
222
655
        for (int i = 0; i < padding_bytes; i++) {
223
320
            _data.push_back(0);
224
320
        }
225
226
        // reserve enough place for compression
227
335
        _buffer.resize(
228
335
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
335
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
335
        int64_t bytes =
232
335
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
335
                                         num_elems_after_padding, final_size_of_type, 0);
234
335
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
335
        encode_fixed32_le(&_buffer[0], _count);
244
335
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
335
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
335
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
335
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
335
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
335
        return _buffer.build();
251
335
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
215
2
    OwnedSlice _finish(int final_size_of_type) {
216
2
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
2
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
2
        int padding_elems = num_elems_after_padding - _count;
221
2
        int padding_bytes = padding_elems * final_size_of_type;
222
226
        for (int i = 0; i < padding_bytes; i++) {
223
224
            _data.push_back(0);
224
224
        }
225
226
        // reserve enough place for compression
227
2
        _buffer.resize(
228
2
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
2
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
2
        int64_t bytes =
232
2
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
2
                                         num_elems_after_padding, final_size_of_type, 0);
234
2
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
2
        encode_fixed32_le(&_buffer[0], _count);
244
2
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
2
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
2
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
2
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
2
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
2
        return _buffer.build();
251
2
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
215
2
    OwnedSlice _finish(int final_size_of_type) {
216
2
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
2
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
2
        int padding_elems = num_elems_after_padding - _count;
221
2
        int padding_bytes = padding_elems * final_size_of_type;
222
2
        for (int i = 0; i < padding_bytes; i++) {
223
0
            _data.push_back(0);
224
0
        }
225
226
        // reserve enough place for compression
227
2
        _buffer.resize(
228
2
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
2
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
2
        int64_t bytes =
232
2
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
2
                                         num_elems_after_padding, final_size_of_type, 0);
234
2
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
2
        encode_fixed32_le(&_buffer[0], _count);
244
2
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
2
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
2
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
2
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
2
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
2
        return _buffer.build();
251
2
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
215
4
    OwnedSlice _finish(int final_size_of_type) {
216
4
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
4
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
4
        int padding_elems = num_elems_after_padding - _count;
221
4
        int padding_bytes = padding_elems * final_size_of_type;
222
82
        for (int i = 0; i < padding_bytes; i++) {
223
78
            _data.push_back(0);
224
78
        }
225
226
        // reserve enough place for compression
227
4
        _buffer.resize(
228
4
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
4
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
4
        int64_t bytes =
232
4
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
4
                                         num_elems_after_padding, final_size_of_type, 0);
234
4
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
4
        encode_fixed32_le(&_buffer[0], _count);
244
4
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
4
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
4
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
4
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
4
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
4
        return _buffer.build();
251
4
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
215
7
    OwnedSlice _finish(int final_size_of_type) {
216
7
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
7
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
7
        int padding_elems = num_elems_after_padding - _count;
221
7
        int padding_bytes = padding_elems * final_size_of_type;
222
183
        for (int i = 0; i < padding_bytes; i++) {
223
176
            _data.push_back(0);
224
176
        }
225
226
        // reserve enough place for compression
227
7
        _buffer.resize(
228
7
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
7
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
7
        int64_t bytes =
232
7
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
7
                                         num_elems_after_padding, final_size_of_type, 0);
234
7
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
7
        encode_fixed32_le(&_buffer[0], _count);
244
7
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
7
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
7
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
7
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
7
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
7
        return _buffer.build();
251
7
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
215
11
    OwnedSlice _finish(int final_size_of_type) {
216
11
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
11
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
11
        int padding_elems = num_elems_after_padding - _count;
221
11
        int padding_bytes = padding_elems * final_size_of_type;
222
571
        for (int i = 0; i < padding_bytes; i++) {
223
560
            _data.push_back(0);
224
560
        }
225
226
        // reserve enough place for compression
227
11
        _buffer.resize(
228
11
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
11
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
11
        int64_t bytes =
232
11
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
11
                                         num_elems_after_padding, final_size_of_type, 0);
234
11
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
11
        encode_fixed32_le(&_buffer[0], _count);
244
11
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
11
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
11
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
11
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
11
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
11
        return _buffer.build();
251
11
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
215
2
    OwnedSlice _finish(int final_size_of_type) {
216
2
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
2
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
2
        int padding_elems = num_elems_after_padding - _count;
221
2
        int padding_bytes = padding_elems * final_size_of_type;
222
170
        for (int i = 0; i < padding_bytes; i++) {
223
168
            _data.push_back(0);
224
168
        }
225
226
        // reserve enough place for compression
227
2
        _buffer.resize(
228
2
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
2
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
2
        int64_t bytes =
232
2
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
2
                                         num_elems_after_padding, final_size_of_type, 0);
234
2
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
2
        encode_fixed32_le(&_buffer[0], _count);
244
2
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
2
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
2
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
2
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
2
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
2
        return _buffer.build();
251
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
252
253
    using CppType = typename TypeTraits<Type>::CppType;
254
255
37.1k
    CppType cell(int idx) const {
256
37.1k
        DCHECK_GE(idx, 0);
257
37.1k
        CppType ret;
258
37.1k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
37.1k
        return ret;
260
37.1k
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4cellEi
Line
Count
Source
255
33.8k
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
33.8k
        CppType ret;
258
33.8k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
33.8k
        return ret;
260
33.8k
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4cellEi
Line
Count
Source
255
1.26k
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
1.26k
        CppType ret;
258
1.26k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
1.26k
        return ret;
260
1.26k
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4cellEi
Line
Count
Source
255
26
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
26
        CppType ret;
258
26
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
26
        return ret;
260
26
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4cellEi
Line
Count
Source
255
1.23k
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
1.23k
        CppType ret;
258
1.23k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
1.23k
        return ret;
260
1.23k
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4cellEi
Line
Count
Source
255
670
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
670
        CppType ret;
258
670
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
670
        return ret;
260
670
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4cellEi
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4cellEi
Line
Count
Source
255
4
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
4
        CppType ret;
258
4
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
4
        return ret;
260
4
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4cellEi
Line
Count
Source
255
4
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
4
        CppType ret;
258
4
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
4
        return ret;
260
4
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4cellEi
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4cellEi
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4cellEi
Line
Count
Source
255
8
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
8
        CppType ret;
258
8
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
8
        return ret;
260
8
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4cellEi
Line
Count
Source
255
14
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
14
        CppType ret;
258
14
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
14
        return ret;
260
14
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4cellEi
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4cellEi
Line
Count
Source
255
22
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
22
        CppType ret;
258
22
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
22
        return ret;
260
22
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4cellEi
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4cellEi
Line
Count
Source
255
4
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
4
        CppType ret;
258
4
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
4
        return ret;
260
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
261
262
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
263
    PageBuilderOptions _options;
264
    uint32_t _count;
265
    uint32_t _remain_element_capacity;
266
    bool _finished;
267
    faststring _data;
268
    faststring _buffer;
269
    CppType _first_value;
270
    CppType _last_value;
271
    uint64_t _raw_data_size = 0;
272
};
273
274
inline Status parse_bit_shuffle_header(const Slice& data, size_t& num_elements,
275
                                       size_t& compressed_size, size_t& num_element_after_padding,
276
28.2k
                                       int& size_of_element) {
277
28.2k
    if (data.size < BITSHUFFLE_PAGE_HEADER_SIZE) {
278
0
        return Status::InternalError("file corruption: invalid data size:{}, header size:{}",
279
0
                                     data.size, BITSHUFFLE_PAGE_HEADER_SIZE);
280
0
    }
281
282
28.2k
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
283
28.2k
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
284
28.2k
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
285
28.2k
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
286
28.2k
    if (num_element_after_padding != ALIGN_UP(num_elements, 8)) {
287
0
        return Status::InternalError(
288
0
                "num of element information corrupted,"
289
0
                " _num_element_after_padding:{}, _num_elements:{}, expected_padding:{},"
290
0
                " compressed_size:{}, size_of_element:{}, data_size:{}",
291
0
                num_element_after_padding, num_elements, ALIGN_UP(num_elements, 8), compressed_size,
292
0
                size_of_element, data.size);
293
0
    }
294
28.2k
    switch (size_of_element) {
295
670
    case 1:
296
680
    case 2:
297
680
    case 3:
298
27.4k
    case 4:
299
28.2k
    case 8:
300
28.2k
    case 12:
301
28.2k
    case 16:
302
28.2k
    case 32:
303
28.2k
        break;
304
0
    default:
305
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
306
28.2k
    }
307
28.2k
    return Status::OK();
308
28.2k
}
309
310
template <FieldType Type>
311
class BitShufflePageDecoder : public PageDecoder {
312
public:
313
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
314
14.1k
            : _data(data),
315
14.1k
              _options(options),
316
14.1k
              _parsed(false),
317
14.1k
              _num_elements(0),
318
14.1k
              _num_element_after_padding(0),
319
14.1k
              _size_of_element(0),
320
14.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
13.3k
            : _data(data),
315
13.3k
              _options(options),
316
13.3k
              _parsed(false),
317
13.3k
              _num_elements(0),
318
13.3k
              _num_element_after_padding(0),
319
13.3k
              _size_of_element(0),
320
13.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
335
            : _data(data),
315
335
              _options(options),
316
335
              _parsed(false),
317
335
              _num_elements(0),
318
335
              _num_element_after_padding(0),
319
335
              _size_of_element(0),
320
335
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
5
            : _data(data),
315
5
              _options(options),
316
5
              _parsed(false),
317
5
              _num_elements(0),
318
5
              _num_element_after_padding(0),
319
5
              _size_of_element(0),
320
5
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
220
            : _data(data),
315
220
              _options(options),
316
220
              _parsed(false),
317
220
              _num_elements(0),
318
220
              _num_element_after_padding(0),
319
220
              _size_of_element(0),
320
220
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
180
            : _data(data),
315
180
              _options(options),
316
180
              _parsed(false),
317
180
              _num_elements(0),
318
180
              _num_element_after_padding(0),
319
180
              _size_of_element(0),
320
180
              _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
314
1
            : _data(data),
315
1
              _options(options),
316
1
              _parsed(false),
317
1
              _num_elements(0),
318
1
              _num_element_after_padding(0),
319
1
              _size_of_element(0),
320
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
314
5
            : _data(data),
315
5
              _options(options),
316
5
              _parsed(false),
317
5
              _num_elements(0),
318
5
              _num_element_after_padding(0),
319
5
              _size_of_element(0),
320
5
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
5
            : _data(data),
315
5
              _options(options),
316
5
              _parsed(false),
317
5
              _num_elements(0),
318
5
              _num_element_after_padding(0),
319
5
              _size_of_element(0),
320
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
321
322
14.1k
    Status init() override {
323
14.1k
        CHECK(!_parsed);
324
14.1k
        size_t unused;
325
14.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
14.1k
                                                 _num_element_after_padding, _size_of_element));
327
328
14.1k
        if (_data.size !=
329
14.1k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
14.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
14.1k
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
14.1k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
14.1k
        _parsed = true;
349
14.1k
        return Status::OK();
350
14.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
322
13.3k
    Status init() override {
323
13.3k
        CHECK(!_parsed);
324
13.3k
        size_t unused;
325
13.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
13.3k
                                                 _num_element_after_padding, _size_of_element));
327
328
13.3k
        if (_data.size !=
329
13.3k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
13.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
13.3k
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
13.3k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
13.3k
        _parsed = true;
349
13.3k
        return Status::OK();
350
13.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
322
335
    Status init() override {
323
335
        CHECK(!_parsed);
324
335
        size_t unused;
325
335
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
335
                                                 _num_element_after_padding, _size_of_element));
327
328
335
        if (_data.size !=
329
335
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
335
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
335
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
335
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
335
        _parsed = true;
349
335
        return Status::OK();
350
335
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
322
5
    Status init() override {
323
5
        CHECK(!_parsed);
324
5
        size_t unused;
325
5
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
5
                                                 _num_element_after_padding, _size_of_element));
327
328
5
        if (_data.size !=
329
5
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
5
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
5
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
5
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
5
        _parsed = true;
349
5
        return Status::OK();
350
5
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
322
220
    Status init() override {
323
220
        CHECK(!_parsed);
324
220
        size_t unused;
325
220
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
220
                                                 _num_element_after_padding, _size_of_element));
327
328
220
        if (_data.size !=
329
220
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
220
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
220
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
220
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
220
        _parsed = true;
349
220
        return Status::OK();
350
220
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
322
180
    Status init() override {
323
180
        CHECK(!_parsed);
324
180
        size_t unused;
325
180
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
180
                                                 _num_element_after_padding, _size_of_element));
327
328
180
        if (_data.size !=
329
180
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
180
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
180
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
180
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
180
        _parsed = true;
349
180
        return Status::OK();
350
180
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
322
1
    Status init() override {
323
1
        CHECK(!_parsed);
324
1
        size_t unused;
325
1
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
1
                                                 _num_element_after_padding, _size_of_element));
327
328
1
        if (_data.size !=
329
1
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
1
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
1
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
1
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
1
        _parsed = true;
349
1
        return Status::OK();
350
1
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
322
5
    Status init() override {
323
5
        CHECK(!_parsed);
324
5
        size_t unused;
325
5
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
5
                                                 _num_element_after_padding, _size_of_element));
327
328
5
        if (_data.size !=
329
5
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
5
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
5
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
5
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
5
        _parsed = true;
349
5
        return Status::OK();
350
5
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
322
5
    Status init() override {
323
5
        CHECK(!_parsed);
324
5
        size_t unused;
325
5
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
5
                                                 _num_element_after_padding, _size_of_element));
327
328
5
        if (_data.size !=
329
5
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
5
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
5
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
5
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
5
        _parsed = true;
349
5
        return Status::OK();
350
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
351
352
    // If the page only contains null, then _num_elements == 0, and the nullmap has
353
    // some value. But in _seek_columns --> seek_to_ordinal --> _seek_to_pos_in_page
354
    // in this call stack it will pass pos == 0 to this method. Although we can add some
355
    // code such as check if the count == 0, then skip seek, but there are other method such
356
    // as init will also call seek with pos == 0. And the seek is useless when _num_elements
357
    // == 0, because next batch will return empty in this method.
358
5.41k
    Status seek_to_position_in_page(size_t pos) override {
359
5.41k
        DCHECK(_parsed) << "Must call init()";
360
5.41k
        if (_num_elements == 0) [[unlikely]] {
361
0
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
0
        }
366
367
5.41k
        DCHECK_LE(pos, _num_elements);
368
5.41k
        _cur_index = pos;
369
5.41k
        return Status::OK();
370
5.41k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
358
4.44k
    Status seek_to_position_in_page(size_t pos) override {
359
4.44k
        DCHECK(_parsed) << "Must call init()";
360
4.44k
        if (_num_elements == 0) [[unlikely]] {
361
0
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
0
        }
366
367
4.44k
        DCHECK_LE(pos, _num_elements);
368
4.44k
        _cur_index = pos;
369
4.44k
        return Status::OK();
370
4.44k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
358
591
    Status seek_to_position_in_page(size_t pos) override {
359
591
        DCHECK(_parsed) << "Must call init()";
360
591
        if (_num_elements == 0) [[unlikely]] {
361
0
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
0
        }
366
367
591
        DCHECK_LE(pos, _num_elements);
368
591
        _cur_index = pos;
369
591
        return Status::OK();
370
591
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
358
1
    Status seek_to_position_in_page(size_t pos) override {
359
1
        DCHECK(_parsed) << "Must call init()";
360
1
        if (_num_elements == 0) [[unlikely]] {
361
0
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
0
        }
366
367
1
        DCHECK_LE(pos, _num_elements);
368
1
        _cur_index = pos;
369
1
        return Status::OK();
370
1
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
358
357
    Status seek_to_position_in_page(size_t pos) override {
359
357
        DCHECK(_parsed) << "Must call init()";
360
357
        if (_num_elements == 0) [[unlikely]] {
361
0
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
0
        }
366
367
357
        DCHECK_LE(pos, _num_elements);
368
357
        _cur_index = pos;
369
357
        return Status::OK();
370
357
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
358
21
    Status seek_to_position_in_page(size_t pos) override {
359
21
        DCHECK(_parsed) << "Must call init()";
360
21
        if (_num_elements == 0) [[unlikely]] {
361
0
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
0
        }
366
367
21
        DCHECK_LE(pos, _num_elements);
368
21
        _cur_index = pos;
369
21
        return Status::OK();
370
21
    }
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
358
1
    Status seek_to_position_in_page(size_t pos) override {
359
1
        DCHECK(_parsed) << "Must call init()";
360
1
        if (_num_elements == 0) [[unlikely]] {
361
0
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
0
        }
366
367
1
        DCHECK_LE(pos, _num_elements);
368
1
        _cur_index = pos;
369
1
        return Status::OK();
370
1
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
358
1
    Status seek_to_position_in_page(size_t pos) override {
359
1
        DCHECK(_parsed) << "Must call init()";
360
1
        if (_num_elements == 0) [[unlikely]] {
361
0
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
0
        }
366
367
1
        DCHECK_LE(pos, _num_elements);
368
1
        _cur_index = pos;
369
1
        return Status::OK();
370
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
371
372
0
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
373
0
        DCHECK(_parsed) << "Must call init() firstly";
374
375
0
        if (_num_elements == 0) {
376
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
377
0
        }
378
379
0
        size_t left = 0;
380
0
        size_t right = _num_elements;
381
382
0
        void* mid_value = nullptr;
383
384
        // find the first value >= target. after loop,
385
        // - left == index of first value >= target when found
386
        // - left == _num_elements when not found (all values < target)
387
0
        while (left < right) {
388
0
            size_t mid = left + (right - left) / 2;
389
0
            mid_value = get_data(mid);
390
0
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
391
0
                left = mid + 1;
392
0
            } else {
393
0
                right = mid;
394
0
            }
395
0
        }
396
0
        if (left >= _num_elements) {
397
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
398
0
        }
399
0
        void* find_value = get_data(left);
400
0
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
401
0
            *exact_match = true;
402
0
        } else {
403
0
            *exact_match = false;
404
0
        }
405
406
0
        _cur_index = left;
407
0
        return Status::OK();
408
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
409
410
    template <bool forward_index = true>
411
32.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
32.7k
        DCHECK(_parsed);
413
32.7k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
32.7k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
32.7k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
32.7k
        *n = max_fetch;
422
32.7k
        if constexpr (forward_index) {
423
32.6k
            _cur_index += max_fetch;
424
32.6k
        }
425
426
32.7k
        return Status::OK();
427
32.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
24.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
24.6k
        DCHECK(_parsed);
413
24.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
24.6k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
24.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
24.6k
        *n = max_fetch;
422
24.6k
        if constexpr (forward_index) {
423
24.6k
            _cur_index += max_fetch;
424
24.6k
        }
425
426
24.6k
        return Status::OK();
427
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
411
1.56k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
1.56k
        DCHECK(_parsed);
413
1.56k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
1.56k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
1.56k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
1.56k
        *n = max_fetch;
422
1.56k
        if constexpr (forward_index) {
423
1.56k
            _cur_index += max_fetch;
424
1.56k
        }
425
426
1.56k
        return Status::OK();
427
1.56k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
1
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
1
        DCHECK(_parsed);
413
1
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
1
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
1
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
1
        *n = max_fetch;
422
1
        if constexpr (forward_index) {
423
1
            _cur_index += max_fetch;
424
1
        }
425
426
1
        return Status::OK();
427
1
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
6.22k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
6.22k
        DCHECK(_parsed);
413
6.22k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
6.22k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
6.22k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
6.22k
        *n = max_fetch;
422
6.22k
        if constexpr (forward_index) {
423
6.22k
            _cur_index += max_fetch;
424
6.22k
        }
425
426
6.22k
        return Status::OK();
427
6.22k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
182
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
182
        DCHECK(_parsed);
413
182
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
182
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
182
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
182
        *n = max_fetch;
422
182
        if constexpr (forward_index) {
423
182
            _cur_index += max_fetch;
424
182
        }
425
426
182
        return Status::OK();
427
182
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
183
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
183
        DCHECK(_parsed);
413
183
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
183
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
183
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
183
        *n = max_fetch;
422
        if constexpr (forward_index) {
423
            _cur_index += max_fetch;
424
        }
425
426
183
        return Status::OK();
427
183
    }
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
411
1
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
1
        DCHECK(_parsed);
413
1
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
1
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
1
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
1
        *n = max_fetch;
422
1
        if constexpr (forward_index) {
423
1
            _cur_index += max_fetch;
424
1
        }
425
426
1
        return Status::OK();
427
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
411
1
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
1
        DCHECK(_parsed);
413
1
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
1
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
1
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
1
        *n = max_fetch;
422
1
        if constexpr (forward_index) {
423
1
            _cur_index += max_fetch;
424
1
        }
425
426
1
        return Status::OK();
427
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
411
1
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
1
        DCHECK(_parsed);
413
1
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
1
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
1
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
1
        *n = max_fetch;
422
1
        if constexpr (forward_index) {
423
1
            _cur_index += max_fetch;
424
1
        }
425
426
1
        return Status::OK();
427
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
428
429
32.6k
    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
429
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
429
1.56k
    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
429
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
429
6.22k
    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
429
182
    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
429
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
429
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
429
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
430
431
    Status read_by_rowids(const rowid_t* rowids, ordinal_t page_first_ordinal, size_t* n,
432
4.90k
                          MutableColumnPtr& dst) override {
433
4.90k
        DCHECK(_parsed);
434
4.90k
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
4.90k
        auto total = *n;
440
4.90k
        auto read_count = 0;
441
4.90k
        _buffer.resize(total);
442
3.32M
        for (size_t i = 0; i < total; ++i) {
443
3.31M
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
3.31M
            if (UNLIKELY(ord >= _num_elements)) {
445
9
                break;
446
9
            }
447
448
3.31M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
3.31M
        }
450
451
4.90k
        if (LIKELY(read_count > 0)) {
452
4.90k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
4.90k
        }
454
455
4.90k
        *n = read_count;
456
4.90k
        return Status::OK();
457
4.90k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
3.94k
                          MutableColumnPtr& dst) override {
433
3.94k
        DCHECK(_parsed);
434
3.94k
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
3.94k
        auto total = *n;
440
3.94k
        auto read_count = 0;
441
3.94k
        _buffer.resize(total);
442
2.76M
        for (size_t i = 0; i < total; ++i) {
443
2.76M
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
2.76M
            if (UNLIKELY(ord >= _num_elements)) {
445
9
                break;
446
9
            }
447
448
2.76M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
2.76M
        }
450
451
3.94k
        if (LIKELY(read_count > 0)) {
452
3.94k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
3.94k
        }
454
455
3.94k
        *n = read_count;
456
3.94k
        return Status::OK();
457
3.94k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
658
                          MutableColumnPtr& dst) override {
433
658
        DCHECK(_parsed);
434
658
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
658
        auto total = *n;
440
658
        auto read_count = 0;
441
658
        _buffer.resize(total);
442
548k
        for (size_t i = 0; i < total; ++i) {
443
547k
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
547k
            if (UNLIKELY(ord >= _num_elements)) {
445
0
                break;
446
0
            }
447
448
547k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
547k
        }
450
451
658
        if (LIKELY(read_count > 0)) {
452
658
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
658
        }
454
455
658
        *n = read_count;
456
658
        return Status::OK();
457
658
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
4
                          MutableColumnPtr& dst) override {
433
4
        DCHECK(_parsed);
434
4
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
4
        auto total = *n;
440
4
        auto read_count = 0;
441
4
        _buffer.resize(total);
442
8
        for (size_t i = 0; i < total; ++i) {
443
4
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
4
            if (UNLIKELY(ord >= _num_elements)) {
445
0
                break;
446
0
            }
447
448
4
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
4
        }
450
451
4
        if (LIKELY(read_count > 0)) {
452
4
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
4
        }
454
455
4
        *n = read_count;
456
4
        return Status::OK();
457
4
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
268
                          MutableColumnPtr& dst) override {
433
268
        DCHECK(_parsed);
434
268
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
268
        auto total = *n;
440
268
        auto read_count = 0;
441
268
        _buffer.resize(total);
442
1.30k
        for (size_t i = 0; i < total; ++i) {
443
1.03k
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
1.03k
            if (UNLIKELY(ord >= _num_elements)) {
445
0
                break;
446
0
            }
447
448
1.03k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
1.03k
        }
450
451
268
        if (LIKELY(read_count > 0)) {
452
268
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
268
        }
454
455
268
        *n = read_count;
456
268
        return Status::OK();
457
268
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
16
                          MutableColumnPtr& dst) override {
433
16
        DCHECK(_parsed);
434
16
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
16
        auto total = *n;
440
16
        auto read_count = 0;
441
16
        _buffer.resize(total);
442
5.44k
        for (size_t i = 0; i < total; ++i) {
443
5.43k
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
5.43k
            if (UNLIKELY(ord >= _num_elements)) {
445
0
                break;
446
0
            }
447
448
5.43k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
5.43k
        }
450
451
16
        if (LIKELY(read_count > 0)) {
452
16
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
16
        }
454
455
16
        *n = read_count;
456
16
        return Status::OK();
457
16
    }
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
432
4
                          MutableColumnPtr& dst) override {
433
4
        DCHECK(_parsed);
434
4
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
4
        auto total = *n;
440
4
        auto read_count = 0;
441
4
        _buffer.resize(total);
442
8
        for (size_t i = 0; i < total; ++i) {
443
4
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
4
            if (UNLIKELY(ord >= _num_elements)) {
445
0
                break;
446
0
            }
447
448
4
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
4
        }
450
451
4
        if (LIKELY(read_count > 0)) {
452
4
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
4
        }
454
455
4
        *n = read_count;
456
4
        return Status::OK();
457
4
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
4
                          MutableColumnPtr& dst) override {
433
4
        DCHECK(_parsed);
434
4
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
4
        auto total = *n;
440
4
        auto read_count = 0;
441
4
        _buffer.resize(total);
442
8
        for (size_t i = 0; i < total; ++i) {
443
4
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
4
            if (UNLIKELY(ord >= _num_elements)) {
445
0
                break;
446
0
            }
447
448
4
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
4
        }
450
451
4
        if (LIKELY(read_count > 0)) {
452
4
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
4
        }
454
455
4
        *n = read_count;
456
4
        return Status::OK();
457
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
458
459
183
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
460
183
        return next_batch<false>(n, dst);
461
183
    }
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
459
183
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
460
183
        return next_batch<false>(n, dst);
461
183
    }
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
462
463
3
    size_t count() const override { return _num_elements; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
463
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
464
465
898
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
465
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
465
699
    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
466
467
3.35M
    char* get_data(size_t index) const {
468
3.35M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
3.35M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
467
2.79M
    char* get_data(size_t index) const {
468
2.79M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
2.79M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
467
549k
    char* get_data(size_t index) const {
468
549k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
549k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
467
5
    char* get_data(size_t index) const {
468
5
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
5
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
467
7.25k
    char* get_data(size_t index) const {
468
7.25k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
7.25k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
467
5.79k
    char* get_data(size_t index) const {
468
5.79k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
5.79k
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
467
1
    char* get_data(size_t index) const {
468
1
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
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
467
5
    char* get_data(size_t index) const {
468
5
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
5
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
467
5
    char* get_data(size_t index) const {
468
5
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
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
470
471
private:
472
    void _copy_next_values(size_t n, void* data) {
473
        memcpy(data, get_data(_cur_index), n * SIZE_OF_TYPE);
474
    }
475
476
    using CppType = typename TypeTraits<Type>::CppType;
477
478
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
479
480
    Slice _data;
481
    PageDecoderOptions _options;
482
    bool _parsed;
483
    size_t _num_elements;
484
    size_t _num_element_after_padding;
485
486
    int _size_of_element;
487
    size_t _cur_index;
488
489
    std::vector<std::conditional_t<std::is_same_v<CppType, bool>, uint8_t, CppType>> _buffer;
490
491
    friend class BinaryDictPageDecoder;
492
};
493
494
#include "common/compile_check_end.h"
495
} // namespace segment_v2
496
} // namespace doris