Coverage Report

Created: 2026-08-26 09:46

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/storage/segment/bitshuffle_page.h
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#pragma once
19
20
#include <glog/logging.h>
21
22
#include <algorithm>
23
#include <cstddef>
24
#include <cstdint>
25
#include <cstring>
26
#include <ostream>
27
#include <type_traits>
28
29
#include "common/cast_set.h"
30
#include "common/compiler_util.h" // IWYU pragma: keep
31
#include "common/status.h"
32
#include "core/column/column.h"
33
#include "core/data_type/data_type.h"
34
#include "core/types.h"
35
#include "storage/olap_common.h"
36
#include "storage/segment/bitshuffle_wrapper.h"
37
#include "storage/segment/common.h"
38
#include "storage/segment/options.h"
39
#include "storage/segment/page_builder.h"
40
#include "storage/segment/page_decoder.h"
41
#include "storage/types.h"
42
#include "util/alignment.h"
43
#include "util/coding.h"
44
#include "util/faststring.h"
45
#include "util/slice.h"
46
47
namespace doris {
48
namespace segment_v2 {
49
50
enum { BITSHUFFLE_PAGE_HEADER_SIZE = 16 };
51
52
void warn_with_bitshuffle_error(int64_t val);
53
54
// BitshufflePageBuilder bitshuffles and compresses the bits of fixed
55
// size type blocks with lz4.
56
//
57
// The page format is as follows:
58
//
59
// 1. Header: (16 bytes total)
60
//
61
//    <num_elements> [32-bit]
62
//      The number of elements encoded in the page.
63
//
64
//    <compressed_size> [32-bit]
65
//      The post-compression size of the page, including this header.
66
//
67
//    <padded_num_elements> [32-bit]
68
//      Padding is needed to meet the requirements of the bitshuffle
69
//      library such that the input/output is a multiple of 8. Some
70
//      ignored elements are appended to the end of the page if necessary
71
//      to meet this requirement.
72
//
73
//      This header field is the post-padding element count.
74
//
75
//    <elem_size_bytes> [32-bit]
76
//      The size of the elements, in bytes, as actually encoded. In the
77
//      case that all of the data in a page can fit into a smaller
78
//      integer type, then we may choose to encode that smaller type
79
//      to save CPU costs.
80
//
81
//      This is currently only implemented in the UINT32 page type.
82
//
83
//   NOTE: all on-disk ints are encoded little-endian
84
//
85
// 2. Element data
86
//
87
//    The header is followed by the bitshuffle-compressed element data.
88
//
89
template <FieldType Type>
90
class BitshufflePageBuilder : public PageBuilderHelper<BitshufflePageBuilder<Type>> {
91
public:
92
    using Self = BitshufflePageBuilder<Type>;
93
    friend class PageBuilderHelper<Self>;
94
95
630k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
320k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
35.3k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
7.53k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
31.0k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
10.4k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
95
67.2k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
Line
Count
Source
95
1
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
95
12.5k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
95
14.9k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
687
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
37.2k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
95
42.5k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
450
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
95
7.66k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
351
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
95
9.72k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
95
11.9k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
95
16.9k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
95
1.22k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
95
731
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
95
728
    Status init() override { return reset(); }
96
97
141M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
141M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
37.1k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
9.83k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
121k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
10.1k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
67.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12is_page_fullEv
Line
Count
Source
97
12.2k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
97
16.8k
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12is_page_fullEv
Line
Count
Source
97
685
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
45.0k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
42.2k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
97
513
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
Line
Count
Source
97
7.67k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
97
255
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
97
5.16k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
25.5k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
97
17.8k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Line
Count
Source
97
1.39k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Line
Count
Source
97
630
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
97
643
    bool is_page_full() override { return _remain_element_capacity == 0; }
98
99
1.08M
    Status add(const uint8_t* vals, size_t* count) override {
100
1.08M
        return add_internal<false>(vals, count);
101
1.08M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
99
662k
    Status add(const uint8_t* vals, size_t* count) override {
100
662k
        return add_internal<false>(vals, count);
101
662k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
37.1k
    Status add(const uint8_t* vals, size_t* count) override {
100
37.1k
        return add_internal<false>(vals, count);
101
37.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
9.83k
    Status add(const uint8_t* vals, size_t* count) override {
100
9.83k
        return add_internal<false>(vals, count);
101
9.83k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
121k
    Status add(const uint8_t* vals, size_t* count) override {
100
121k
        return add_internal<false>(vals, count);
101
121k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
10.1k
    Status add(const uint8_t* vals, size_t* count) override {
100
10.1k
        return add_internal<false>(vals, count);
101
10.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
67.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
67.3k
        return add_internal<false>(vals, count);
101
67.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
99
12.2k
    Status add(const uint8_t* vals, size_t* count) override {
100
12.2k
        return add_internal<false>(vals, count);
101
12.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
99
16.8k
    Status add(const uint8_t* vals, size_t* count) override {
100
16.8k
        return add_internal<false>(vals, count);
101
16.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
685
    Status add(const uint8_t* vals, size_t* count) override {
100
685
        return add_internal<false>(vals, count);
101
685
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
45.0k
    Status add(const uint8_t* vals, size_t* count) override {
100
45.0k
        return add_internal<false>(vals, count);
101
45.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
42.2k
    Status add(const uint8_t* vals, size_t* count) override {
100
42.2k
        return add_internal<false>(vals, count);
101
42.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
99
513
    Status add(const uint8_t* vals, size_t* count) override {
100
513
        return add_internal<false>(vals, count);
101
513
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
Line
Count
Source
99
7.67k
    Status add(const uint8_t* vals, size_t* count) override {
100
7.67k
        return add_internal<false>(vals, count);
101
7.67k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
255
    Status add(const uint8_t* vals, size_t* count) override {
100
255
        return add_internal<false>(vals, count);
101
255
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
99
5.16k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.16k
        return add_internal<false>(vals, count);
101
5.16k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
25.5k
    Status add(const uint8_t* vals, size_t* count) override {
100
25.5k
        return add_internal<false>(vals, count);
101
25.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
99
17.8k
    Status add(const uint8_t* vals, size_t* count) override {
100
17.8k
        return add_internal<false>(vals, count);
101
17.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Line
Count
Source
99
1.39k
    Status add(const uint8_t* vals, size_t* count) override {
100
1.39k
        return add_internal<false>(vals, count);
101
1.39k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Line
Count
Source
99
630
    Status add(const uint8_t* vals, size_t* count) override {
100
630
        return add_internal<false>(vals, count);
101
630
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
99
643
    Status add(const uint8_t* vals, size_t* count) override {
100
643
        return add_internal<false>(vals, count);
101
643
    }
102
103
142M
    Status single_add(const uint8_t* vals, size_t* count) {
104
142M
        return add_internal<true>(vals, count);
105
142M
    }
106
107
    template <bool single>
108
141M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
141M
        DCHECK(!_finished);
110
141M
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
141M
        uint32_t to_add = cast_set<UInt32>(
126
141M
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
141M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
141M
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
141M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
144M
        _count += to_add;
134
144M
        _remain_element_capacity -= to_add;
135
144M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
144M
        *num_written = to_add;
138
144M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
143M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
143M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
143M
                        *reinterpret_cast<const uint32_t*>(vals);
149
143M
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
143M
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
0
        memcpy(&_data[orig_size], vals, to_add_size);
158
144M
        return Status::OK();
159
141M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
662k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
662k
        DCHECK(!_finished);
110
662k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
662k
        uint32_t to_add = cast_set<UInt32>(
126
662k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
662k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
662k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
662k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
662k
        _count += to_add;
134
662k
        _remain_element_capacity -= to_add;
135
662k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
662k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
662k
        memcpy(&_data[orig_size], vals, to_add_size);
158
662k
        return Status::OK();
159
662k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
140M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
140M
        DCHECK(!_finished);
110
140M
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
140M
        uint32_t to_add = cast_set<UInt32>(
126
140M
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
140M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
140M
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
140M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
143M
        _count += to_add;
134
143M
        _remain_element_capacity -= to_add;
135
143M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
143M
        *num_written = to_add;
138
143M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
143M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
143M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
143M
                        *reinterpret_cast<const uint32_t*>(vals);
149
143M
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
143M
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
0
        memcpy(&_data[orig_size], vals, to_add_size);
158
143M
        return Status::OK();
159
140M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
37.1k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
37.1k
        DCHECK(!_finished);
110
37.1k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
37.1k
        uint32_t to_add = cast_set<UInt32>(
126
37.1k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
37.1k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
37.1k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
37.1k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
37.1k
        _count += to_add;
134
37.1k
        _remain_element_capacity -= to_add;
135
37.1k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
37.1k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
37.1k
        memcpy(&_data[orig_size], vals, to_add_size);
158
37.1k
        return Status::OK();
159
37.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
9.83k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
9.83k
        DCHECK(!_finished);
110
9.83k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
9.83k
        uint32_t to_add = cast_set<UInt32>(
126
9.83k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
9.83k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
9.83k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
9.83k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
9.83k
        _count += to_add;
134
9.83k
        _remain_element_capacity -= to_add;
135
9.83k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
9.83k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
9.83k
        memcpy(&_data[orig_size], vals, to_add_size);
158
9.83k
        return Status::OK();
159
9.83k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
121k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
121k
        DCHECK(!_finished);
110
121k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
121k
        uint32_t to_add = cast_set<UInt32>(
126
121k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
121k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
121k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
121k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
121k
        _count += to_add;
134
121k
        _remain_element_capacity -= to_add;
135
121k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
121k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
121k
        memcpy(&_data[orig_size], vals, to_add_size);
158
121k
        return Status::OK();
159
121k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
10.1k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
10.1k
        DCHECK(!_finished);
110
10.1k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
10.1k
        uint32_t to_add = cast_set<UInt32>(
126
10.1k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
10.1k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
10.1k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
10.1k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
10.1k
        _count += to_add;
134
10.1k
        _remain_element_capacity -= to_add;
135
10.1k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
10.1k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
10.1k
        memcpy(&_data[orig_size], vals, to_add_size);
158
10.1k
        return Status::OK();
159
10.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
67.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
67.3k
        DCHECK(!_finished);
110
67.3k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
67.3k
        uint32_t to_add = cast_set<UInt32>(
126
67.3k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
67.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
67.3k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
67.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
67.3k
        _count += to_add;
134
67.3k
        _remain_element_capacity -= to_add;
135
67.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
67.3k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
67.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
67.3k
        return Status::OK();
159
67.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
12.2k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
12.2k
        DCHECK(!_finished);
110
12.2k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
12.2k
        uint32_t to_add = cast_set<UInt32>(
126
12.2k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
12.2k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
12.2k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
12.2k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
12.2k
        _count += to_add;
134
12.2k
        _remain_element_capacity -= to_add;
135
12.2k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
12.2k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
12.2k
        memcpy(&_data[orig_size], vals, to_add_size);
158
12.2k
        return Status::OK();
159
12.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
16.8k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
16.8k
        DCHECK(!_finished);
110
16.8k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
16.8k
        uint32_t to_add = cast_set<UInt32>(
126
16.8k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
16.8k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
16.8k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
16.8k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
16.8k
        _count += to_add;
134
16.8k
        _remain_element_capacity -= to_add;
135
16.8k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
16.8k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
16.8k
        memcpy(&_data[orig_size], vals, to_add_size);
158
16.8k
        return Status::OK();
159
16.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
685
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
685
        DCHECK(!_finished);
110
685
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
685
        uint32_t to_add = cast_set<UInt32>(
126
685
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
685
        int to_add_size = to_add * SIZE_OF_TYPE;
129
685
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
685
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
685
        _count += to_add;
134
685
        _remain_element_capacity -= to_add;
135
685
        _raw_data_size += to_add_size;
136
        // return added number through count
137
685
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
685
        memcpy(&_data[orig_size], vals, to_add_size);
158
685
        return Status::OK();
159
685
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
45.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
45.0k
        DCHECK(!_finished);
110
45.0k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
45.0k
        uint32_t to_add = cast_set<UInt32>(
126
45.0k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
45.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
45.0k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
45.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
45.0k
        _count += to_add;
134
45.0k
        _remain_element_capacity -= to_add;
135
45.0k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
45.0k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
45.0k
        memcpy(&_data[orig_size], vals, to_add_size);
158
45.0k
        return Status::OK();
159
45.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
42.2k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
42.2k
        DCHECK(!_finished);
110
42.2k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
42.2k
        uint32_t to_add = cast_set<UInt32>(
126
42.2k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
42.2k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
42.2k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
42.2k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
42.2k
        _count += to_add;
134
42.2k
        _remain_element_capacity -= to_add;
135
42.2k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
42.2k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
42.2k
        memcpy(&_data[orig_size], vals, to_add_size);
158
42.2k
        return Status::OK();
159
42.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
513
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
513
        DCHECK(!_finished);
110
513
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
513
        uint32_t to_add = cast_set<UInt32>(
126
513
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
513
        int to_add_size = to_add * SIZE_OF_TYPE;
129
513
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
513
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
513
        _count += to_add;
134
513
        _remain_element_capacity -= to_add;
135
513
        _raw_data_size += to_add_size;
136
        // return added number through count
137
513
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
513
        memcpy(&_data[orig_size], vals, to_add_size);
158
513
        return Status::OK();
159
513
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
7.67k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
7.67k
        DCHECK(!_finished);
110
7.67k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
7.67k
        uint32_t to_add = cast_set<UInt32>(
126
7.67k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
7.67k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
7.67k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
7.67k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
7.67k
        _count += to_add;
134
7.67k
        _remain_element_capacity -= to_add;
135
7.67k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
7.67k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
7.67k
        memcpy(&_data[orig_size], vals, to_add_size);
158
7.67k
        return Status::OK();
159
7.67k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
255
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
255
        DCHECK(!_finished);
110
255
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
255
        uint32_t to_add = cast_set<UInt32>(
126
255
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
255
        int to_add_size = to_add * SIZE_OF_TYPE;
129
255
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
255
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
255
        _count += to_add;
134
255
        _remain_element_capacity -= to_add;
135
255
        _raw_data_size += to_add_size;
136
        // return added number through count
137
255
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
255
        memcpy(&_data[orig_size], vals, to_add_size);
158
255
        return Status::OK();
159
255
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
5.16k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.16k
        DCHECK(!_finished);
110
5.16k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
5.16k
        uint32_t to_add = cast_set<UInt32>(
126
5.16k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
5.16k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.16k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
5.16k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.16k
        _count += to_add;
134
5.16k
        _remain_element_capacity -= to_add;
135
5.16k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.16k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
5.16k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.16k
        return Status::OK();
159
5.16k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
25.5k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
25.5k
        DCHECK(!_finished);
110
25.5k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
25.5k
        uint32_t to_add = cast_set<UInt32>(
126
25.5k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
25.5k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
25.5k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
25.5k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
25.5k
        _count += to_add;
134
25.5k
        _remain_element_capacity -= to_add;
135
25.5k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
25.5k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
25.5k
        memcpy(&_data[orig_size], vals, to_add_size);
158
25.5k
        return Status::OK();
159
25.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
17.8k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
17.8k
        DCHECK(!_finished);
110
17.8k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
17.8k
        uint32_t to_add = cast_set<UInt32>(
126
17.8k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
17.8k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
17.8k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
17.8k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
17.8k
        _count += to_add;
134
17.8k
        _remain_element_capacity -= to_add;
135
17.8k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
17.8k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
17.8k
        memcpy(&_data[orig_size], vals, to_add_size);
158
17.8k
        return Status::OK();
159
17.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
1.39k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
1.39k
        DCHECK(!_finished);
110
1.39k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
1.39k
        uint32_t to_add = cast_set<UInt32>(
126
1.39k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
1.39k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
1.39k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
1.39k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
1.39k
        _count += to_add;
134
1.39k
        _remain_element_capacity -= to_add;
135
1.39k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
1.39k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
1.39k
        memcpy(&_data[orig_size], vals, to_add_size);
158
1.39k
        return Status::OK();
159
1.39k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
630
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
630
        DCHECK(!_finished);
110
630
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
630
        uint32_t to_add = cast_set<UInt32>(
126
630
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
630
        int to_add_size = to_add * SIZE_OF_TYPE;
129
630
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
630
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
630
        _count += to_add;
134
630
        _remain_element_capacity -= to_add;
135
630
        _raw_data_size += to_add_size;
136
        // return added number through count
137
630
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
630
        memcpy(&_data[orig_size], vals, to_add_size);
158
630
        return Status::OK();
159
630
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
643
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
643
        DCHECK(!_finished);
110
643
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
643
        uint32_t to_add = cast_set<UInt32>(
126
643
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
643
        int to_add_size = to_add * SIZE_OF_TYPE;
129
643
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
643
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
643
        _count += to_add;
134
643
        _remain_element_capacity -= to_add;
135
643
        _raw_data_size += to_add_size;
136
        // return added number through count
137
643
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
643
        memcpy(&_data[orig_size], vals, to_add_size);
158
643
        return Status::OK();
159
643
    }
160
161
621k
    Status finish(OwnedSlice* slice) override {
162
621k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
621k
        return Status::OK();
164
621k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
306k
    Status finish(OwnedSlice* slice) override {
162
306k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
306k
        return Status::OK();
164
306k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
34.2k
    Status finish(OwnedSlice* slice) override {
162
34.2k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
34.2k
        return Status::OK();
164
34.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7.05k
    Status finish(OwnedSlice* slice) override {
162
7.05k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.05k
        return Status::OK();
164
7.05k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
33.4k
    Status finish(OwnedSlice* slice) override {
162
33.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
33.4k
        return Status::OK();
164
33.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
10.2k
    Status finish(OwnedSlice* slice) override {
162
10.2k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
10.2k
        return Status::OK();
164
10.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
67.2k
    Status finish(OwnedSlice* slice) override {
162
67.2k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
67.2k
        return Status::OK();
164
67.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
11.6k
    Status finish(OwnedSlice* slice) override {
162
11.6k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
11.6k
        return Status::OK();
164
11.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
14.7k
    Status finish(OwnedSlice* slice) override {
162
14.7k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
14.7k
        return Status::OK();
164
14.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
699
    Status finish(OwnedSlice* slice) override {
162
699
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
699
        return Status::OK();
164
699
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
37.9k
    Status finish(OwnedSlice* slice) override {
162
37.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
37.9k
        return Status::OK();
164
37.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
41.5k
    Status finish(OwnedSlice* slice) override {
162
41.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
41.5k
        return Status::OK();
164
41.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
603
    Status finish(OwnedSlice* slice) override {
162
603
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
603
        return Status::OK();
164
603
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7.76k
    Status finish(OwnedSlice* slice) override {
162
7.76k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.76k
        return Status::OK();
164
7.76k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
257
    Status finish(OwnedSlice* slice) override {
162
257
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
257
        return Status::OK();
164
257
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
9.71k
    Status finish(OwnedSlice* slice) override {
162
9.71k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
9.72k
        return Status::OK();
164
9.71k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
19.0k
    Status finish(OwnedSlice* slice) override {
162
19.0k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
19.0k
        return Status::OK();
164
19.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
17.0k
    Status finish(OwnedSlice* slice) override {
162
17.0k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
17.0k
        return Status::OK();
164
17.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
1.12k
    Status finish(OwnedSlice* slice) override {
162
1.12k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
1.12k
        return Status::OK();
164
1.12k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
636
    Status finish(OwnedSlice* slice) override {
162
636
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
636
        return Status::OK();
164
636
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
633
    Status finish(OwnedSlice* slice) override {
162
633
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
633
        return Status::OK();
164
633
    }
165
166
1.51M
    Status reset() override {
167
1.51M
        RETURN_IF_CATCH_EXCEPTION({
168
1.51M
            size_t block_size = _options.data_page_size;
169
1.51M
            _count = 0;
170
1.51M
            _raw_data_size = 0;
171
1.51M
            _data.clear();
172
1.51M
            _data.reserve(block_size);
173
1.51M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.51M
                    << "buffer must be naturally-aligned";
175
1.51M
            _buffer.clear();
176
1.51M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.51M
            _finished = false;
178
1.51M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.51M
        });
180
1.51M
        return Status::OK();
181
1.51M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
166
888k
    Status reset() override {
167
888k
        RETURN_IF_CATCH_EXCEPTION({
168
888k
            size_t block_size = _options.data_page_size;
169
888k
            _count = 0;
170
888k
            _raw_data_size = 0;
171
888k
            _data.clear();
172
888k
            _data.reserve(block_size);
173
888k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
888k
                    << "buffer must be naturally-aligned";
175
888k
            _buffer.clear();
176
888k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
888k
            _finished = false;
178
888k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
888k
        });
180
890k
        return Status::OK();
181
888k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
69.5k
    Status reset() override {
167
69.5k
        RETURN_IF_CATCH_EXCEPTION({
168
69.5k
            size_t block_size = _options.data_page_size;
169
69.5k
            _count = 0;
170
69.5k
            _raw_data_size = 0;
171
69.5k
            _data.clear();
172
69.5k
            _data.reserve(block_size);
173
69.5k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
69.5k
                    << "buffer must be naturally-aligned";
175
69.5k
            _buffer.clear();
176
69.5k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
69.5k
            _finished = false;
178
69.5k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
69.5k
        });
180
69.5k
        return Status::OK();
181
69.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
166
14.5k
    Status reset() override {
167
14.5k
        RETURN_IF_CATCH_EXCEPTION({
168
14.5k
            size_t block_size = _options.data_page_size;
169
14.5k
            _count = 0;
170
14.5k
            _raw_data_size = 0;
171
14.5k
            _data.clear();
172
14.5k
            _data.reserve(block_size);
173
14.5k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
14.5k
                    << "buffer must be naturally-aligned";
175
14.5k
            _buffer.clear();
176
14.5k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
14.5k
            _finished = false;
178
14.5k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
14.5k
        });
180
14.5k
        return Status::OK();
181
14.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
64.4k
    Status reset() override {
167
64.4k
        RETURN_IF_CATCH_EXCEPTION({
168
64.4k
            size_t block_size = _options.data_page_size;
169
64.4k
            _count = 0;
170
64.4k
            _raw_data_size = 0;
171
64.4k
            _data.clear();
172
64.4k
            _data.reserve(block_size);
173
64.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
64.4k
                    << "buffer must be naturally-aligned";
175
64.4k
            _buffer.clear();
176
64.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
64.4k
            _finished = false;
178
64.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
64.4k
        });
180
64.7k
        return Status::OK();
181
64.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
166
20.6k
    Status reset() override {
167
20.6k
        RETURN_IF_CATCH_EXCEPTION({
168
20.6k
            size_t block_size = _options.data_page_size;
169
20.6k
            _count = 0;
170
20.6k
            _raw_data_size = 0;
171
20.6k
            _data.clear();
172
20.6k
            _data.reserve(block_size);
173
20.6k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
20.6k
                    << "buffer must be naturally-aligned";
175
20.6k
            _buffer.clear();
176
20.6k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
20.6k
            _finished = false;
178
20.6k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
20.6k
        });
180
20.7k
        return Status::OK();
181
20.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
166
134k
    Status reset() override {
167
134k
        RETURN_IF_CATCH_EXCEPTION({
168
134k
            size_t block_size = _options.data_page_size;
169
134k
            _count = 0;
170
134k
            _raw_data_size = 0;
171
134k
            _data.clear();
172
134k
            _data.reserve(block_size);
173
134k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
134k
                    << "buffer must be naturally-aligned";
175
134k
            _buffer.clear();
176
134k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
134k
            _finished = false;
178
134k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
134k
        });
180
134k
        return Status::OK();
181
134k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
Line
Count
Source
166
1
    Status reset() override {
167
1
        RETURN_IF_CATCH_EXCEPTION({
168
1
            size_t block_size = _options.data_page_size;
169
1
            _count = 0;
170
1
            _raw_data_size = 0;
171
1
            _data.clear();
172
1
            _data.reserve(block_size);
173
1
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1
                    << "buffer must be naturally-aligned";
175
1
            _buffer.clear();
176
1
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1
            _finished = false;
178
1
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1
        });
180
1
        return Status::OK();
181
1
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
166
24.1k
    Status reset() override {
167
24.1k
        RETURN_IF_CATCH_EXCEPTION({
168
24.1k
            size_t block_size = _options.data_page_size;
169
24.1k
            _count = 0;
170
24.1k
            _raw_data_size = 0;
171
24.1k
            _data.clear();
172
24.1k
            _data.reserve(block_size);
173
24.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
24.1k
                    << "buffer must be naturally-aligned";
175
24.1k
            _buffer.clear();
176
24.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
24.1k
            _finished = false;
178
24.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
24.1k
        });
180
24.1k
        return Status::OK();
181
24.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
166
29.7k
    Status reset() override {
167
29.7k
        RETURN_IF_CATCH_EXCEPTION({
168
29.7k
            size_t block_size = _options.data_page_size;
169
29.7k
            _count = 0;
170
29.7k
            _raw_data_size = 0;
171
29.7k
            _data.clear();
172
29.7k
            _data.reserve(block_size);
173
29.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
29.7k
                    << "buffer must be naturally-aligned";
175
29.7k
            _buffer.clear();
176
29.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
29.7k
            _finished = false;
178
29.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
29.7k
        });
180
29.7k
        return Status::OK();
181
29.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
166
1.38k
    Status reset() override {
167
1.38k
        RETURN_IF_CATCH_EXCEPTION({
168
1.38k
            size_t block_size = _options.data_page_size;
169
1.38k
            _count = 0;
170
1.38k
            _raw_data_size = 0;
171
1.38k
            _data.clear();
172
1.38k
            _data.reserve(block_size);
173
1.38k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.38k
                    << "buffer must be naturally-aligned";
175
1.38k
            _buffer.clear();
176
1.38k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.38k
            _finished = false;
178
1.38k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.38k
        });
180
1.38k
        return Status::OK();
181
1.38k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
166
75.1k
    Status reset() override {
167
75.1k
        RETURN_IF_CATCH_EXCEPTION({
168
75.1k
            size_t block_size = _options.data_page_size;
169
75.1k
            _count = 0;
170
75.1k
            _raw_data_size = 0;
171
75.1k
            _data.clear();
172
75.1k
            _data.reserve(block_size);
173
75.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
75.1k
                    << "buffer must be naturally-aligned";
175
75.1k
            _buffer.clear();
176
75.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
75.1k
            _finished = false;
178
75.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
75.1k
        });
180
75.2k
        return Status::OK();
181
75.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
166
84.0k
    Status reset() override {
167
84.0k
        RETURN_IF_CATCH_EXCEPTION({
168
84.0k
            size_t block_size = _options.data_page_size;
169
84.0k
            _count = 0;
170
84.0k
            _raw_data_size = 0;
171
84.0k
            _data.clear();
172
84.0k
            _data.reserve(block_size);
173
84.0k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
84.0k
                    << "buffer must be naturally-aligned";
175
84.0k
            _buffer.clear();
176
84.0k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
84.0k
            _finished = false;
178
84.0k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
84.0k
        });
180
84.1k
        return Status::OK();
181
84.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
166
1.05k
    Status reset() override {
167
1.05k
        RETURN_IF_CATCH_EXCEPTION({
168
1.05k
            size_t block_size = _options.data_page_size;
169
1.05k
            _count = 0;
170
1.05k
            _raw_data_size = 0;
171
1.05k
            _data.clear();
172
1.05k
            _data.reserve(block_size);
173
1.05k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.05k
                    << "buffer must be naturally-aligned";
175
1.05k
            _buffer.clear();
176
1.05k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.05k
            _finished = false;
178
1.05k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.05k
        });
180
1.05k
        return Status::OK();
181
1.05k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
Line
Count
Source
166
15.3k
    Status reset() override {
167
15.3k
        RETURN_IF_CATCH_EXCEPTION({
168
15.3k
            size_t block_size = _options.data_page_size;
169
15.3k
            _count = 0;
170
15.3k
            _raw_data_size = 0;
171
15.3k
            _data.clear();
172
15.3k
            _data.reserve(block_size);
173
15.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
15.3k
                    << "buffer must be naturally-aligned";
175
15.3k
            _buffer.clear();
176
15.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
15.3k
            _finished = false;
178
15.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
15.3k
        });
180
15.5k
        return Status::OK();
181
15.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
166
608
    Status reset() override {
167
608
        RETURN_IF_CATCH_EXCEPTION({
168
608
            size_t block_size = _options.data_page_size;
169
608
            _count = 0;
170
608
            _raw_data_size = 0;
171
608
            _data.clear();
172
608
            _data.reserve(block_size);
173
608
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
608
                    << "buffer must be naturally-aligned";
175
608
            _buffer.clear();
176
608
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
608
            _finished = false;
178
608
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
608
        });
180
609
        return Status::OK();
181
608
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
166
19.4k
    Status reset() override {
167
19.4k
        RETURN_IF_CATCH_EXCEPTION({
168
19.4k
            size_t block_size = _options.data_page_size;
169
19.4k
            _count = 0;
170
19.4k
            _raw_data_size = 0;
171
19.4k
            _data.clear();
172
19.4k
            _data.reserve(block_size);
173
19.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
19.4k
                    << "buffer must be naturally-aligned";
175
19.4k
            _buffer.clear();
176
19.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
19.4k
            _finished = false;
178
19.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
19.4k
        });
180
19.4k
        return Status::OK();
181
19.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
31.0k
    Status reset() override {
167
31.0k
        RETURN_IF_CATCH_EXCEPTION({
168
31.0k
            size_t block_size = _options.data_page_size;
169
31.0k
            _count = 0;
170
31.0k
            _raw_data_size = 0;
171
31.0k
            _data.clear();
172
31.0k
            _data.reserve(block_size);
173
31.0k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
31.0k
                    << "buffer must be naturally-aligned";
175
31.0k
            _buffer.clear();
176
31.0k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
31.0k
            _finished = false;
178
31.0k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
31.0k
        });
180
31.0k
        return Status::OK();
181
31.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
166
33.9k
    Status reset() override {
167
33.9k
        RETURN_IF_CATCH_EXCEPTION({
168
33.9k
            size_t block_size = _options.data_page_size;
169
33.9k
            _count = 0;
170
33.9k
            _raw_data_size = 0;
171
33.9k
            _data.clear();
172
33.9k
            _data.reserve(block_size);
173
33.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
33.9k
                    << "buffer must be naturally-aligned";
175
33.9k
            _buffer.clear();
176
33.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
33.9k
            _finished = false;
178
33.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
33.9k
        });
180
33.9k
        return Status::OK();
181
33.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Line
Count
Source
166
2.35k
    Status reset() override {
167
2.35k
        RETURN_IF_CATCH_EXCEPTION({
168
2.35k
            size_t block_size = _options.data_page_size;
169
2.35k
            _count = 0;
170
2.35k
            _raw_data_size = 0;
171
2.35k
            _data.clear();
172
2.35k
            _data.reserve(block_size);
173
2.35k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
2.35k
                    << "buffer must be naturally-aligned";
175
2.35k
            _buffer.clear();
176
2.35k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
2.35k
            _finished = false;
178
2.35k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
2.35k
        });
180
2.35k
        return Status::OK();
181
2.35k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Line
Count
Source
166
1.36k
    Status reset() override {
167
1.36k
        RETURN_IF_CATCH_EXCEPTION({
168
1.36k
            size_t block_size = _options.data_page_size;
169
1.36k
            _count = 0;
170
1.36k
            _raw_data_size = 0;
171
1.36k
            _data.clear();
172
1.36k
            _data.reserve(block_size);
173
1.36k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.36k
                    << "buffer must be naturally-aligned";
175
1.36k
            _buffer.clear();
176
1.36k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.36k
            _finished = false;
178
1.36k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.36k
        });
180
1.36k
        return Status::OK();
181
1.36k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
166
1.36k
    Status reset() override {
167
1.36k
        RETURN_IF_CATCH_EXCEPTION({
168
1.36k
            size_t block_size = _options.data_page_size;
169
1.36k
            _count = 0;
170
1.36k
            _raw_data_size = 0;
171
1.36k
            _data.clear();
172
1.36k
            _data.reserve(block_size);
173
1.36k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.36k
                    << "buffer must be naturally-aligned";
175
1.36k
            _buffer.clear();
176
1.36k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.36k
            _finished = false;
178
1.36k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.36k
        });
180
1.36k
        return Status::OK();
181
1.36k
    }
182
183
4
    size_t count() const override { return _count; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
183
4
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5countEv
184
185
35.0k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
18.3k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
185
3.44k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
185
981
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
2.45k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
1.53k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
825
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
763
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
185
772
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4sizeEv
Line
Count
Source
185
56
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4sizeEv
Line
Count
Source
185
1.61k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
2.18k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4sizeEv
Line
Count
Source
185
63
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4sizeEv
Line
Count
Source
185
56
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4sizeEv
Line
Count
Source
185
52
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4sizeEv
Line
Count
Source
185
186
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
185
341
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
185
1.15k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4sizeEv
Line
Count
Source
185
54
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4sizeEv
Line
Count
Source
185
76
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4sizeEv
Line
Count
Source
185
60
    uint64_t size() const override { return _buffer.size(); }
186
187
373k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
57.6k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
34.2k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
7.05k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
33.4k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
187
10.2k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
67.2k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
187
11.6k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
14.7k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE17get_raw_data_sizeEv
Line
Count
Source
187
699
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
187
37.9k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
187
41.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
187
603
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
Line
Count
Source
187
7.76k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
187
257
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
187
9.72k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
19.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
187
17.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE17get_raw_data_sizeEv
Line
Count
Source
187
1.12k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Line
Count
Source
187
636
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
187
633
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
628k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
319k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
35.3k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
7.53k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
31.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
10.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
67.1k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
12.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
14.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
687
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
37.2k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
42.5k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
450
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
7.63k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
351
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.72k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
11.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
16.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1.22k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
731
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
728
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
192
193
621k
    OwnedSlice _finish(int final_size_of_type) {
194
621k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
621k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
621k
        int padding_elems = num_elems_after_padding - _count;
199
621k
        int padding_bytes = padding_elems * final_size_of_type;
200
17.2M
        for (int i = 0; i < padding_bytes; i++) {
201
16.6M
            _data.push_back(0);
202
16.6M
        }
203
204
        // reserve enough place for compression
205
621k
        _buffer.resize(
206
621k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
621k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
621k
        int64_t bytes =
210
621k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
621k
                                         num_elems_after_padding, final_size_of_type, 0);
212
621k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
621k
        encode_fixed32_le(&_buffer[0], _count);
222
621k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
621k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
621k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
621k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
621k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
621k
        return _buffer.build();
229
621k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
306k
    OwnedSlice _finish(int final_size_of_type) {
194
306k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
306k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
306k
        int padding_elems = num_elems_after_padding - _count;
199
306k
        int padding_bytes = padding_elems * final_size_of_type;
200
5.91M
        for (int i = 0; i < padding_bytes; i++) {
201
5.61M
            _data.push_back(0);
202
5.61M
        }
203
204
        // reserve enough place for compression
205
306k
        _buffer.resize(
206
306k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
306k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
306k
        int64_t bytes =
210
306k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
306k
                                         num_elems_after_padding, final_size_of_type, 0);
212
306k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
306k
        encode_fixed32_le(&_buffer[0], _count);
222
306k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
306k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
306k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
306k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
306k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
306k
        return _buffer.build();
229
306k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
34.2k
    OwnedSlice _finish(int final_size_of_type) {
194
34.2k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
34.2k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
34.2k
        int padding_elems = num_elems_after_padding - _count;
199
34.2k
        int padding_bytes = padding_elems * final_size_of_type;
200
207k
        for (int i = 0; i < padding_bytes; i++) {
201
172k
            _data.push_back(0);
202
172k
        }
203
204
        // reserve enough place for compression
205
34.2k
        _buffer.resize(
206
34.2k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
34.2k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
34.2k
        int64_t bytes =
210
34.2k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
34.2k
                                         num_elems_after_padding, final_size_of_type, 0);
212
34.2k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
34.2k
        encode_fixed32_le(&_buffer[0], _count);
222
34.2k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
34.2k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
34.2k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
34.2k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
34.2k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
34.2k
        return _buffer.build();
229
34.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
7.05k
    OwnedSlice _finish(int final_size_of_type) {
194
7.05k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.05k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.05k
        int padding_elems = num_elems_after_padding - _count;
199
7.05k
        int padding_bytes = padding_elems * final_size_of_type;
200
67.5k
        for (int i = 0; i < padding_bytes; i++) {
201
60.5k
            _data.push_back(0);
202
60.5k
        }
203
204
        // reserve enough place for compression
205
7.05k
        _buffer.resize(
206
7.05k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.05k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.05k
        int64_t bytes =
210
7.05k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.05k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.05k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
7.05k
        encode_fixed32_le(&_buffer[0], _count);
222
7.05k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.05k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.05k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.05k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.05k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.05k
        return _buffer.build();
229
7.05k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
33.4k
    OwnedSlice _finish(int final_size_of_type) {
194
33.4k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
33.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
33.4k
        int padding_elems = num_elems_after_padding - _count;
199
33.4k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.31M
        for (int i = 0; i < padding_bytes; i++) {
201
1.27M
            _data.push_back(0);
202
1.27M
        }
203
204
        // reserve enough place for compression
205
33.4k
        _buffer.resize(
206
33.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
33.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
33.4k
        int64_t bytes =
210
33.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
33.4k
                                         num_elems_after_padding, final_size_of_type, 0);
212
33.4k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
33.4k
        encode_fixed32_le(&_buffer[0], _count);
222
33.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
33.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
33.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
33.4k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
33.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
33.4k
        return _buffer.build();
229
33.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
10.2k
    OwnedSlice _finish(int final_size_of_type) {
194
10.2k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
10.2k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
10.2k
        int padding_elems = num_elems_after_padding - _count;
199
10.2k
        int padding_bytes = padding_elems * final_size_of_type;
200
637k
        for (int i = 0; i < padding_bytes; i++) {
201
627k
            _data.push_back(0);
202
627k
        }
203
204
        // reserve enough place for compression
205
10.2k
        _buffer.resize(
206
10.2k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
10.2k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
10.2k
        int64_t bytes =
210
10.2k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
10.2k
                                         num_elems_after_padding, final_size_of_type, 0);
212
10.2k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
10.2k
        encode_fixed32_le(&_buffer[0], _count);
222
10.2k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
10.2k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
10.2k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
10.2k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
10.2k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
10.2k
        return _buffer.build();
229
10.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
67.2k
    OwnedSlice _finish(int final_size_of_type) {
194
67.2k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
67.2k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
67.2k
        int padding_elems = num_elems_after_padding - _count;
199
67.2k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.27M
        for (int i = 0; i < padding_bytes; i++) {
201
3.20M
            _data.push_back(0);
202
3.20M
        }
203
204
        // reserve enough place for compression
205
67.2k
        _buffer.resize(
206
67.2k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
67.2k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
67.2k
        int64_t bytes =
210
67.2k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
67.2k
                                         num_elems_after_padding, final_size_of_type, 0);
212
67.2k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
67.2k
        encode_fixed32_le(&_buffer[0], _count);
222
67.2k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
67.2k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
67.2k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
67.2k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
67.2k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
67.2k
        return _buffer.build();
229
67.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
11.6k
    OwnedSlice _finish(int final_size_of_type) {
194
11.6k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
11.6k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
11.6k
        int padding_elems = num_elems_after_padding - _count;
199
11.6k
        int padding_bytes = padding_elems * final_size_of_type;
200
250k
        for (int i = 0; i < padding_bytes; i++) {
201
238k
            _data.push_back(0);
202
238k
        }
203
204
        // reserve enough place for compression
205
11.6k
        _buffer.resize(
206
11.6k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
11.6k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
11.6k
        int64_t bytes =
210
11.6k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
11.6k
                                         num_elems_after_padding, final_size_of_type, 0);
212
11.6k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
11.6k
        encode_fixed32_le(&_buffer[0], _count);
222
11.6k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
11.6k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
11.6k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
11.6k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
11.6k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
11.6k
        return _buffer.build();
229
11.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
14.7k
    OwnedSlice _finish(int final_size_of_type) {
194
14.7k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
14.7k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
14.7k
        int padding_elems = num_elems_after_padding - _count;
199
14.7k
        int padding_bytes = padding_elems * final_size_of_type;
200
606k
        for (int i = 0; i < padding_bytes; i++) {
201
592k
            _data.push_back(0);
202
592k
        }
203
204
        // reserve enough place for compression
205
14.7k
        _buffer.resize(
206
14.7k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
14.7k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
14.7k
        int64_t bytes =
210
14.7k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
14.7k
                                         num_elems_after_padding, final_size_of_type, 0);
212
14.7k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
14.7k
        encode_fixed32_le(&_buffer[0], _count);
222
14.7k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
14.7k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
14.7k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
14.7k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
14.7k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
14.7k
        return _buffer.build();
229
14.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
699
    OwnedSlice _finish(int final_size_of_type) {
194
699
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
699
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
699
        int padding_elems = num_elems_after_padding - _count;
199
699
        int padding_bytes = padding_elems * final_size_of_type;
200
12.2k
        for (int i = 0; i < padding_bytes; i++) {
201
11.5k
            _data.push_back(0);
202
11.5k
        }
203
204
        // reserve enough place for compression
205
699
        _buffer.resize(
206
699
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
699
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
699
        int64_t bytes =
210
699
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
699
                                         num_elems_after_padding, final_size_of_type, 0);
212
699
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
699
        encode_fixed32_le(&_buffer[0], _count);
222
699
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
699
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
699
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
699
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
699
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
699
        return _buffer.build();
229
699
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
193
37.9k
    OwnedSlice _finish(int final_size_of_type) {
194
37.9k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
37.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
37.9k
        int padding_elems = num_elems_after_padding - _count;
199
37.9k
        int padding_bytes = padding_elems * final_size_of_type;
200
798k
        for (int i = 0; i < padding_bytes; i++) {
201
760k
            _data.push_back(0);
202
760k
        }
203
204
        // reserve enough place for compression
205
37.9k
        _buffer.resize(
206
37.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
37.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
37.9k
        int64_t bytes =
210
37.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
37.9k
                                         num_elems_after_padding, final_size_of_type, 0);
212
37.9k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
37.9k
        encode_fixed32_le(&_buffer[0], _count);
222
37.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
37.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
37.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
37.9k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
37.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
37.9k
        return _buffer.build();
229
37.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
193
41.5k
    OwnedSlice _finish(int final_size_of_type) {
194
41.5k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
41.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
41.5k
        int padding_elems = num_elems_after_padding - _count;
199
41.5k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.73M
        for (int i = 0; i < padding_bytes; i++) {
201
1.69M
            _data.push_back(0);
202
1.69M
        }
203
204
        // reserve enough place for compression
205
41.5k
        _buffer.resize(
206
41.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
41.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
41.5k
        int64_t bytes =
210
41.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
41.5k
                                         num_elems_after_padding, final_size_of_type, 0);
212
41.5k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
41.5k
        encode_fixed32_le(&_buffer[0], _count);
222
41.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
41.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
41.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
41.5k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
41.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
41.5k
        return _buffer.build();
229
41.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
193
603
    OwnedSlice _finish(int final_size_of_type) {
194
603
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
603
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
603
        int padding_elems = num_elems_after_padding - _count;
199
603
        int padding_bytes = padding_elems * final_size_of_type;
200
13.9k
        for (int i = 0; i < padding_bytes; i++) {
201
13.3k
            _data.push_back(0);
202
13.3k
        }
203
204
        // reserve enough place for compression
205
603
        _buffer.resize(
206
603
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
603
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
603
        int64_t bytes =
210
603
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
603
                                         num_elems_after_padding, final_size_of_type, 0);
212
603
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
603
        encode_fixed32_le(&_buffer[0], _count);
222
603
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
603
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
603
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
603
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
603
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
603
        return _buffer.build();
229
603
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
Line
Count
Source
193
7.76k
    OwnedSlice _finish(int final_size_of_type) {
194
7.76k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.76k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.76k
        int padding_elems = num_elems_after_padding - _count;
199
7.76k
        int padding_bytes = padding_elems * final_size_of_type;
200
404k
        for (int i = 0; i < padding_bytes; i++) {
201
397k
            _data.push_back(0);
202
397k
        }
203
204
        // reserve enough place for compression
205
7.76k
        _buffer.resize(
206
7.76k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.76k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.76k
        int64_t bytes =
210
7.76k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.76k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.76k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
7.76k
        encode_fixed32_le(&_buffer[0], _count);
222
7.76k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.76k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.76k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.76k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.76k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.76k
        return _buffer.build();
229
7.76k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
193
257
    OwnedSlice _finish(int final_size_of_type) {
194
257
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
257
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
257
        int padding_elems = num_elems_after_padding - _count;
199
257
        int padding_bytes = padding_elems * final_size_of_type;
200
15.7k
        for (int i = 0; i < padding_bytes; i++) {
201
15.4k
            _data.push_back(0);
202
15.4k
        }
203
204
        // reserve enough place for compression
205
257
        _buffer.resize(
206
257
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
257
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
257
        int64_t bytes =
210
257
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
257
                                         num_elems_after_padding, final_size_of_type, 0);
212
257
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
257
        encode_fixed32_le(&_buffer[0], _count);
222
257
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
257
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
257
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
257
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
257
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
257
        return _buffer.build();
229
257
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
193
9.72k
    OwnedSlice _finish(int final_size_of_type) {
194
9.72k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
9.72k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
9.72k
        int padding_elems = num_elems_after_padding - _count;
199
9.72k
        int padding_bytes = padding_elems * final_size_of_type;
200
117k
        for (int i = 0; i < padding_bytes; i++) {
201
107k
            _data.push_back(0);
202
107k
        }
203
204
        // reserve enough place for compression
205
9.72k
        _buffer.resize(
206
9.72k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
9.72k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
9.72k
        int64_t bytes =
210
9.72k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
9.72k
                                         num_elems_after_padding, final_size_of_type, 0);
212
9.72k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
9.72k
        encode_fixed32_le(&_buffer[0], _count);
222
9.72k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
9.72k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
9.72k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
9.72k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
9.72k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
9.72k
        return _buffer.build();
229
9.72k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
19.0k
    OwnedSlice _finish(int final_size_of_type) {
194
19.0k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
19.0k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
19.0k
        int padding_elems = num_elems_after_padding - _count;
199
19.0k
        int padding_bytes = padding_elems * final_size_of_type;
200
485k
        for (int i = 0; i < padding_bytes; i++) {
201
466k
            _data.push_back(0);
202
466k
        }
203
204
        // reserve enough place for compression
205
19.0k
        _buffer.resize(
206
19.0k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
19.0k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
19.0k
        int64_t bytes =
210
19.0k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
19.0k
                                         num_elems_after_padding, final_size_of_type, 0);
212
19.0k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
19.0k
        encode_fixed32_le(&_buffer[0], _count);
222
19.0k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
19.0k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
19.0k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
19.0k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
19.0k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
19.0k
        return _buffer.build();
229
19.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
193
17.0k
    OwnedSlice _finish(int final_size_of_type) {
194
17.0k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
17.0k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
17.0k
        int padding_elems = num_elems_after_padding - _count;
199
17.0k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.14M
        for (int i = 0; i < padding_bytes; i++) {
201
1.12M
            _data.push_back(0);
202
1.12M
        }
203
204
        // reserve enough place for compression
205
17.0k
        _buffer.resize(
206
17.0k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
17.0k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
17.0k
        int64_t bytes =
210
17.0k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
17.0k
                                         num_elems_after_padding, final_size_of_type, 0);
212
17.0k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
17.0k
        encode_fixed32_le(&_buffer[0], _count);
222
17.0k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
17.0k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
17.0k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
17.0k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
17.0k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
17.0k
        return _buffer.build();
229
17.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE7_finishEi
Line
Count
Source
193
1.12k
    OwnedSlice _finish(int final_size_of_type) {
194
1.12k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
1.12k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
1.12k
        int padding_elems = num_elems_after_padding - _count;
199
1.12k
        int padding_bytes = padding_elems * final_size_of_type;
200
175k
        for (int i = 0; i < padding_bytes; i++) {
201
174k
            _data.push_back(0);
202
174k
        }
203
204
        // reserve enough place for compression
205
1.12k
        _buffer.resize(
206
1.12k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
1.12k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
1.12k
        int64_t bytes =
210
1.12k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
1.12k
                                         num_elems_after_padding, final_size_of_type, 0);
212
1.12k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
1.12k
        encode_fixed32_le(&_buffer[0], _count);
222
1.12k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
1.12k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
1.12k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
1.12k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
1.12k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
1.12k
        return _buffer.build();
229
1.12k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Line
Count
Source
193
636
    OwnedSlice _finish(int final_size_of_type) {
194
636
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
636
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
636
        int padding_elems = num_elems_after_padding - _count;
199
636
        int padding_bytes = padding_elems * final_size_of_type;
200
13.0k
        for (int i = 0; i < padding_bytes; i++) {
201
12.4k
            _data.push_back(0);
202
12.4k
        }
203
204
        // reserve enough place for compression
205
636
        _buffer.resize(
206
636
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
636
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
636
        int64_t bytes =
210
636
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
636
                                         num_elems_after_padding, final_size_of_type, 0);
212
636
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
636
        encode_fixed32_le(&_buffer[0], _count);
222
636
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
636
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
636
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
636
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
636
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
636
        return _buffer.build();
229
636
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
193
633
    OwnedSlice _finish(int final_size_of_type) {
194
633
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
633
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
633
        int padding_elems = num_elems_after_padding - _count;
199
633
        int padding_bytes = padding_elems * final_size_of_type;
200
51.6k
        for (int i = 0; i < padding_bytes; i++) {
201
51.0k
            _data.push_back(0);
202
51.0k
        }
203
204
        // reserve enough place for compression
205
633
        _buffer.resize(
206
633
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
633
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
633
        int64_t bytes =
210
633
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
633
                                         num_elems_after_padding, final_size_of_type, 0);
212
633
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
633
        encode_fixed32_le(&_buffer[0], _count);
222
633
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
633
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
633
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
633
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
633
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
633
        return _buffer.build();
229
633
    }
230
231
    using CppType = typename TypeTraits<Type>::CppType;
232
233
    CppType cell(int idx) const {
234
        DCHECK_GE(idx, 0);
235
        CppType ret;
236
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
237
        return ret;
238
    }
239
240
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
241
    PageBuilderOptions _options;
242
    uint32_t _count;
243
    uint32_t _remain_element_capacity;
244
    bool _finished;
245
    faststring _data;
246
    faststring _buffer;
247
    uint64_t _raw_data_size = 0;
248
};
249
250
inline Status parse_bit_shuffle_header(const Slice& data, size_t& num_elements,
251
                                       size_t& compressed_size, size_t& num_element_after_padding,
252
1.60M
                                       int& size_of_element) {
253
1.60M
    if (data.size < BITSHUFFLE_PAGE_HEADER_SIZE) {
254
0
        return Status::InternalError("file corruption: invalid data size:{}, header size:{}",
255
0
                                     data.size, BITSHUFFLE_PAGE_HEADER_SIZE);
256
0
    }
257
258
1.60M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
1.60M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
1.60M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
1.60M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
1.60M
    if (num_element_after_padding != ALIGN_UP(num_elements, 8)) {
263
0
        return Status::InternalError(
264
0
                "num of element information corrupted,"
265
0
                " _num_element_after_padding:{}, _num_elements:{}, expected_padding:{},"
266
0
                " compressed_size:{}, size_of_element:{}, data_size:{}",
267
0
                num_element_after_padding, num_elements, ALIGN_UP(num_elements, 8), compressed_size,
268
0
                size_of_element, data.size);
269
0
    }
270
1.60M
    switch (size_of_element) {
271
100k
    case 1:
272
121k
    case 2:
273
123k
    case 3:
274
1.07M
    case 4:
275
1.53M
    case 8:
276
1.53M
    case 12:
277
1.60M
    case 16:
278
1.60M
    case 32:
279
1.60M
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
1.60M
    }
283
1.60M
    return Status::OK();
284
1.60M
}
285
286
template <FieldType Type>
287
class BitShufflePageDecoder : public PageDecoder {
288
public:
289
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
290
1.01M
            : _data(data),
291
1.01M
              _options(options),
292
1.01M
              _parsed(false),
293
1.01M
              _num_elements(0),
294
1.01M
              _num_element_after_padding(0),
295
1.01M
              _size_of_element(0),
296
1.01M
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
496k
            : _data(data),
291
496k
              _options(options),
292
496k
              _parsed(false),
293
496k
              _num_elements(0),
294
496k
              _num_element_after_padding(0),
295
496k
              _size_of_element(0),
296
496k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
70.3k
            : _data(data),
291
70.3k
              _options(options),
292
70.3k
              _parsed(false),
293
70.3k
              _num_elements(0),
294
70.3k
              _num_element_after_padding(0),
295
70.3k
              _size_of_element(0),
296
70.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
15.0k
            : _data(data),
291
15.0k
              _options(options),
292
15.0k
              _parsed(false),
293
15.0k
              _num_elements(0),
294
15.0k
              _num_element_after_padding(0),
295
15.0k
              _size_of_element(0),
296
15.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
41.3k
            : _data(data),
291
41.3k
              _options(options),
292
41.3k
              _parsed(false),
293
41.3k
              _num_elements(0),
294
41.3k
              _num_element_after_padding(0),
295
41.3k
              _size_of_element(0),
296
41.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
13.2k
            : _data(data),
291
13.2k
              _options(options),
292
13.2k
              _parsed(false),
293
13.2k
              _num_elements(0),
294
13.2k
              _num_element_after_padding(0),
295
13.2k
              _size_of_element(0),
296
13.2k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
93.6k
            : _data(data),
291
93.6k
              _options(options),
292
93.6k
              _parsed(false),
293
93.6k
              _num_elements(0),
294
93.6k
              _num_element_after_padding(0),
295
93.6k
              _size_of_element(0),
296
93.6k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
19.8k
            : _data(data),
291
19.8k
              _options(options),
292
19.8k
              _parsed(false),
293
19.8k
              _num_elements(0),
294
19.8k
              _num_element_after_padding(0),
295
19.8k
              _size_of_element(0),
296
19.8k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
28.3k
            : _data(data),
291
28.3k
              _options(options),
292
28.3k
              _parsed(false),
293
28.3k
              _num_elements(0),
294
28.3k
              _num_element_after_padding(0),
295
28.3k
              _size_of_element(0),
296
28.3k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.94k
            : _data(data),
291
1.94k
              _options(options),
292
1.94k
              _parsed(false),
293
1.94k
              _num_elements(0),
294
1.94k
              _num_element_after_padding(0),
295
1.94k
              _size_of_element(0),
296
1.94k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
59.6k
            : _data(data),
291
59.6k
              _options(options),
292
59.6k
              _parsed(false),
293
59.6k
              _num_elements(0),
294
59.6k
              _num_element_after_padding(0),
295
59.6k
              _size_of_element(0),
296
59.6k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
65.5k
            : _data(data),
291
65.5k
              _options(options),
292
65.5k
              _parsed(false),
293
65.5k
              _num_elements(0),
294
65.5k
              _num_element_after_padding(0),
295
65.5k
              _size_of_element(0),
296
65.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
2.34k
            : _data(data),
291
2.34k
              _options(options),
292
2.34k
              _parsed(false),
293
2.34k
              _num_elements(0),
294
2.34k
              _num_element_after_padding(0),
295
2.34k
              _size_of_element(0),
296
2.34k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
15.9k
            : _data(data),
291
15.9k
              _options(options),
292
15.9k
              _parsed(false),
293
15.9k
              _num_elements(0),
294
15.9k
              _num_element_after_padding(0),
295
15.9k
              _size_of_element(0),
296
15.9k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.37k
            : _data(data),
291
1.37k
              _options(options),
292
1.37k
              _parsed(false),
293
1.37k
              _num_elements(0),
294
1.37k
              _num_element_after_padding(0),
295
1.37k
              _size_of_element(0),
296
1.37k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
15.5k
            : _data(data),
291
15.5k
              _options(options),
292
15.5k
              _parsed(false),
293
15.5k
              _num_elements(0),
294
15.5k
              _num_element_after_padding(0),
295
15.5k
              _size_of_element(0),
296
15.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
40.7k
            : _data(data),
291
40.7k
              _options(options),
292
40.7k
              _parsed(false),
293
40.7k
              _num_elements(0),
294
40.7k
              _num_element_after_padding(0),
295
40.7k
              _size_of_element(0),
296
40.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
29.9k
            : _data(data),
291
29.9k
              _options(options),
292
29.9k
              _parsed(false),
293
29.9k
              _num_elements(0),
294
29.9k
              _num_element_after_padding(0),
295
29.9k
              _size_of_element(0),
296
29.9k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.74k
            : _data(data),
291
1.74k
              _options(options),
292
1.74k
              _parsed(false),
293
1.74k
              _num_elements(0),
294
1.74k
              _num_element_after_padding(0),
295
1.74k
              _size_of_element(0),
296
1.74k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
947
            : _data(data),
291
947
              _options(options),
292
947
              _parsed(false),
293
947
              _num_elements(0),
294
947
              _num_element_after_padding(0),
295
947
              _size_of_element(0),
296
947
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
983
            : _data(data),
291
983
              _options(options),
292
983
              _parsed(false),
293
983
              _num_elements(0),
294
983
              _num_element_after_padding(0),
295
983
              _size_of_element(0),
296
983
              _cur_index(0) {}
297
298
1.01M
    Status init() override {
299
1.01M
        CHECK(!_parsed);
300
1.01M
        size_t unused;
301
1.01M
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.01M
                                                 _num_element_after_padding, _size_of_element));
303
304
1.01M
        if (_data.size !=
305
1.01M
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.01M
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.01M
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.01M
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.01M
        _parsed = true;
325
1.01M
        return Status::OK();
326
1.01M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
298
496k
    Status init() override {
299
496k
        CHECK(!_parsed);
300
496k
        size_t unused;
301
496k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
496k
                                                 _num_element_after_padding, _size_of_element));
303
304
496k
        if (_data.size !=
305
496k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
496k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
496k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
496k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
496k
        _parsed = true;
325
496k
        return Status::OK();
326
496k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
70.3k
    Status init() override {
299
70.3k
        CHECK(!_parsed);
300
70.3k
        size_t unused;
301
70.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
70.3k
                                                 _num_element_after_padding, _size_of_element));
303
304
70.3k
        if (_data.size !=
305
70.3k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
70.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
70.3k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
70.3k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
70.3k
        _parsed = true;
325
70.3k
        return Status::OK();
326
70.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
15.0k
    Status init() override {
299
15.0k
        CHECK(!_parsed);
300
15.0k
        size_t unused;
301
15.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
15.0k
                                                 _num_element_after_padding, _size_of_element));
303
304
15.0k
        if (_data.size !=
305
15.0k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
15.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
15.0k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
15.0k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
15.0k
        _parsed = true;
325
15.0k
        return Status::OK();
326
15.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
41.3k
    Status init() override {
299
41.3k
        CHECK(!_parsed);
300
41.3k
        size_t unused;
301
41.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
41.3k
                                                 _num_element_after_padding, _size_of_element));
303
304
41.3k
        if (_data.size !=
305
41.3k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
41.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
41.3k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
41.3k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
41.3k
        _parsed = true;
325
41.3k
        return Status::OK();
326
41.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
298
13.2k
    Status init() override {
299
13.2k
        CHECK(!_parsed);
300
13.2k
        size_t unused;
301
13.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
13.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
13.2k
        if (_data.size !=
305
13.2k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
13.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
13.2k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
13.2k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
13.2k
        _parsed = true;
325
13.2k
        return Status::OK();
326
13.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
298
93.6k
    Status init() override {
299
93.6k
        CHECK(!_parsed);
300
93.6k
        size_t unused;
301
93.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
93.6k
                                                 _num_element_after_padding, _size_of_element));
303
304
93.6k
        if (_data.size !=
305
93.6k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
93.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
93.6k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
93.6k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
93.6k
        _parsed = true;
325
93.6k
        return Status::OK();
326
93.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
298
19.8k
    Status init() override {
299
19.8k
        CHECK(!_parsed);
300
19.8k
        size_t unused;
301
19.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
19.8k
                                                 _num_element_after_padding, _size_of_element));
303
304
19.8k
        if (_data.size !=
305
19.8k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
19.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
19.8k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
19.8k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
19.8k
        _parsed = true;
325
19.8k
        return Status::OK();
326
19.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
298
28.3k
    Status init() override {
299
28.3k
        CHECK(!_parsed);
300
28.3k
        size_t unused;
301
28.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
28.3k
                                                 _num_element_after_padding, _size_of_element));
303
304
28.3k
        if (_data.size !=
305
28.3k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
28.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
28.3k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
28.3k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
28.3k
        _parsed = true;
325
28.3k
        return Status::OK();
326
28.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
1.94k
    Status init() override {
299
1.94k
        CHECK(!_parsed);
300
1.94k
        size_t unused;
301
1.94k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.94k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.94k
        if (_data.size !=
305
1.94k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.94k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.94k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.94k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.94k
        _parsed = true;
325
1.94k
        return Status::OK();
326
1.94k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
59.6k
    Status init() override {
299
59.6k
        CHECK(!_parsed);
300
59.6k
        size_t unused;
301
59.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
59.6k
                                                 _num_element_after_padding, _size_of_element));
303
304
59.6k
        if (_data.size !=
305
59.6k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
59.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
59.6k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
59.6k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
59.6k
        _parsed = true;
325
59.6k
        return Status::OK();
326
59.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
298
65.5k
    Status init() override {
299
65.5k
        CHECK(!_parsed);
300
65.5k
        size_t unused;
301
65.5k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
65.5k
                                                 _num_element_after_padding, _size_of_element));
303
304
65.5k
        if (_data.size !=
305
65.5k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
65.5k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
65.5k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
65.5k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
65.5k
        _parsed = true;
325
65.5k
        return Status::OK();
326
65.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
298
2.34k
    Status init() override {
299
2.34k
        CHECK(!_parsed);
300
2.34k
        size_t unused;
301
2.34k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
2.34k
                                                 _num_element_after_padding, _size_of_element));
303
304
2.34k
        if (_data.size !=
305
2.34k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
2.34k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
2.34k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
2.34k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
2.34k
        _parsed = true;
325
2.34k
        return Status::OK();
326
2.34k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
298
15.8k
    Status init() override {
299
15.8k
        CHECK(!_parsed);
300
15.8k
        size_t unused;
301
15.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
15.8k
                                                 _num_element_after_padding, _size_of_element));
303
304
15.8k
        if (_data.size !=
305
15.8k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
15.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
15.8k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
15.8k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
15.8k
        _parsed = true;
325
15.8k
        return Status::OK();
326
15.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
298
1.37k
    Status init() override {
299
1.37k
        CHECK(!_parsed);
300
1.37k
        size_t unused;
301
1.37k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.37k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.37k
        if (_data.size !=
305
1.37k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.37k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.37k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.37k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.37k
        _parsed = true;
325
1.37k
        return Status::OK();
326
1.37k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
298
15.5k
    Status init() override {
299
15.5k
        CHECK(!_parsed);
300
15.5k
        size_t unused;
301
15.5k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
15.5k
                                                 _num_element_after_padding, _size_of_element));
303
304
15.5k
        if (_data.size !=
305
15.5k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
15.5k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
15.5k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
15.5k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
15.5k
        _parsed = true;
325
15.5k
        return Status::OK();
326
15.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
298
40.7k
    Status init() override {
299
40.7k
        CHECK(!_parsed);
300
40.7k
        size_t unused;
301
40.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
40.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
40.7k
        if (_data.size !=
305
40.7k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
40.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
40.7k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
40.7k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
40.7k
        _parsed = true;
325
40.7k
        return Status::OK();
326
40.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
298
29.9k
    Status init() override {
299
29.9k
        CHECK(!_parsed);
300
29.9k
        size_t unused;
301
29.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
29.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
29.9k
        if (_data.size !=
305
29.9k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
29.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
29.9k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
29.9k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
29.9k
        _parsed = true;
325
29.9k
        return Status::OK();
326
29.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
298
1.74k
    Status init() override {
299
1.74k
        CHECK(!_parsed);
300
1.74k
        size_t unused;
301
1.74k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.74k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.74k
        if (_data.size !=
305
1.74k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.74k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.74k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.74k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.74k
        _parsed = true;
325
1.74k
        return Status::OK();
326
1.74k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
298
947
    Status init() override {
299
947
        CHECK(!_parsed);
300
947
        size_t unused;
301
947
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
947
                                                 _num_element_after_padding, _size_of_element));
303
304
947
        if (_data.size !=
305
947
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
947
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
947
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
947
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
947
        _parsed = true;
325
947
        return Status::OK();
326
947
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
298
982
    Status init() override {
299
982
        CHECK(!_parsed);
300
982
        size_t unused;
301
982
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
982
                                                 _num_element_after_padding, _size_of_element));
303
304
982
        if (_data.size !=
305
982
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
982
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
982
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
982
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
982
        _parsed = true;
325
982
        return Status::OK();
326
982
    }
327
328
    // If the page only contains null, then _num_elements == 0, and the nullmap has
329
    // some value. But in _seek_columns --> seek_to_ordinal --> _seek_to_pos_in_page
330
    // in this call stack it will pass pos == 0 to this method. Although we can add some
331
    // code such as check if the count == 0, then skip seek, but there are other method such
332
    // as init will also call seek with pos == 0. And the seek is useless when _num_elements
333
    // == 0, because next batch will return empty in this method.
334
3.33M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
3.33M
        if (_num_elements == 0) [[unlikely]] {
337
4.77k
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
4.77k
        }
342
343
3.33M
        DCHECK_LE(pos, _num_elements);
344
3.33M
        _cur_index = pos;
345
3.33M
        return Status::OK();
346
3.33M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.61M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
1.61M
        if (_num_elements == 0) [[unlikely]] {
337
2.99k
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
2.99k
        }
342
343
1.61M
        DCHECK_LE(pos, _num_elements);
344
1.61M
        _cur_index = pos;
345
1.61M
        return Status::OK();
346
1.61M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
66.8k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
66.8k
        if (_num_elements == 0) [[unlikely]] {
337
355
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
355
        }
342
343
66.8k
        DCHECK_LE(pos, _num_elements);
344
66.8k
        _cur_index = pos;
345
66.8k
        return Status::OK();
346
66.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.09k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
1.09k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
1.09k
        DCHECK_LE(pos, _num_elements);
344
1.09k
        _cur_index = pos;
345
1.09k
        return Status::OK();
346
1.09k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
34.2k
    Status seek_to_position_in_page(size_t pos) override {
335
34.2k
        DCHECK(_parsed) << "Must call init()";
336
34.2k
        if (_num_elements == 0) [[unlikely]] {
337
802
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
802
        }
342
343
34.2k
        DCHECK_LE(pos, _num_elements);
344
34.2k
        _cur_index = pos;
345
34.2k
        return Status::OK();
346
34.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
334
4.00k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
4.00k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
4.00k
        DCHECK_LE(pos, _num_elements);
344
4.00k
        _cur_index = pos;
345
4.00k
        return Status::OK();
346
4.00k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
334
14.6k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
14.6k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
14.6k
        DCHECK_LE(pos, _num_elements);
344
14.6k
        _cur_index = pos;
345
14.6k
        return Status::OK();
346
14.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
229k
    Status seek_to_position_in_page(size_t pos) override {
335
229k
        DCHECK(_parsed) << "Must call init()";
336
229k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
229k
        DCHECK_LE(pos, _num_elements);
344
229k
        _cur_index = pos;
345
229k
        return Status::OK();
346
229k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
334
204k
    Status seek_to_position_in_page(size_t pos) override {
335
204k
        DCHECK(_parsed) << "Must call init()";
336
204k
        if (_num_elements == 0) [[unlikely]] {
337
1
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
1
        }
342
343
204k
        DCHECK_LE(pos, _num_elements);
344
204k
        _cur_index = pos;
345
204k
        return Status::OK();
346
204k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
334
215k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
215k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
215k
        DCHECK_LE(pos, _num_elements);
344
215k
        _cur_index = pos;
345
215k
        return Status::OK();
346
215k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
334
518k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
518k
        if (_num_elements == 0) [[unlikely]] {
337
197
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
197
        }
342
343
518k
        DCHECK_LE(pos, _num_elements);
344
518k
        _cur_index = pos;
345
518k
        return Status::OK();
346
518k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
334
72.6k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
72.6k
        if (_num_elements == 0) [[unlikely]] {
337
14
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
14
        }
342
343
72.6k
        DCHECK_LE(pos, _num_elements);
344
72.6k
        _cur_index = pos;
345
72.6k
        return Status::OK();
346
72.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
202k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
202k
        if (_num_elements == 0) [[unlikely]] {
337
16
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
16
        }
342
343
202k
        DCHECK_LE(pos, _num_elements);
344
202k
        _cur_index = pos;
345
202k
        return Status::OK();
346
202k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
334
6.84k
    Status seek_to_position_in_page(size_t pos) override {
335
6.84k
        DCHECK(_parsed) << "Must call init()";
336
6.84k
        if (_num_elements == 0) [[unlikely]] {
337
348
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
348
        }
342
343
6.84k
        DCHECK_LE(pos, _num_elements);
344
6.84k
        _cur_index = pos;
345
6.84k
        return Status::OK();
346
6.84k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
Line
Count
Source
334
29
    Status seek_to_position_in_page(size_t pos) override {
335
29
        DCHECK(_parsed) << "Must call init()";
336
29
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
29
        DCHECK_LE(pos, _num_elements);
344
29
        _cur_index = pos;
345
29
        return Status::OK();
346
29
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Line
Count
Source
334
890
    Status seek_to_position_in_page(size_t pos) override {
335
890
        DCHECK(_parsed) << "Must call init()";
336
890
        if (_num_elements == 0) [[unlikely]] {
337
26
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
26
        }
342
343
890
        DCHECK_LE(pos, _num_elements);
344
890
        _cur_index = pos;
345
890
        return Status::OK();
346
890
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
334
17.5k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
17.5k
        if (_num_elements == 0) [[unlikely]] {
337
12
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
12
        }
342
343
17.5k
        DCHECK_LE(pos, _num_elements);
344
17.5k
        _cur_index = pos;
345
17.5k
        return Status::OK();
346
17.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Line
Count
Source
334
122k
    Status seek_to_position_in_page(size_t pos) override {
335
122k
        DCHECK(_parsed) << "Must call init()";
336
122k
        if (_num_elements == 0) [[unlikely]] {
337
10
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
10
        }
342
343
122k
        DCHECK_LE(pos, _num_elements);
344
122k
        _cur_index = pos;
345
122k
        return Status::OK();
346
122k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.97k
    Status seek_to_position_in_page(size_t pos) override {
335
1.97k
        DCHECK(_parsed) << "Must call init()";
336
1.97k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
1.97k
        DCHECK_LE(pos, _num_elements);
344
1.97k
        _cur_index = pos;
345
1.97k
        return Status::OK();
346
1.97k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE24seek_to_position_in_pageEm
Line
Count
Source
334
25
    Status seek_to_position_in_page(size_t pos) override {
335
25
        DCHECK(_parsed) << "Must call init()";
336
25
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
25
        DCHECK_LE(pos, _num_elements);
344
25
        _cur_index = pos;
345
25
        return Status::OK();
346
25
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE24seek_to_position_in_pageEm
Line
Count
Source
334
30
    Status seek_to_position_in_page(size_t pos) override {
335
30
        DCHECK(_parsed) << "Must call init()";
336
30
        if (_num_elements == 0) [[unlikely]] {
337
1
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
1
        }
342
343
30
        DCHECK_LE(pos, _num_elements);
344
30
        _cur_index = pos;
345
30
        return Status::OK();
346
30
    }
347
348
0
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
349
0
        DCHECK(_parsed) << "Must call init() firstly";
350
351
0
        if (_num_elements == 0) {
352
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
353
0
        }
354
355
0
        size_t left = 0;
356
0
        size_t right = _num_elements;
357
358
0
        void* mid_value = nullptr;
359
360
        // find the first value >= target. after loop,
361
        // - left == index of first value >= target when found
362
        // - left == _num_elements when not found (all values < target)
363
0
        while (left < right) {
364
0
            size_t mid = left + (right - left) / 2;
365
0
            mid_value = get_data(mid);
366
0
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
367
0
                left = mid + 1;
368
0
            } else {
369
0
                right = mid;
370
0
            }
371
0
        }
372
0
        if (left >= _num_elements) {
373
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
374
0
        }
375
0
        void* find_value = get_data(left);
376
0
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
377
0
            *exact_match = true;
378
0
        } else {
379
0
            *exact_match = false;
380
0
        }
381
382
0
        _cur_index = left;
383
0
        return Status::OK();
384
0
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE22seek_at_or_after_valueEPKvPb
385
386
    template <bool forward_index = true>
387
1.70M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.70M
        DCHECK(_parsed);
389
1.70M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.70M
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.70M
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.70M
        *n = max_fetch;
398
1.70M
        if constexpr (forward_index) {
399
1.50M
            _cur_index += max_fetch;
400
1.50M
        }
401
402
1.70M
        return Status::OK();
403
1.70M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
526k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
526k
        DCHECK(_parsed);
389
526k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
526k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
526k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
526k
        *n = max_fetch;
398
526k
        if constexpr (forward_index) {
399
526k
            _cur_index += max_fetch;
400
526k
        }
401
402
526k
        return Status::OK();
403
526k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
162k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
162k
        DCHECK(_parsed);
389
162k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
162k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
162k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
162k
        *n = max_fetch;
398
162k
        if constexpr (forward_index) {
399
162k
            _cur_index += max_fetch;
400
162k
        }
401
402
162k
        return Status::OK();
403
162k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
11.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
11.7k
        DCHECK(_parsed);
389
11.7k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
11.7k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
11.7k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
11.7k
        *n = max_fetch;
398
11.7k
        if constexpr (forward_index) {
399
11.7k
            _cur_index += max_fetch;
400
11.7k
        }
401
402
11.7k
        return Status::OK();
403
11.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
51.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
51.8k
        DCHECK(_parsed);
389
51.8k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
51.8k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
51.8k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
51.8k
        *n = max_fetch;
398
51.8k
        if constexpr (forward_index) {
399
51.8k
            _cur_index += max_fetch;
400
51.8k
        }
401
402
51.8k
        return Status::OK();
403
51.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
12.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
12.2k
        DCHECK(_parsed);
389
12.2k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
12.2k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
12.2k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
12.2k
        *n = max_fetch;
398
12.2k
        if constexpr (forward_index) {
399
12.2k
            _cur_index += max_fetch;
400
12.2k
        }
401
402
12.2k
        return Status::OK();
403
12.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
153k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
153k
        DCHECK(_parsed);
389
153k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
153k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
153k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
153k
        *n = max_fetch;
398
153k
        if constexpr (forward_index) {
399
153k
            _cur_index += max_fetch;
400
153k
        }
401
402
153k
        return Status::OK();
403
153k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
205k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
205k
        DCHECK(_parsed);
389
205k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
205k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
205k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
205k
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
205k
        return Status::OK();
403
205k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
14.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
14.9k
        DCHECK(_parsed);
389
14.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
14.9k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
14.9k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
14.9k
        *n = max_fetch;
398
14.9k
        if constexpr (forward_index) {
399
14.9k
            _cur_index += max_fetch;
400
14.9k
        }
401
402
14.9k
        return Status::OK();
403
14.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
21.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
21.8k
        DCHECK(_parsed);
389
21.8k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
21.8k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
21.8k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
21.8k
        *n = max_fetch;
398
21.8k
        if constexpr (forward_index) {
399
21.8k
            _cur_index += max_fetch;
400
21.8k
        }
401
402
21.8k
        return Status::OK();
403
21.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.67k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.67k
        DCHECK(_parsed);
389
3.67k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.67k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.67k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.67k
        *n = max_fetch;
398
3.67k
        if constexpr (forward_index) {
399
3.67k
            _cur_index += max_fetch;
400
3.67k
        }
401
402
3.67k
        return Status::OK();
403
3.67k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
394k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
394k
        DCHECK(_parsed);
389
394k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
394k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
394k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
394k
        *n = max_fetch;
398
394k
        if constexpr (forward_index) {
399
394k
            _cur_index += max_fetch;
400
394k
        }
401
402
394k
        return Status::OK();
403
394k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
69.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
69.1k
        DCHECK(_parsed);
389
69.1k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
69.1k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
69.1k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
69.1k
        *n = max_fetch;
398
69.1k
        if constexpr (forward_index) {
399
69.1k
            _cur_index += max_fetch;
400
69.1k
        }
401
402
69.1k
        return Status::OK();
403
69.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
1.15k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.15k
        DCHECK(_parsed);
389
1.15k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.15k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.15k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.15k
        *n = max_fetch;
398
1.15k
        if constexpr (forward_index) {
399
1.15k
            _cur_index += max_fetch;
400
1.15k
        }
401
402
1.15k
        return Status::OK();
403
1.15k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
8.05k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
8.05k
        DCHECK(_parsed);
389
8.05k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
8.05k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
8.05k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
8.05k
        *n = max_fetch;
398
8.05k
        if constexpr (forward_index) {
399
8.05k
            _cur_index += max_fetch;
400
8.05k
        }
401
402
8.05k
        return Status::OK();
403
8.05k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
1.25k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.25k
        DCHECK(_parsed);
389
1.26k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.25k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.25k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.25k
        *n = max_fetch;
398
1.25k
        if constexpr (forward_index) {
399
1.25k
            _cur_index += max_fetch;
400
1.25k
        }
401
402
1.25k
        return Status::OK();
403
1.25k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
10.3k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
10.3k
        DCHECK(_parsed);
389
10.3k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
10.3k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
10.3k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
10.3k
        *n = max_fetch;
398
10.3k
        if constexpr (forward_index) {
399
10.3k
            _cur_index += max_fetch;
400
10.3k
        }
401
402
10.3k
        return Status::OK();
403
10.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
31.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
31.4k
        DCHECK(_parsed);
389
31.4k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
31.4k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
31.4k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
31.4k
        *n = max_fetch;
398
31.4k
        if constexpr (forward_index) {
399
31.4k
            _cur_index += max_fetch;
400
31.4k
        }
401
402
31.4k
        return Status::OK();
403
31.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
21.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
21.9k
        DCHECK(_parsed);
389
21.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
21.9k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
21.9k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
21.9k
        *n = max_fetch;
398
21.9k
        if constexpr (forward_index) {
399
21.9k
            _cur_index += max_fetch;
400
21.9k
        }
401
402
21.9k
        return Status::OK();
403
21.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.17k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.17k
        DCHECK(_parsed);
389
3.17k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.17k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.17k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.17k
        *n = max_fetch;
398
3.17k
        if constexpr (forward_index) {
399
3.17k
            _cur_index += max_fetch;
400
3.17k
        }
401
402
3.17k
        return Status::OK();
403
3.17k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
663
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
663
        DCHECK(_parsed);
389
663
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
663
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
663
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
663
        *n = max_fetch;
398
663
        if constexpr (forward_index) {
399
663
            _cur_index += max_fetch;
400
663
        }
401
402
663
        return Status::OK();
403
663
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
682
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
682
        DCHECK(_parsed);
389
683
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
682
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
682
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
682
        *n = max_fetch;
398
682
        if constexpr (forward_index) {
399
682
            _cur_index += max_fetch;
400
682
        }
401
402
682
        return Status::OK();
403
682
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
404
405
1.49M
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
523k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
162k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
11.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
51.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
12.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
153k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
14.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
21.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
3.66k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
394k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
69.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
1.15k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
8.05k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
1.25k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
10.3k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
31.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
21.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
3.17k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
663
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
682
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
406
407
    Status read_by_rowids(const rowid_t* rowids, ordinal_t page_first_ordinal, size_t* n,
408
325k
                          MutableColumnPtr& dst) override {
409
325k
        DCHECK(_parsed);
410
325k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
325k
        auto total = *n;
416
325k
        auto read_count = 0;
417
325k
        _buffer.resize(total);
418
114M
        for (size_t i = 0; i < total; ++i) {
419
114M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
114M
            if (UNLIKELY(ord >= _num_elements)) {
421
12.0k
                break;
422
12.0k
            }
423
424
114M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
114M
        }
426
427
325k
        if (LIKELY(read_count > 0)) {
428
325k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
325k
        }
430
431
325k
        *n = read_count;
432
325k
        return Status::OK();
433
325k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
84.2k
                          MutableColumnPtr& dst) override {
409
84.2k
        DCHECK(_parsed);
410
84.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
84.2k
        auto total = *n;
416
84.2k
        auto read_count = 0;
417
84.2k
        _buffer.resize(total);
418
42.0M
        for (size_t i = 0; i < total; ++i) {
419
42.0M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
42.0M
            if (UNLIKELY(ord >= _num_elements)) {
421
740
                break;
422
740
            }
423
424
42.0M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
42.0M
        }
426
427
84.3k
        if (LIKELY(read_count > 0)) {
428
84.3k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
84.3k
        }
430
431
84.2k
        *n = read_count;
432
84.2k
        return Status::OK();
433
84.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
23.3k
                          MutableColumnPtr& dst) override {
409
23.3k
        DCHECK(_parsed);
410
23.3k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
23.3k
        auto total = *n;
416
23.3k
        auto read_count = 0;
417
23.3k
        _buffer.resize(total);
418
741k
        for (size_t i = 0; i < total; ++i) {
419
718k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
718k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
718k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
718k
        }
426
427
23.3k
        if (LIKELY(read_count > 0)) {
428
23.3k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
23.3k
        }
430
431
23.3k
        *n = read_count;
432
23.3k
        return Status::OK();
433
23.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
6.21k
                          MutableColumnPtr& dst) override {
409
6.21k
        DCHECK(_parsed);
410
6.21k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
6.21k
        auto total = *n;
416
6.21k
        auto read_count = 0;
417
6.21k
        _buffer.resize(total);
418
73.2k
        for (size_t i = 0; i < total; ++i) {
419
67.0k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
67.0k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
67.0k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
67.0k
        }
426
427
6.22k
        if (LIKELY(read_count > 0)) {
428
6.22k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
6.22k
        }
430
431
6.21k
        *n = read_count;
432
6.21k
        return Status::OK();
433
6.21k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
26.3k
                          MutableColumnPtr& dst) override {
409
26.3k
        DCHECK(_parsed);
410
26.3k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
26.3k
        auto total = *n;
416
26.3k
        auto read_count = 0;
417
26.3k
        _buffer.resize(total);
418
13.1M
        for (size_t i = 0; i < total; ++i) {
419
13.1M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
13.1M
            if (UNLIKELY(ord >= _num_elements)) {
421
427
                break;
422
427
            }
423
424
13.1M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
13.1M
        }
426
427
26.3k
        if (LIKELY(read_count > 0)) {
428
26.3k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
26.3k
        }
430
431
26.3k
        *n = read_count;
432
26.3k
        return Status::OK();
433
26.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
5.80k
                          MutableColumnPtr& dst) override {
409
5.80k
        DCHECK(_parsed);
410
5.80k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
5.80k
        auto total = *n;
416
5.80k
        auto read_count = 0;
417
5.80k
        _buffer.resize(total);
418
13.0k
        for (size_t i = 0; i < total; ++i) {
419
7.21k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
7.21k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
7.21k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
7.21k
        }
426
427
5.81k
        if (LIKELY(read_count > 0)) {
428
5.81k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
5.81k
        }
430
431
5.80k
        *n = read_count;
432
5.80k
        return Status::OK();
433
5.80k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
32.9k
                          MutableColumnPtr& dst) override {
409
32.9k
        DCHECK(_parsed);
410
32.9k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
32.9k
        auto total = *n;
416
32.9k
        auto read_count = 0;
417
32.9k
        _buffer.resize(total);
418
5.52M
        for (size_t i = 0; i < total; ++i) {
419
5.49M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
5.49M
            if (UNLIKELY(ord >= _num_elements)) {
421
2.33k
                break;
422
2.33k
            }
423
424
5.49M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
5.49M
        }
426
427
32.9k
        if (LIKELY(read_count > 0)) {
428
32.9k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
32.9k
        }
430
431
32.9k
        *n = read_count;
432
32.9k
        return Status::OK();
433
32.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
9.61k
                          MutableColumnPtr& dst) override {
409
9.61k
        DCHECK(_parsed);
410
9.61k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
9.61k
        auto total = *n;
416
9.61k
        auto read_count = 0;
417
9.61k
        _buffer.resize(total);
418
1.21M
        for (size_t i = 0; i < total; ++i) {
419
1.20M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.20M
            if (UNLIKELY(ord >= _num_elements)) {
421
30
                break;
422
30
            }
423
424
1.20M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.20M
        }
426
427
9.61k
        if (LIKELY(read_count > 0)) {
428
9.61k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
9.61k
        }
430
431
9.61k
        *n = read_count;
432
9.61k
        return Status::OK();
433
9.61k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.4k
                          MutableColumnPtr& dst) override {
409
13.4k
        DCHECK(_parsed);
410
13.4k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.4k
        auto total = *n;
416
13.4k
        auto read_count = 0;
417
13.4k
        _buffer.resize(total);
418
1.99M
        for (size_t i = 0; i < total; ++i) {
419
1.98M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.98M
            if (UNLIKELY(ord >= _num_elements)) {
421
436
                break;
422
436
            }
423
424
1.98M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.98M
        }
426
427
13.4k
        if (LIKELY(read_count > 0)) {
428
13.4k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.4k
        }
430
431
13.4k
        *n = read_count;
432
13.4k
        return Status::OK();
433
13.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1.63k
                          MutableColumnPtr& dst) override {
409
1.63k
        DCHECK(_parsed);
410
1.63k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.63k
        auto total = *n;
416
1.63k
        auto read_count = 0;
417
1.63k
        _buffer.resize(total);
418
496k
        for (size_t i = 0; i < total; ++i) {
419
494k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
494k
            if (UNLIKELY(ord >= _num_elements)) {
421
14
                break;
422
14
            }
423
424
494k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
494k
        }
426
427
1.63k
        if (LIKELY(read_count > 0)) {
428
1.63k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.63k
        }
430
431
1.63k
        *n = read_count;
432
1.63k
        return Status::OK();
433
1.63k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
29.2k
                          MutableColumnPtr& dst) override {
409
29.2k
        DCHECK(_parsed);
410
29.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
29.2k
        auto total = *n;
416
29.2k
        auto read_count = 0;
417
29.2k
        _buffer.resize(total);
418
6.71M
        for (size_t i = 0; i < total; ++i) {
419
6.68M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
6.68M
            if (UNLIKELY(ord >= _num_elements)) {
421
824
                break;
422
824
            }
423
424
6.68M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
6.68M
        }
426
427
29.2k
        if (LIKELY(read_count > 0)) {
428
29.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
29.2k
        }
430
431
29.2k
        *n = read_count;
432
29.2k
        return Status::OK();
433
29.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
31.4k
                          MutableColumnPtr& dst) override {
409
31.4k
        DCHECK(_parsed);
410
31.4k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
31.4k
        auto total = *n;
416
31.4k
        auto read_count = 0;
417
31.4k
        _buffer.resize(total);
418
9.32M
        for (size_t i = 0; i < total; ++i) {
419
9.29M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.29M
            if (UNLIKELY(ord >= _num_elements)) {
421
205
                break;
422
205
            }
423
424
9.29M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.29M
        }
426
427
31.4k
        if (LIKELY(read_count > 0)) {
428
31.4k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
31.4k
        }
430
431
31.4k
        *n = read_count;
432
31.4k
        return Status::OK();
433
31.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1.89k
                          MutableColumnPtr& dst) override {
409
1.89k
        DCHECK(_parsed);
410
1.89k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.89k
        auto total = *n;
416
1.89k
        auto read_count = 0;
417
1.89k
        _buffer.resize(total);
418
501k
        for (size_t i = 0; i < total; ++i) {
419
499k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
499k
            if (UNLIKELY(ord >= _num_elements)) {
421
244
                break;
422
244
            }
423
424
499k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
499k
        }
426
427
1.89k
        if (LIKELY(read_count > 0)) {
428
1.89k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.89k
        }
430
431
1.89k
        *n = read_count;
432
1.89k
        return Status::OK();
433
1.89k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
12.3k
                          MutableColumnPtr& dst) override {
409
12.3k
        DCHECK(_parsed);
410
12.3k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
12.3k
        auto total = *n;
416
12.3k
        auto read_count = 0;
417
12.3k
        _buffer.resize(total);
418
26.1k
        for (size_t i = 0; i < total; ++i) {
419
13.8k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
13.8k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
13.8k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
13.8k
        }
426
427
12.3k
        if (LIKELY(read_count > 0)) {
428
12.3k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
12.3k
        }
430
431
12.3k
        *n = read_count;
432
12.3k
        return Status::OK();
433
12.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
131
                          MutableColumnPtr& dst) override {
409
131
        DCHECK(_parsed);
410
131
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
131
        auto total = *n;
416
131
        auto read_count = 0;
417
131
        _buffer.resize(total);
418
304
        for (size_t i = 0; i < total; ++i) {
419
173
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
173
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
173
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
173
        }
426
427
131
        if (LIKELY(read_count > 0)) {
428
131
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
131
        }
430
431
131
        *n = read_count;
432
131
        return Status::OK();
433
131
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4.59k
                          MutableColumnPtr& dst) override {
409
4.59k
        DCHECK(_parsed);
410
4.59k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.59k
        auto total = *n;
416
4.59k
        auto read_count = 0;
417
4.59k
        _buffer.resize(total);
418
19.0k
        for (size_t i = 0; i < total; ++i) {
419
14.4k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.4k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
14.4k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.4k
        }
426
427
4.60k
        if (LIKELY(read_count > 0)) {
428
4.60k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.60k
        }
430
431
4.59k
        *n = read_count;
432
4.59k
        return Status::OK();
433
4.59k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
27.6k
                          MutableColumnPtr& dst) override {
409
27.6k
        DCHECK(_parsed);
410
27.6k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
27.6k
        auto total = *n;
416
27.6k
        auto read_count = 0;
417
27.6k
        _buffer.resize(total);
418
24.0M
        for (size_t i = 0; i < total; ++i) {
419
24.0M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
24.0M
            if (UNLIKELY(ord >= _num_elements)) {
421
6.05k
                break;
422
6.05k
            }
423
424
24.0M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
24.0M
        }
426
427
27.6k
        if (LIKELY(read_count > 0)) {
428
27.6k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
27.6k
        }
430
431
27.6k
        *n = read_count;
432
27.6k
        return Status::OK();
433
27.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.4k
                          MutableColumnPtr& dst) override {
409
13.4k
        DCHECK(_parsed);
410
13.4k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.4k
        auto total = *n;
416
13.4k
        auto read_count = 0;
417
13.4k
        _buffer.resize(total);
418
8.82M
        for (size_t i = 0; i < total; ++i) {
419
8.81M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
8.81M
            if (UNLIKELY(ord >= _num_elements)) {
421
698
                break;
422
698
            }
423
424
8.81M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
8.81M
        }
426
427
13.4k
        if (LIKELY(read_count > 0)) {
428
13.4k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.4k
        }
430
431
13.4k
        *n = read_count;
432
13.4k
        return Status::OK();
433
13.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
959
                          MutableColumnPtr& dst) override {
409
959
        DCHECK(_parsed);
410
959
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
959
        auto total = *n;
416
959
        auto read_count = 0;
417
959
        _buffer.resize(total);
418
2.77k
        for (size_t i = 0; i < total; ++i) {
419
1.81k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.81k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
1.81k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.81k
        }
426
427
960
        if (LIKELY(read_count > 0)) {
428
960
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
960
        }
430
431
959
        *n = read_count;
432
959
        return Status::OK();
433
959
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
290
                          MutableColumnPtr& dst) override {
409
290
        DCHECK(_parsed);
410
290
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
290
        auto total = *n;
416
290
        auto read_count = 0;
417
290
        _buffer.resize(total);
418
824
        for (size_t i = 0; i < total; ++i) {
419
534
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
534
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
534
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
534
        }
426
427
290
        if (LIKELY(read_count > 0)) {
428
290
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
290
        }
430
431
290
        *n = read_count;
432
290
        return Status::OK();
433
290
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
323
                          MutableColumnPtr& dst) override {
409
323
        DCHECK(_parsed);
410
323
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
323
        auto total = *n;
416
323
        auto read_count = 0;
417
323
        _buffer.resize(total);
418
1.16k
        for (size_t i = 0; i < total; ++i) {
419
838
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
838
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
838
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
838
        }
426
427
323
        if (LIKELY(read_count > 0)) {
428
323
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
323
        }
430
431
323
        *n = read_count;
432
323
        return Status::OK();
433
323
    }
434
435
205k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
205k
        return next_batch<false>(n, dst);
437
205k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
435
205k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
205k
        return next_batch<false>(n, dst);
437
205k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
438
439
4
    size_t count() const override { return _num_elements; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
439
4
    size_t count() const override { return _num_elements; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE5countEv
440
441
1.99M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
739k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
441
962
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
441
590
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
9.25k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
441
320
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE13current_indexEv
Line
Count
Source
441
227k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
202k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
441
211k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
441
229k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
441
43.1k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
441
200k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Line
Count
Source
441
1.07k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE13current_indexEv
Line
Count
Source
441
6
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE13current_indexEv
Line
Count
Source
441
3.57k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
441
976
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
441
118k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE13current_indexEv
Line
Count
Source
441
308
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE13current_indexEv
Line
Count
Source
441
39
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
Line
Count
Source
441
45
    size_t current_index() const override { return _cur_index; }
442
443
117M
    char* get_data(size_t index) const {
444
117M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
117M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
43.4M
    char* get_data(size_t index) const {
444
43.4M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
43.4M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
880k
    char* get_data(size_t index) const {
444
880k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
880k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
443
78.8k
    char* get_data(size_t index) const {
444
78.8k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
78.8k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
443
13.1M
    char* get_data(size_t index) const {
444
13.1M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
13.1M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
19.4k
    char* get_data(size_t index) const {
444
19.4k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
19.4k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
5.85M
    char* get_data(size_t index) const {
444
5.85M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
5.85M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
1.22M
    char* get_data(size_t index) const {
444
1.22M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.22M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
2.00M
    char* get_data(size_t index) const {
444
2.00M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
2.00M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
498k
    char* get_data(size_t index) const {
444
498k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
498k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
7.07M
    char* get_data(size_t index) const {
444
7.07M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
7.07M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
443
9.36M
    char* get_data(size_t index) const {
444
9.36M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.36M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
443
500k
    char* get_data(size_t index) const {
444
500k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
500k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
443
21.8k
    char* get_data(size_t index) const {
444
21.8k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
21.8k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
443
1.43k
    char* get_data(size_t index) const {
444
1.43k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.43k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
443
24.8k
    char* get_data(size_t index) const {
444
24.8k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
24.8k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
443
24.1M
    char* get_data(size_t index) const {
444
24.1M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
24.1M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
8.83M
    char* get_data(size_t index) const {
444
8.83M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
8.83M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
443
4.98k
    char* get_data(size_t index) const {
444
4.98k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
4.98k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Line
Count
Source
443
1.19k
    char* get_data(size_t index) const {
444
1.19k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.19k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
Line
Count
Source
443
1.52k
    char* get_data(size_t index) const {
444
1.52k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.52k
    }
446
447
private:
448
    void _copy_next_values(size_t n, void* data) {
449
        memcpy(data, get_data(_cur_index), n * SIZE_OF_TYPE);
450
    }
451
452
    using CppType = typename TypeTraits<Type>::CppType;
453
454
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
455
456
    Slice _data;
457
    PageDecoderOptions _options;
458
    bool _parsed;
459
    size_t _num_elements;
460
    size_t _num_element_after_padding;
461
462
    int _size_of_element;
463
    size_t _cur_index;
464
465
    std::vector<std::conditional_t<std::is_same_v<CppType, bool>, uint8_t, CppType>> _buffer;
466
467
    friend class BinaryDictPageDecoder;
468
};
469
470
} // namespace segment_v2
471
} // namespace doris