Coverage Report

Created: 2026-08-06 12:21

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
874k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
435k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
69.8k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
8.47k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
166k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
10.8k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
95
49.8k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
95
9.36k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
95
11.7k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
332
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
31.0k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
95
39.2k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
433
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
95
7.14k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
338
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
95
7.34k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
95
11.2k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
95
12.3k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
95
1.30k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
95
929
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
95
821
    Status init() override { return reset(); }
96
97
167M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
166M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
74.0k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
11.4k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
351k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
18.9k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
50.2k
    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
9.72k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
97
14.2k
    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
351
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
66.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
47.8k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
97
499
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
Line
Count
Source
97
7.20k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
97
252
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
97
4.50k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
22.9k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
97
16.9k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Line
Count
Source
97
1.52k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Line
Count
Source
97
25.8k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
97
3.25k
    bool is_page_full() override { return _remain_element_capacity == 0; }
98
99
1.45M
    Status add(const uint8_t* vals, size_t* count) override {
100
1.45M
        return add_internal<false>(vals, count);
101
1.45M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
99
727k
    Status add(const uint8_t* vals, size_t* count) override {
100
727k
        return add_internal<false>(vals, count);
101
727k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
74.0k
    Status add(const uint8_t* vals, size_t* count) override {
100
74.0k
        return add_internal<false>(vals, count);
101
74.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
11.4k
    Status add(const uint8_t* vals, size_t* count) override {
100
11.4k
        return add_internal<false>(vals, count);
101
11.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
351k
    Status add(const uint8_t* vals, size_t* count) override {
100
351k
        return add_internal<false>(vals, count);
101
351k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
18.9k
    Status add(const uint8_t* vals, size_t* count) override {
100
18.9k
        return add_internal<false>(vals, count);
101
18.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
50.2k
    Status add(const uint8_t* vals, size_t* count) override {
100
50.2k
        return add_internal<false>(vals, count);
101
50.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
99
9.72k
    Status add(const uint8_t* vals, size_t* count) override {
100
9.72k
        return add_internal<false>(vals, count);
101
9.72k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
99
14.2k
    Status add(const uint8_t* vals, size_t* count) override {
100
14.2k
        return add_internal<false>(vals, count);
101
14.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
351
    Status add(const uint8_t* vals, size_t* count) override {
100
351
        return add_internal<false>(vals, count);
101
351
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
66.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
66.3k
        return add_internal<false>(vals, count);
101
66.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
47.8k
    Status add(const uint8_t* vals, size_t* count) override {
100
47.8k
        return add_internal<false>(vals, count);
101
47.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
99
499
    Status add(const uint8_t* vals, size_t* count) override {
100
499
        return add_internal<false>(vals, count);
101
499
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
Line
Count
Source
99
7.20k
    Status add(const uint8_t* vals, size_t* count) override {
100
7.20k
        return add_internal<false>(vals, count);
101
7.20k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
252
    Status add(const uint8_t* vals, size_t* count) override {
100
252
        return add_internal<false>(vals, count);
101
252
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
99
4.50k
    Status add(const uint8_t* vals, size_t* count) override {
100
4.50k
        return add_internal<false>(vals, count);
101
4.50k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
22.9k
    Status add(const uint8_t* vals, size_t* count) override {
100
22.9k
        return add_internal<false>(vals, count);
101
22.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
99
16.9k
    Status add(const uint8_t* vals, size_t* count) override {
100
16.9k
        return add_internal<false>(vals, count);
101
16.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Line
Count
Source
99
1.52k
    Status add(const uint8_t* vals, size_t* count) override {
100
1.52k
        return add_internal<false>(vals, count);
101
1.52k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Line
Count
Source
99
25.8k
    Status add(const uint8_t* vals, size_t* count) override {
100
25.8k
        return add_internal<false>(vals, count);
101
25.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
99
3.25k
    Status add(const uint8_t* vals, size_t* count) override {
100
3.25k
        return add_internal<false>(vals, count);
101
3.25k
    }
102
103
168M
    Status single_add(const uint8_t* vals, size_t* count) {
104
168M
        return add_internal<true>(vals, count);
105
168M
    }
106
107
    template <bool single>
108
167M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
167M
        DCHECK(!_finished);
110
167M
        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
167M
        uint32_t to_add = cast_set<UInt32>(
126
167M
                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
167M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
167M
        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
167M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
169M
        _count += to_add;
134
169M
        _remain_element_capacity -= to_add;
135
169M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
169M
        *num_written = to_add;
138
169M
        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
168M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
168M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
168M
                        *reinterpret_cast<const uint32_t*>(vals);
149
168M
                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
168M
        }
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
169M
        return Status::OK();
159
167M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
727k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
727k
        DCHECK(!_finished);
110
727k
        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
727k
        uint32_t to_add = cast_set<UInt32>(
126
727k
                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
727k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
727k
        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
727k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
727k
        _count += to_add;
134
727k
        _remain_element_capacity -= to_add;
135
727k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
727k
        *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
727k
        memcpy(&_data[orig_size], vals, to_add_size);
158
727k
        return Status::OK();
159
727k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
165M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
165M
        DCHECK(!_finished);
110
165M
        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
165M
        uint32_t to_add = cast_set<UInt32>(
126
165M
                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
165M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
165M
        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
165M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
168M
        _count += to_add;
134
168M
        _remain_element_capacity -= to_add;
135
168M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
168M
        *num_written = to_add;
138
168M
        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
168M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
168M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
168M
                        *reinterpret_cast<const uint32_t*>(vals);
149
168M
                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
168M
        }
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
168M
        return Status::OK();
159
165M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
74.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
74.0k
        DCHECK(!_finished);
110
74.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
74.0k
        uint32_t to_add = cast_set<UInt32>(
126
74.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
74.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
74.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
74.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
74.0k
        _count += to_add;
134
74.0k
        _remain_element_capacity -= to_add;
135
74.0k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
74.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
74.0k
        memcpy(&_data[orig_size], vals, to_add_size);
158
74.0k
        return Status::OK();
159
74.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
11.4k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
11.4k
        DCHECK(!_finished);
110
11.4k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
11.4k
        uint32_t to_add = cast_set<UInt32>(
126
11.4k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
11.4k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
11.4k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
11.4k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
11.4k
        _count += to_add;
134
11.4k
        _remain_element_capacity -= to_add;
135
11.4k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
11.4k
        *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
11.4k
        memcpy(&_data[orig_size], vals, to_add_size);
158
11.4k
        return Status::OK();
159
11.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
351k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
351k
        DCHECK(!_finished);
110
351k
        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
351k
        uint32_t to_add = cast_set<UInt32>(
126
351k
                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
351k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
351k
        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
351k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
351k
        _count += to_add;
134
351k
        _remain_element_capacity -= to_add;
135
351k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
351k
        *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
351k
        memcpy(&_data[orig_size], vals, to_add_size);
158
351k
        return Status::OK();
159
351k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
18.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
18.9k
        DCHECK(!_finished);
110
18.9k
        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
18.9k
        uint32_t to_add = cast_set<UInt32>(
126
18.9k
                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
18.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
18.9k
        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
18.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
18.9k
        _count += to_add;
134
18.9k
        _remain_element_capacity -= to_add;
135
18.9k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
18.9k
        *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
18.9k
        memcpy(&_data[orig_size], vals, to_add_size);
158
18.9k
        return Status::OK();
159
18.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
50.2k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
50.2k
        DCHECK(!_finished);
110
50.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
50.2k
        uint32_t to_add = cast_set<UInt32>(
126
50.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
50.2k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
50.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
50.2k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
50.2k
        _count += to_add;
134
50.2k
        _remain_element_capacity -= to_add;
135
50.2k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
50.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
50.2k
        memcpy(&_data[orig_size], vals, to_add_size);
158
50.2k
        return Status::OK();
159
50.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
9.72k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
9.72k
        DCHECK(!_finished);
110
9.72k
        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.72k
        uint32_t to_add = cast_set<UInt32>(
126
9.72k
                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.72k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
9.72k
        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.72k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
9.72k
        _count += to_add;
134
9.72k
        _remain_element_capacity -= to_add;
135
9.72k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
9.72k
        *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.72k
        memcpy(&_data[orig_size], vals, to_add_size);
158
9.72k
        return Status::OK();
159
9.72k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
14.2k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
14.2k
        DCHECK(!_finished);
110
14.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
14.2k
        uint32_t to_add = cast_set<UInt32>(
126
14.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
14.2k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
14.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
14.2k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
14.2k
        _count += to_add;
134
14.2k
        _remain_element_capacity -= to_add;
135
14.2k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
14.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
14.2k
        memcpy(&_data[orig_size], vals, to_add_size);
158
14.2k
        return Status::OK();
159
14.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
351
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
351
        DCHECK(!_finished);
110
351
        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
351
        uint32_t to_add = cast_set<UInt32>(
126
351
                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
351
        int to_add_size = to_add * SIZE_OF_TYPE;
129
351
        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
351
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
351
        _count += to_add;
134
351
        _remain_element_capacity -= to_add;
135
351
        _raw_data_size += to_add_size;
136
        // return added number through count
137
351
        *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
351
        memcpy(&_data[orig_size], vals, to_add_size);
158
351
        return Status::OK();
159
351
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
66.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
66.3k
        DCHECK(!_finished);
110
66.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
66.3k
        uint32_t to_add = cast_set<UInt32>(
126
66.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
66.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
66.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
66.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
66.3k
        _count += to_add;
134
66.3k
        _remain_element_capacity -= to_add;
135
66.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
66.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
66.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
66.3k
        return Status::OK();
159
66.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
47.8k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
47.8k
        DCHECK(!_finished);
110
47.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
47.8k
        uint32_t to_add = cast_set<UInt32>(
126
47.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
47.8k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
47.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
47.8k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
47.8k
        _count += to_add;
134
47.8k
        _remain_element_capacity -= to_add;
135
47.8k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
47.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
47.8k
        memcpy(&_data[orig_size], vals, to_add_size);
158
47.8k
        return Status::OK();
159
47.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
499
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
499
        DCHECK(!_finished);
110
499
        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
499
        uint32_t to_add = cast_set<UInt32>(
126
499
                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
499
        int to_add_size = to_add * SIZE_OF_TYPE;
129
499
        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
499
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
499
        _count += to_add;
134
499
        _remain_element_capacity -= to_add;
135
499
        _raw_data_size += to_add_size;
136
        // return added number through count
137
499
        *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
499
        memcpy(&_data[orig_size], vals, to_add_size);
158
499
        return Status::OK();
159
499
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
7.20k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
7.20k
        DCHECK(!_finished);
110
7.20k
        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.20k
        uint32_t to_add = cast_set<UInt32>(
126
7.20k
                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.20k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
7.20k
        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.20k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
7.20k
        _count += to_add;
134
7.20k
        _remain_element_capacity -= to_add;
135
7.20k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
7.20k
        *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.20k
        memcpy(&_data[orig_size], vals, to_add_size);
158
7.20k
        return Status::OK();
159
7.20k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
252
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
252
        DCHECK(!_finished);
110
252
        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
252
        uint32_t to_add = cast_set<UInt32>(
126
252
                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
252
        int to_add_size = to_add * SIZE_OF_TYPE;
129
252
        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
252
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
252
        _count += to_add;
134
252
        _remain_element_capacity -= to_add;
135
252
        _raw_data_size += to_add_size;
136
        // return added number through count
137
252
        *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
252
        memcpy(&_data[orig_size], vals, to_add_size);
158
252
        return Status::OK();
159
252
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
4.50k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
4.50k
        DCHECK(!_finished);
110
4.50k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
4.50k
        uint32_t to_add = cast_set<UInt32>(
126
4.50k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
4.50k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
4.50k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
4.50k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
4.50k
        _count += to_add;
134
4.50k
        _remain_element_capacity -= to_add;
135
4.50k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
4.50k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
4.50k
        memcpy(&_data[orig_size], vals, to_add_size);
158
4.50k
        return Status::OK();
159
4.50k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
22.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
22.9k
        DCHECK(!_finished);
110
22.9k
        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
22.9k
        uint32_t to_add = cast_set<UInt32>(
126
22.9k
                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
22.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
22.9k
        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
22.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
22.9k
        _count += to_add;
134
22.9k
        _remain_element_capacity -= to_add;
135
22.9k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
22.9k
        *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
22.9k
        memcpy(&_data[orig_size], vals, to_add_size);
158
22.9k
        return Status::OK();
159
22.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
16.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
16.9k
        DCHECK(!_finished);
110
16.9k
        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.9k
        uint32_t to_add = cast_set<UInt32>(
126
16.9k
                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.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
16.9k
        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.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
16.9k
        _count += to_add;
134
16.9k
        _remain_element_capacity -= to_add;
135
16.9k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
16.9k
        *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.9k
        memcpy(&_data[orig_size], vals, to_add_size);
158
16.9k
        return Status::OK();
159
16.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
1.52k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
1.52k
        DCHECK(!_finished);
110
1.52k
        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.52k
        uint32_t to_add = cast_set<UInt32>(
126
1.52k
                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.52k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
1.52k
        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.52k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
1.52k
        _count += to_add;
134
1.52k
        _remain_element_capacity -= to_add;
135
1.52k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
1.52k
        *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.52k
        memcpy(&_data[orig_size], vals, to_add_size);
158
1.52k
        return Status::OK();
159
1.52k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
25.8k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
25.8k
        DCHECK(!_finished);
110
25.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
25.8k
        uint32_t to_add = cast_set<UInt32>(
126
25.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
25.8k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
25.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
25.8k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
25.8k
        _count += to_add;
134
25.8k
        _remain_element_capacity -= to_add;
135
25.8k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
25.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
25.8k
        memcpy(&_data[orig_size], vals, to_add_size);
158
25.8k
        return Status::OK();
159
25.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
3.25k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
3.25k
        DCHECK(!_finished);
110
3.25k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
3.25k
        uint32_t to_add = cast_set<UInt32>(
126
3.25k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
3.25k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
3.25k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
3.25k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
3.25k
        _count += to_add;
134
3.25k
        _remain_element_capacity -= to_add;
135
3.25k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
3.25k
        *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
3.25k
        memcpy(&_data[orig_size], vals, to_add_size);
158
3.25k
        return Status::OK();
159
3.25k
    }
160
161
873k
    Status finish(OwnedSlice* slice) override {
162
873k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
873k
        return Status::OK();
164
873k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
421k
    Status finish(OwnedSlice* slice) override {
162
421k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
421k
        return Status::OK();
164
421k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
69.8k
    Status finish(OwnedSlice* slice) override {
162
69.8k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
69.8k
        return Status::OK();
164
69.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
8.42k
    Status finish(OwnedSlice* slice) override {
162
8.42k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
8.42k
        return Status::OK();
164
8.42k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
169k
    Status finish(OwnedSlice* slice) override {
162
169k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
169k
        return Status::OK();
164
169k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
11.3k
    Status finish(OwnedSlice* slice) override {
162
11.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
11.3k
        return Status::OK();
164
11.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
49.5k
    Status finish(OwnedSlice* slice) override {
162
49.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
49.5k
        return Status::OK();
164
49.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
9.17k
    Status finish(OwnedSlice* slice) override {
162
9.17k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
9.17k
        return Status::OK();
164
9.17k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
12.2k
    Status finish(OwnedSlice* slice) override {
162
12.2k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
12.2k
        return Status::OK();
164
12.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
344
    Status finish(OwnedSlice* slice) override {
162
344
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
344
        return Status::OK();
164
344
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
32.7k
    Status finish(OwnedSlice* slice) override {
162
32.7k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
32.7k
        return Status::OK();
164
32.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
39.5k
    Status finish(OwnedSlice* slice) override {
162
39.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
39.5k
        return Status::OK();
164
39.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
587
    Status finish(OwnedSlice* slice) override {
162
587
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
587
        return Status::OK();
164
587
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7.27k
    Status finish(OwnedSlice* slice) override {
162
7.27k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.27k
        return Status::OK();
164
7.27k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
252
    Status finish(OwnedSlice* slice) override {
162
252
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
252
        return Status::OK();
164
252
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7.33k
    Status finish(OwnedSlice* slice) override {
162
7.33k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.33k
        return Status::OK();
164
7.33k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
17.6k
    Status finish(OwnedSlice* slice) override {
162
17.6k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
17.6k
        return Status::OK();
164
17.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
13.5k
    Status finish(OwnedSlice* slice) override {
162
13.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
13.5k
        return Status::OK();
164
13.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
1.20k
    Status finish(OwnedSlice* slice) override {
162
1.20k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
1.20k
        return Status::OK();
164
1.20k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
843
    Status finish(OwnedSlice* slice) override {
162
843
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
843
        return Status::OK();
164
843
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
739
    Status finish(OwnedSlice* slice) override {
162
739
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
739
        return Status::OK();
164
739
    }
165
166
2.08M
    Status reset() override {
167
2.08M
        RETURN_IF_CATCH_EXCEPTION({
168
2.08M
            size_t block_size = _options.data_page_size;
169
2.08M
            _count = 0;
170
2.08M
            _raw_data_size = 0;
171
2.08M
            _data.clear();
172
2.08M
            _data.reserve(block_size);
173
2.08M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
2.08M
                    << "buffer must be naturally-aligned";
175
2.08M
            _buffer.clear();
176
2.08M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
2.08M
            _finished = false;
178
2.08M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
2.08M
        });
180
2.09M
        return Status::OK();
181
2.08M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
166
1.19M
    Status reset() override {
167
1.19M
        RETURN_IF_CATCH_EXCEPTION({
168
1.19M
            size_t block_size = _options.data_page_size;
169
1.19M
            _count = 0;
170
1.19M
            _raw_data_size = 0;
171
1.19M
            _data.clear();
172
1.19M
            _data.reserve(block_size);
173
1.19M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.19M
                    << "buffer must be naturally-aligned";
175
1.19M
            _buffer.clear();
176
1.19M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.19M
            _finished = false;
178
1.19M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.19M
        });
180
1.19M
        return Status::OK();
181
1.19M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
139k
    Status reset() override {
167
139k
        RETURN_IF_CATCH_EXCEPTION({
168
139k
            size_t block_size = _options.data_page_size;
169
139k
            _count = 0;
170
139k
            _raw_data_size = 0;
171
139k
            _data.clear();
172
139k
            _data.reserve(block_size);
173
139k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
139k
                    << "buffer must be naturally-aligned";
175
139k
            _buffer.clear();
176
139k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
139k
            _finished = false;
178
139k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
139k
        });
180
139k
        return Status::OK();
181
139k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
166
16.8k
    Status reset() override {
167
16.8k
        RETURN_IF_CATCH_EXCEPTION({
168
16.8k
            size_t block_size = _options.data_page_size;
169
16.8k
            _count = 0;
170
16.8k
            _raw_data_size = 0;
171
16.8k
            _data.clear();
172
16.8k
            _data.reserve(block_size);
173
16.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
16.8k
                    << "buffer must be naturally-aligned";
175
16.8k
            _buffer.clear();
176
16.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
16.8k
            _finished = false;
178
16.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
16.8k
        });
180
16.9k
        return Status::OK();
181
16.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
335k
    Status reset() override {
167
335k
        RETURN_IF_CATCH_EXCEPTION({
168
335k
            size_t block_size = _options.data_page_size;
169
335k
            _count = 0;
170
335k
            _raw_data_size = 0;
171
335k
            _data.clear();
172
335k
            _data.reserve(block_size);
173
335k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
335k
                    << "buffer must be naturally-aligned";
175
335k
            _buffer.clear();
176
335k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
335k
            _finished = false;
178
335k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
335k
        });
180
336k
        return Status::OK();
181
335k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
166
22.1k
    Status reset() override {
167
22.1k
        RETURN_IF_CATCH_EXCEPTION({
168
22.1k
            size_t block_size = _options.data_page_size;
169
22.1k
            _count = 0;
170
22.1k
            _raw_data_size = 0;
171
22.1k
            _data.clear();
172
22.1k
            _data.reserve(block_size);
173
22.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
22.1k
                    << "buffer must be naturally-aligned";
175
22.1k
            _buffer.clear();
176
22.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
22.1k
            _finished = false;
178
22.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
22.1k
        });
180
22.2k
        return Status::OK();
181
22.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
166
99.3k
    Status reset() override {
167
99.3k
        RETURN_IF_CATCH_EXCEPTION({
168
99.3k
            size_t block_size = _options.data_page_size;
169
99.3k
            _count = 0;
170
99.3k
            _raw_data_size = 0;
171
99.3k
            _data.clear();
172
99.3k
            _data.reserve(block_size);
173
99.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
99.3k
                    << "buffer must be naturally-aligned";
175
99.3k
            _buffer.clear();
176
99.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
99.3k
            _finished = false;
178
99.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
99.3k
        });
180
99.5k
        return Status::OK();
181
99.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
166
18.5k
    Status reset() override {
167
18.5k
        RETURN_IF_CATCH_EXCEPTION({
168
18.5k
            size_t block_size = _options.data_page_size;
169
18.5k
            _count = 0;
170
18.5k
            _raw_data_size = 0;
171
18.5k
            _data.clear();
172
18.5k
            _data.reserve(block_size);
173
18.5k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
18.5k
                    << "buffer must be naturally-aligned";
175
18.5k
            _buffer.clear();
176
18.5k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
18.5k
            _finished = false;
178
18.5k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
18.5k
        });
180
18.5k
        return Status::OK();
181
18.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
166
23.9k
    Status reset() override {
167
23.9k
        RETURN_IF_CATCH_EXCEPTION({
168
23.9k
            size_t block_size = _options.data_page_size;
169
23.9k
            _count = 0;
170
23.9k
            _raw_data_size = 0;
171
23.9k
            _data.clear();
172
23.9k
            _data.reserve(block_size);
173
23.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
23.9k
                    << "buffer must be naturally-aligned";
175
23.9k
            _buffer.clear();
176
23.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
23.9k
            _finished = false;
178
23.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
23.9k
        });
180
24.0k
        return Status::OK();
181
23.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
166
676
    Status reset() override {
167
676
        RETURN_IF_CATCH_EXCEPTION({
168
676
            size_t block_size = _options.data_page_size;
169
676
            _count = 0;
170
676
            _raw_data_size = 0;
171
676
            _data.clear();
172
676
            _data.reserve(block_size);
173
676
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
676
                    << "buffer must be naturally-aligned";
175
676
            _buffer.clear();
176
676
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
676
            _finished = false;
178
676
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
676
        });
180
676
        return Status::OK();
181
676
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
166
63.7k
    Status reset() override {
167
63.7k
        RETURN_IF_CATCH_EXCEPTION({
168
63.7k
            size_t block_size = _options.data_page_size;
169
63.7k
            _count = 0;
170
63.7k
            _raw_data_size = 0;
171
63.7k
            _data.clear();
172
63.7k
            _data.reserve(block_size);
173
63.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
63.7k
                    << "buffer must be naturally-aligned";
175
63.7k
            _buffer.clear();
176
63.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
63.7k
            _finished = false;
178
63.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
63.7k
        });
180
63.8k
        return Status::OK();
181
63.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
166
78.7k
    Status reset() override {
167
78.7k
        RETURN_IF_CATCH_EXCEPTION({
168
78.7k
            size_t block_size = _options.data_page_size;
169
78.7k
            _count = 0;
170
78.7k
            _raw_data_size = 0;
171
78.7k
            _data.clear();
172
78.7k
            _data.reserve(block_size);
173
78.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
78.7k
                    << "buffer must be naturally-aligned";
175
78.7k
            _buffer.clear();
176
78.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
78.7k
            _finished = false;
178
78.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
78.7k
        });
180
78.8k
        return Status::OK();
181
78.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
166
1.02k
    Status reset() override {
167
1.02k
        RETURN_IF_CATCH_EXCEPTION({
168
1.02k
            size_t block_size = _options.data_page_size;
169
1.02k
            _count = 0;
170
1.02k
            _raw_data_size = 0;
171
1.02k
            _data.clear();
172
1.02k
            _data.reserve(block_size);
173
1.02k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.02k
                    << "buffer must be naturally-aligned";
175
1.02k
            _buffer.clear();
176
1.02k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.02k
            _finished = false;
178
1.02k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.02k
        });
180
1.02k
        return Status::OK();
181
1.02k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
Line
Count
Source
166
14.2k
    Status reset() override {
167
14.2k
        RETURN_IF_CATCH_EXCEPTION({
168
14.2k
            size_t block_size = _options.data_page_size;
169
14.2k
            _count = 0;
170
14.2k
            _raw_data_size = 0;
171
14.2k
            _data.clear();
172
14.2k
            _data.reserve(block_size);
173
14.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
14.2k
                    << "buffer must be naturally-aligned";
175
14.2k
            _buffer.clear();
176
14.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
14.2k
            _finished = false;
178
14.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
14.2k
        });
180
14.5k
        return Status::OK();
181
14.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
166
590
    Status reset() override {
167
590
        RETURN_IF_CATCH_EXCEPTION({
168
590
            size_t block_size = _options.data_page_size;
169
590
            _count = 0;
170
590
            _raw_data_size = 0;
171
590
            _data.clear();
172
590
            _data.reserve(block_size);
173
590
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
590
                    << "buffer must be naturally-aligned";
175
590
            _buffer.clear();
176
590
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
590
            _finished = false;
178
590
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
590
        });
180
590
        return Status::OK();
181
590
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
166
14.6k
    Status reset() override {
167
14.6k
        RETURN_IF_CATCH_EXCEPTION({
168
14.6k
            size_t block_size = _options.data_page_size;
169
14.6k
            _count = 0;
170
14.6k
            _raw_data_size = 0;
171
14.6k
            _data.clear();
172
14.6k
            _data.reserve(block_size);
173
14.6k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
14.6k
                    << "buffer must be naturally-aligned";
175
14.6k
            _buffer.clear();
176
14.6k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
14.6k
            _finished = false;
178
14.6k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
14.6k
        });
180
14.6k
        return Status::OK();
181
14.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
28.9k
    Status reset() override {
167
28.9k
        RETURN_IF_CATCH_EXCEPTION({
168
28.9k
            size_t block_size = _options.data_page_size;
169
28.9k
            _count = 0;
170
28.9k
            _raw_data_size = 0;
171
28.9k
            _data.clear();
172
28.9k
            _data.reserve(block_size);
173
28.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
28.9k
                    << "buffer must be naturally-aligned";
175
28.9k
            _buffer.clear();
176
28.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
28.9k
            _finished = false;
178
28.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
28.9k
        });
180
28.9k
        return Status::OK();
181
28.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
166
25.8k
    Status reset() override {
167
25.8k
        RETURN_IF_CATCH_EXCEPTION({
168
25.8k
            size_t block_size = _options.data_page_size;
169
25.8k
            _count = 0;
170
25.8k
            _raw_data_size = 0;
171
25.8k
            _data.clear();
172
25.8k
            _data.reserve(block_size);
173
25.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
25.8k
                    << "buffer must be naturally-aligned";
175
25.8k
            _buffer.clear();
176
25.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
25.8k
            _finished = false;
178
25.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
25.8k
        });
180
25.8k
        return Status::OK();
181
25.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Line
Count
Source
166
2.50k
    Status reset() override {
167
2.50k
        RETURN_IF_CATCH_EXCEPTION({
168
2.50k
            size_t block_size = _options.data_page_size;
169
2.50k
            _count = 0;
170
2.50k
            _raw_data_size = 0;
171
2.50k
            _data.clear();
172
2.50k
            _data.reserve(block_size);
173
2.50k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
2.50k
                    << "buffer must be naturally-aligned";
175
2.50k
            _buffer.clear();
176
2.50k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
2.50k
            _finished = false;
178
2.50k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
2.50k
        });
180
2.51k
        return Status::OK();
181
2.50k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Line
Count
Source
166
1.77k
    Status reset() override {
167
1.77k
        RETURN_IF_CATCH_EXCEPTION({
168
1.77k
            size_t block_size = _options.data_page_size;
169
1.77k
            _count = 0;
170
1.77k
            _raw_data_size = 0;
171
1.77k
            _data.clear();
172
1.77k
            _data.reserve(block_size);
173
1.77k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.77k
                    << "buffer must be naturally-aligned";
175
1.77k
            _buffer.clear();
176
1.77k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.77k
            _finished = false;
178
1.77k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.77k
        });
180
1.77k
        return Status::OK();
181
1.77k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
166
1.55k
    Status reset() override {
167
1.55k
        RETURN_IF_CATCH_EXCEPTION({
168
1.55k
            size_t block_size = _options.data_page_size;
169
1.55k
            _count = 0;
170
1.55k
            _raw_data_size = 0;
171
1.55k
            _data.clear();
172
1.55k
            _data.reserve(block_size);
173
1.55k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.55k
                    << "buffer must be naturally-aligned";
175
1.55k
            _buffer.clear();
176
1.55k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.55k
            _finished = false;
178
1.55k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.55k
        });
180
1.56k
        return Status::OK();
181
1.55k
    }
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
123k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
67.7k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
185
21.3k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
185
928
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
21.3k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
1.26k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
2.81k
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
640
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
185
726
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4sizeEv
Line
Count
Source
185
28
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4sizeEv
Line
Count
Source
185
1.64k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
2.78k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4sizeEv
Line
Count
Source
185
35
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4sizeEv
Line
Count
Source
185
24
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4sizeEv
Line
Count
Source
185
24
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4sizeEv
Line
Count
Source
185
204
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
185
359
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
185
1.02k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4sizeEv
Line
Count
Source
185
26
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4sizeEv
Line
Count
Source
185
48
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4sizeEv
Line
Count
Source
185
32
    uint64_t size() const override { return _buffer.size(); }
186
187
546k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
94.6k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
69.8k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
8.42k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
169k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
187
11.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
49.5k
    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
9.17k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
12.2k
    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
344
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
187
32.7k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
187
39.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
187
587
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
Line
Count
Source
187
7.27k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
187
252
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
187
7.33k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
17.6k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
187
13.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE17get_raw_data_sizeEv
Line
Count
Source
187
1.20k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Line
Count
Source
187
843
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
187
739
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
872k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
433k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
69.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
8.47k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
166k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
10.8k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
49.8k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.36k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
11.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
332
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
30.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
39.2k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
433
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
7.05k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
338
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
7.33k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
11.2k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
12.3k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1.29k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
928
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
821
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
192
193
873k
    OwnedSlice _finish(int final_size_of_type) {
194
873k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
873k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
873k
        int padding_elems = num_elems_after_padding - _count;
199
873k
        int padding_bytes = padding_elems * final_size_of_type;
200
24.9M
        for (int i = 0; i < padding_bytes; i++) {
201
24.0M
            _data.push_back(0);
202
24.0M
        }
203
204
        // reserve enough place for compression
205
873k
        _buffer.resize(
206
873k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
873k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
873k
        int64_t bytes =
210
873k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
873k
                                         num_elems_after_padding, final_size_of_type, 0);
212
873k
        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
873k
        encode_fixed32_le(&_buffer[0], _count);
222
873k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
873k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
873k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
873k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
873k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
873k
        return _buffer.build();
229
873k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
421k
    OwnedSlice _finish(int final_size_of_type) {
194
421k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
421k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
421k
        int padding_elems = num_elems_after_padding - _count;
199
421k
        int padding_bytes = padding_elems * final_size_of_type;
200
8.41M
        for (int i = 0; i < padding_bytes; i++) {
201
7.98M
            _data.push_back(0);
202
7.98M
        }
203
204
        // reserve enough place for compression
205
421k
        _buffer.resize(
206
421k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
421k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
421k
        int64_t bytes =
210
421k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
421k
                                         num_elems_after_padding, final_size_of_type, 0);
212
421k
        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
421k
        encode_fixed32_le(&_buffer[0], _count);
222
421k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
421k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
421k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
421k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
421k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
421k
        return _buffer.build();
229
421k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
69.8k
    OwnedSlice _finish(int final_size_of_type) {
194
69.8k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
69.8k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
69.8k
        int padding_elems = num_elems_after_padding - _count;
199
69.8k
        int padding_bytes = padding_elems * final_size_of_type;
200
439k
        for (int i = 0; i < padding_bytes; i++) {
201
369k
            _data.push_back(0);
202
369k
        }
203
204
        // reserve enough place for compression
205
69.8k
        _buffer.resize(
206
69.8k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
69.8k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
69.8k
        int64_t bytes =
210
69.8k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
69.8k
                                         num_elems_after_padding, final_size_of_type, 0);
212
69.8k
        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
69.8k
        encode_fixed32_le(&_buffer[0], _count);
222
69.8k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
69.8k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
69.8k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
69.8k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
69.8k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
69.8k
        return _buffer.build();
229
69.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
8.42k
    OwnedSlice _finish(int final_size_of_type) {
194
8.42k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
8.42k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
8.42k
        int padding_elems = num_elems_after_padding - _count;
199
8.42k
        int padding_bytes = padding_elems * final_size_of_type;
200
83.0k
        for (int i = 0; i < padding_bytes; i++) {
201
74.6k
            _data.push_back(0);
202
74.6k
        }
203
204
        // reserve enough place for compression
205
8.42k
        _buffer.resize(
206
8.42k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
8.42k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
8.42k
        int64_t bytes =
210
8.42k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
8.42k
                                         num_elems_after_padding, final_size_of_type, 0);
212
8.42k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
8.42k
        encode_fixed32_le(&_buffer[0], _count);
222
8.42k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
8.42k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
8.42k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
8.42k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
8.42k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
8.42k
        return _buffer.build();
229
8.42k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
169k
    OwnedSlice _finish(int final_size_of_type) {
194
169k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
169k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
169k
        int padding_elems = num_elems_after_padding - _count;
199
169k
        int padding_bytes = padding_elems * final_size_of_type;
200
7.99M
        for (int i = 0; i < padding_bytes; i++) {
201
7.82M
            _data.push_back(0);
202
7.82M
        }
203
204
        // reserve enough place for compression
205
169k
        _buffer.resize(
206
169k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
169k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
169k
        int64_t bytes =
210
169k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
169k
                                         num_elems_after_padding, final_size_of_type, 0);
212
169k
        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
169k
        encode_fixed32_le(&_buffer[0], _count);
222
169k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
169k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
169k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
169k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
169k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
169k
        return _buffer.build();
229
169k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
11.3k
    OwnedSlice _finish(int final_size_of_type) {
194
11.3k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
11.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
11.3k
        int padding_elems = num_elems_after_padding - _count;
199
11.3k
        int padding_bytes = padding_elems * final_size_of_type;
200
691k
        for (int i = 0; i < padding_bytes; i++) {
201
679k
            _data.push_back(0);
202
679k
        }
203
204
        // reserve enough place for compression
205
11.3k
        _buffer.resize(
206
11.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
11.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
11.3k
        int64_t bytes =
210
11.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
11.3k
                                         num_elems_after_padding, final_size_of_type, 0);
212
11.3k
        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.3k
        encode_fixed32_le(&_buffer[0], _count);
222
11.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
11.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
11.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
11.3k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
11.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
11.3k
        return _buffer.build();
229
11.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
49.5k
    OwnedSlice _finish(int final_size_of_type) {
194
49.5k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
49.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
49.5k
        int padding_elems = num_elems_after_padding - _count;
199
49.5k
        int padding_bytes = padding_elems * final_size_of_type;
200
2.19M
        for (int i = 0; i < padding_bytes; i++) {
201
2.14M
            _data.push_back(0);
202
2.14M
        }
203
204
        // reserve enough place for compression
205
49.5k
        _buffer.resize(
206
49.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
49.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
49.5k
        int64_t bytes =
210
49.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
49.5k
                                         num_elems_after_padding, final_size_of_type, 0);
212
49.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
49.5k
        encode_fixed32_le(&_buffer[0], _count);
222
49.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
49.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
49.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
49.5k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
49.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
49.5k
        return _buffer.build();
229
49.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
9.17k
    OwnedSlice _finish(int final_size_of_type) {
194
9.17k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
9.17k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
9.17k
        int padding_elems = num_elems_after_padding - _count;
199
9.17k
        int padding_bytes = padding_elems * final_size_of_type;
200
191k
        for (int i = 0; i < padding_bytes; i++) {
201
182k
            _data.push_back(0);
202
182k
        }
203
204
        // reserve enough place for compression
205
9.17k
        _buffer.resize(
206
9.17k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
9.17k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
9.17k
        int64_t bytes =
210
9.17k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
9.17k
                                         num_elems_after_padding, final_size_of_type, 0);
212
9.17k
        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.17k
        encode_fixed32_le(&_buffer[0], _count);
222
9.17k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
9.17k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
9.17k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
9.17k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
9.17k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
9.17k
        return _buffer.build();
229
9.17k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
12.2k
    OwnedSlice _finish(int final_size_of_type) {
194
12.2k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
12.2k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
12.2k
        int padding_elems = num_elems_after_padding - _count;
199
12.2k
        int padding_bytes = padding_elems * final_size_of_type;
200
486k
        for (int i = 0; i < padding_bytes; i++) {
201
473k
            _data.push_back(0);
202
473k
        }
203
204
        // reserve enough place for compression
205
12.2k
        _buffer.resize(
206
12.2k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
12.2k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
12.2k
        int64_t bytes =
210
12.2k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
12.2k
                                         num_elems_after_padding, final_size_of_type, 0);
212
12.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
12.2k
        encode_fixed32_le(&_buffer[0], _count);
222
12.2k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
12.2k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
12.2k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
12.2k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
12.2k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
12.2k
        return _buffer.build();
229
12.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
344
    OwnedSlice _finish(int final_size_of_type) {
194
344
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
344
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
344
        int padding_elems = num_elems_after_padding - _count;
199
344
        int padding_bytes = padding_elems * final_size_of_type;
200
5.15k
        for (int i = 0; i < padding_bytes; i++) {
201
4.81k
            _data.push_back(0);
202
4.81k
        }
203
204
        // reserve enough place for compression
205
344
        _buffer.resize(
206
344
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
344
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
344
        int64_t bytes =
210
344
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
344
                                         num_elems_after_padding, final_size_of_type, 0);
212
344
        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
344
        encode_fixed32_le(&_buffer[0], _count);
222
344
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
344
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
344
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
344
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
344
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
344
        return _buffer.build();
229
344
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
193
32.7k
    OwnedSlice _finish(int final_size_of_type) {
194
32.7k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
32.7k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
32.7k
        int padding_elems = num_elems_after_padding - _count;
199
32.7k
        int padding_bytes = padding_elems * final_size_of_type;
200
689k
        for (int i = 0; i < padding_bytes; i++) {
201
656k
            _data.push_back(0);
202
656k
        }
203
204
        // reserve enough place for compression
205
32.7k
        _buffer.resize(
206
32.7k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
32.7k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
32.7k
        int64_t bytes =
210
32.7k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
32.7k
                                         num_elems_after_padding, final_size_of_type, 0);
212
32.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
32.7k
        encode_fixed32_le(&_buffer[0], _count);
222
32.7k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
32.7k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
32.7k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
32.7k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
32.7k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
32.7k
        return _buffer.build();
229
32.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
193
39.5k
    OwnedSlice _finish(int final_size_of_type) {
194
39.5k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
39.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
39.5k
        int padding_elems = num_elems_after_padding - _count;
199
39.5k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.65M
        for (int i = 0; i < padding_bytes; i++) {
201
1.61M
            _data.push_back(0);
202
1.61M
        }
203
204
        // reserve enough place for compression
205
39.5k
        _buffer.resize(
206
39.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
39.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
39.5k
        int64_t bytes =
210
39.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
39.5k
                                         num_elems_after_padding, final_size_of_type, 0);
212
39.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
39.5k
        encode_fixed32_le(&_buffer[0], _count);
222
39.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
39.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
39.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
39.5k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
39.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
39.5k
        return _buffer.build();
229
39.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
193
587
    OwnedSlice _finish(int final_size_of_type) {
194
587
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
587
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
587
        int padding_elems = num_elems_after_padding - _count;
199
587
        int padding_bytes = padding_elems * final_size_of_type;
200
13.3k
        for (int i = 0; i < padding_bytes; i++) {
201
12.8k
            _data.push_back(0);
202
12.8k
        }
203
204
        // reserve enough place for compression
205
587
        _buffer.resize(
206
587
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
587
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
587
        int64_t bytes =
210
587
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
587
                                         num_elems_after_padding, final_size_of_type, 0);
212
587
        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
587
        encode_fixed32_le(&_buffer[0], _count);
222
587
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
587
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
587
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
587
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
587
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
587
        return _buffer.build();
229
587
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
Line
Count
Source
193
7.27k
    OwnedSlice _finish(int final_size_of_type) {
194
7.27k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.27k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.27k
        int padding_elems = num_elems_after_padding - _count;
199
7.27k
        int padding_bytes = padding_elems * final_size_of_type;
200
379k
        for (int i = 0; i < padding_bytes; i++) {
201
372k
            _data.push_back(0);
202
372k
        }
203
204
        // reserve enough place for compression
205
7.27k
        _buffer.resize(
206
7.27k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.27k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.27k
        int64_t bytes =
210
7.27k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.27k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.27k
        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.27k
        encode_fixed32_le(&_buffer[0], _count);
222
7.27k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.27k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.27k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.27k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.27k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.27k
        return _buffer.build();
229
7.27k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
193
252
    OwnedSlice _finish(int final_size_of_type) {
194
252
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
252
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
252
        int padding_elems = num_elems_after_padding - _count;
199
252
        int padding_bytes = padding_elems * final_size_of_type;
200
15.7k
        for (int i = 0; i < padding_bytes; i++) {
201
15.5k
            _data.push_back(0);
202
15.5k
        }
203
204
        // reserve enough place for compression
205
252
        _buffer.resize(
206
252
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
252
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
252
        int64_t bytes =
210
252
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
252
                                         num_elems_after_padding, final_size_of_type, 0);
212
252
        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
252
        encode_fixed32_le(&_buffer[0], _count);
222
252
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
252
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
252
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
252
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
252
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
252
        return _buffer.build();
229
252
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
193
7.33k
    OwnedSlice _finish(int final_size_of_type) {
194
7.33k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.33k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.33k
        int padding_elems = num_elems_after_padding - _count;
199
7.33k
        int padding_bytes = padding_elems * final_size_of_type;
200
98.8k
        for (int i = 0; i < padding_bytes; i++) {
201
91.4k
            _data.push_back(0);
202
91.4k
        }
203
204
        // reserve enough place for compression
205
7.33k
        _buffer.resize(
206
7.33k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.33k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.33k
        int64_t bytes =
210
7.33k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.33k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.33k
        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.33k
        encode_fixed32_le(&_buffer[0], _count);
222
7.33k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.33k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.33k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.33k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.33k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.33k
        return _buffer.build();
229
7.33k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
17.6k
    OwnedSlice _finish(int final_size_of_type) {
194
17.6k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
17.6k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
17.6k
        int padding_elems = num_elems_after_padding - _count;
199
17.6k
        int padding_bytes = padding_elems * final_size_of_type;
200
453k
        for (int i = 0; i < padding_bytes; i++) {
201
435k
            _data.push_back(0);
202
435k
        }
203
204
        // reserve enough place for compression
205
17.6k
        _buffer.resize(
206
17.6k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
17.6k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
17.6k
        int64_t bytes =
210
17.6k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
17.6k
                                         num_elems_after_padding, final_size_of_type, 0);
212
17.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
17.6k
        encode_fixed32_le(&_buffer[0], _count);
222
17.6k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
17.6k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
17.6k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
17.6k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
17.6k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
17.6k
        return _buffer.build();
229
17.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
193
13.5k
    OwnedSlice _finish(int final_size_of_type) {
194
13.5k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
13.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
13.5k
        int padding_elems = num_elems_after_padding - _count;
199
13.5k
        int padding_bytes = padding_elems * final_size_of_type;
200
885k
        for (int i = 0; i < padding_bytes; i++) {
201
872k
            _data.push_back(0);
202
872k
        }
203
204
        // reserve enough place for compression
205
13.5k
        _buffer.resize(
206
13.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
13.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
13.5k
        int64_t bytes =
210
13.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
13.5k
                                         num_elems_after_padding, final_size_of_type, 0);
212
13.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
13.5k
        encode_fixed32_le(&_buffer[0], _count);
222
13.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
13.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
13.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
13.5k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
13.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
13.5k
        return _buffer.build();
229
13.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE7_finishEi
Line
Count
Source
193
1.20k
    OwnedSlice _finish(int final_size_of_type) {
194
1.20k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
1.20k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
1.20k
        int padding_elems = num_elems_after_padding - _count;
199
1.20k
        int padding_bytes = padding_elems * final_size_of_type;
200
186k
        for (int i = 0; i < padding_bytes; i++) {
201
185k
            _data.push_back(0);
202
185k
        }
203
204
        // reserve enough place for compression
205
1.20k
        _buffer.resize(
206
1.20k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
1.20k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
1.20k
        int64_t bytes =
210
1.20k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
1.20k
                                         num_elems_after_padding, final_size_of_type, 0);
212
1.20k
        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.20k
        encode_fixed32_le(&_buffer[0], _count);
222
1.20k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
1.20k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
1.20k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
1.20k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
1.20k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
1.20k
        return _buffer.build();
229
1.20k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Line
Count
Source
193
843
    OwnedSlice _finish(int final_size_of_type) {
194
843
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
843
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
843
        int padding_elems = num_elems_after_padding - _count;
199
843
        int padding_bytes = padding_elems * final_size_of_type;
200
17.8k
        for (int i = 0; i < padding_bytes; i++) {
201
17.0k
            _data.push_back(0);
202
17.0k
        }
203
204
        // reserve enough place for compression
205
843
        _buffer.resize(
206
843
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
843
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
843
        int64_t bytes =
210
843
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
843
                                         num_elems_after_padding, final_size_of_type, 0);
212
843
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
843
        encode_fixed32_le(&_buffer[0], _count);
222
843
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
843
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
843
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
843
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
843
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
843
        return _buffer.build();
229
843
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
193
739
    OwnedSlice _finish(int final_size_of_type) {
194
739
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
739
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
739
        int padding_elems = num_elems_after_padding - _count;
199
739
        int padding_bytes = padding_elems * final_size_of_type;
200
59.6k
        for (int i = 0; i < padding_bytes; i++) {
201
58.8k
            _data.push_back(0);
202
58.8k
        }
203
204
        // reserve enough place for compression
205
739
        _buffer.resize(
206
739
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
739
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
739
        int64_t bytes =
210
739
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
739
                                         num_elems_after_padding, final_size_of_type, 0);
212
739
        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
739
        encode_fixed32_le(&_buffer[0], _count);
222
739
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
739
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
739
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
739
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
739
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
739
        return _buffer.build();
229
739
    }
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
2.55M
                                       int& size_of_element) {
253
2.55M
    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
2.55M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
2.55M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
2.55M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
2.55M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
2.55M
    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
2.55M
    switch (size_of_element) {
271
306k
    case 1:
272
329k
    case 2:
273
333k
    case 3:
274
1.71M
    case 4:
275
2.45M
    case 8:
276
2.46M
    case 12:
277
2.55M
    case 16:
278
2.55M
    case 32:
279
2.55M
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
2.55M
    }
283
2.55M
    return Status::OK();
284
2.55M
}
285
286
template <FieldType Type>
287
class BitShufflePageDecoder : public PageDecoder {
288
public:
289
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
290
1.29M
            : _data(data),
291
1.29M
              _options(options),
292
1.29M
              _parsed(false),
293
1.29M
              _num_elements(0),
294
1.29M
              _num_element_after_padding(0),
295
1.29M
              _size_of_element(0),
296
1.29M
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
610k
            : _data(data),
291
610k
              _options(options),
292
610k
              _parsed(false),
293
610k
              _num_elements(0),
294
610k
              _num_element_after_padding(0),
295
610k
              _size_of_element(0),
296
610k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
169k
            : _data(data),
291
169k
              _options(options),
292
169k
              _parsed(false),
293
169k
              _num_elements(0),
294
169k
              _num_element_after_padding(0),
295
169k
              _size_of_element(0),
296
169k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
11.3k
            : _data(data),
291
11.3k
              _options(options),
292
11.3k
              _parsed(false),
293
11.3k
              _num_elements(0),
294
11.3k
              _num_element_after_padding(0),
295
11.3k
              _size_of_element(0),
296
11.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
147k
            : _data(data),
291
147k
              _options(options),
292
147k
              _parsed(false),
293
147k
              _num_elements(0),
294
147k
              _num_element_after_padding(0),
295
147k
              _size_of_element(0),
296
147k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
16.9k
            : _data(data),
291
16.9k
              _options(options),
292
16.9k
              _parsed(false),
293
16.9k
              _num_elements(0),
294
16.9k
              _num_element_after_padding(0),
295
16.9k
              _size_of_element(0),
296
16.9k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
73.4k
            : _data(data),
291
73.4k
              _options(options),
292
73.4k
              _parsed(false),
293
73.4k
              _num_elements(0),
294
73.4k
              _num_element_after_padding(0),
295
73.4k
              _size_of_element(0),
296
73.4k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
17.7k
            : _data(data),
291
17.7k
              _options(options),
292
17.7k
              _parsed(false),
293
17.7k
              _num_elements(0),
294
17.7k
              _num_element_after_padding(0),
295
17.7k
              _size_of_element(0),
296
17.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
27.7k
            : _data(data),
291
27.7k
              _options(options),
292
27.7k
              _parsed(false),
293
27.7k
              _num_elements(0),
294
27.7k
              _num_element_after_padding(0),
295
27.7k
              _size_of_element(0),
296
27.7k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
2.08k
            : _data(data),
291
2.08k
              _options(options),
292
2.08k
              _parsed(false),
293
2.08k
              _num_elements(0),
294
2.08k
              _num_element_after_padding(0),
295
2.08k
              _size_of_element(0),
296
2.08k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
54.2k
            : _data(data),
291
54.2k
              _options(options),
292
54.2k
              _parsed(false),
293
54.2k
              _num_elements(0),
294
54.2k
              _num_element_after_padding(0),
295
54.2k
              _size_of_element(0),
296
54.2k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
64.0k
            : _data(data),
291
64.0k
              _options(options),
292
64.0k
              _parsed(false),
293
64.0k
              _num_elements(0),
294
64.0k
              _num_element_after_padding(0),
295
64.0k
              _size_of_element(0),
296
64.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
2.74k
            : _data(data),
291
2.74k
              _options(options),
292
2.74k
              _parsed(false),
293
2.74k
              _num_elements(0),
294
2.74k
              _num_element_after_padding(0),
295
2.74k
              _size_of_element(0),
296
2.74k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
14.7k
            : _data(data),
291
14.7k
              _options(options),
292
14.7k
              _parsed(false),
293
14.7k
              _num_elements(0),
294
14.7k
              _num_element_after_padding(0),
295
14.7k
              _size_of_element(0),
296
14.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.35k
            : _data(data),
291
1.35k
              _options(options),
292
1.35k
              _parsed(false),
293
1.35k
              _num_elements(0),
294
1.35k
              _num_element_after_padding(0),
295
1.35k
              _size_of_element(0),
296
1.35k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
12.0k
            : _data(data),
291
12.0k
              _options(options),
292
12.0k
              _parsed(false),
293
12.0k
              _num_elements(0),
294
12.0k
              _num_element_after_padding(0),
295
12.0k
              _size_of_element(0),
296
12.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
40.1k
            : _data(data),
291
40.1k
              _options(options),
292
40.1k
              _parsed(false),
293
40.1k
              _num_elements(0),
294
40.1k
              _num_element_after_padding(0),
295
40.1k
              _size_of_element(0),
296
40.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
28.1k
            : _data(data),
291
28.1k
              _options(options),
292
28.1k
              _parsed(false),
293
28.1k
              _num_elements(0),
294
28.1k
              _num_element_after_padding(0),
295
28.1k
              _size_of_element(0),
296
28.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.78k
            : _data(data),
291
1.78k
              _options(options),
292
1.78k
              _parsed(false),
293
1.78k
              _num_elements(0),
294
1.78k
              _num_element_after_padding(0),
295
1.78k
              _size_of_element(0),
296
1.78k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.20k
            : _data(data),
291
1.20k
              _options(options),
292
1.20k
              _parsed(false),
293
1.20k
              _num_elements(0),
294
1.20k
              _num_element_after_padding(0),
295
1.20k
              _size_of_element(0),
296
1.20k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.11k
            : _data(data),
291
1.11k
              _options(options),
292
1.11k
              _parsed(false),
293
1.11k
              _num_elements(0),
294
1.11k
              _num_element_after_padding(0),
295
1.11k
              _size_of_element(0),
296
1.11k
              _cur_index(0) {}
297
298
1.29M
    Status init() override {
299
1.29M
        CHECK(!_parsed);
300
1.29M
        size_t unused;
301
1.29M
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.29M
                                                 _num_element_after_padding, _size_of_element));
303
304
1.29M
        if (_data.size !=
305
1.29M
            _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.29M
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.29M
                     _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.29M
        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.29M
        _parsed = true;
325
1.29M
        return Status::OK();
326
1.29M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
298
609k
    Status init() override {
299
609k
        CHECK(!_parsed);
300
609k
        size_t unused;
301
609k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
609k
                                                 _num_element_after_padding, _size_of_element));
303
304
609k
        if (_data.size !=
305
609k
            _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
609k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
609k
                     _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
609k
        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
609k
        _parsed = true;
325
609k
        return Status::OK();
326
609k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
169k
    Status init() override {
299
169k
        CHECK(!_parsed);
300
169k
        size_t unused;
301
169k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
169k
                                                 _num_element_after_padding, _size_of_element));
303
304
169k
        if (_data.size !=
305
169k
            _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
169k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
169k
                     _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
169k
        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
169k
        _parsed = true;
325
169k
        return Status::OK();
326
169k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
11.3k
    Status init() override {
299
11.3k
        CHECK(!_parsed);
300
11.3k
        size_t unused;
301
11.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
11.3k
                                                 _num_element_after_padding, _size_of_element));
303
304
11.3k
        if (_data.size !=
305
11.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
11.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
11.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
11.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
11.3k
        _parsed = true;
325
11.3k
        return Status::OK();
326
11.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
147k
    Status init() override {
299
147k
        CHECK(!_parsed);
300
147k
        size_t unused;
301
147k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
147k
                                                 _num_element_after_padding, _size_of_element));
303
304
147k
        if (_data.size !=
305
147k
            _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
147k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
147k
                     _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
147k
        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
147k
        _parsed = true;
325
147k
        return Status::OK();
326
147k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
298
16.9k
    Status init() override {
299
16.9k
        CHECK(!_parsed);
300
16.9k
        size_t unused;
301
16.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
16.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
16.9k
        if (_data.size !=
305
16.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
16.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
16.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
16.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
16.9k
        _parsed = true;
325
16.9k
        return Status::OK();
326
16.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
298
73.3k
    Status init() override {
299
73.3k
        CHECK(!_parsed);
300
73.3k
        size_t unused;
301
73.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
73.3k
                                                 _num_element_after_padding, _size_of_element));
303
304
73.3k
        if (_data.size !=
305
73.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
73.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
73.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
73.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
73.3k
        _parsed = true;
325
73.3k
        return Status::OK();
326
73.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
298
17.7k
    Status init() override {
299
17.7k
        CHECK(!_parsed);
300
17.7k
        size_t unused;
301
17.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
17.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
17.7k
        if (_data.size !=
305
17.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
17.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
17.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
17.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
17.7k
        _parsed = true;
325
17.7k
        return Status::OK();
326
17.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
298
27.6k
    Status init() override {
299
27.6k
        CHECK(!_parsed);
300
27.6k
        size_t unused;
301
27.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
27.6k
                                                 _num_element_after_padding, _size_of_element));
303
304
27.6k
        if (_data.size !=
305
27.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
27.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
27.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
27.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
27.6k
        _parsed = true;
325
27.6k
        return Status::OK();
326
27.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
2.08k
    Status init() override {
299
2.08k
        CHECK(!_parsed);
300
2.08k
        size_t unused;
301
2.08k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
2.08k
                                                 _num_element_after_padding, _size_of_element));
303
304
2.08k
        if (_data.size !=
305
2.08k
            _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.08k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
2.08k
                     _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.08k
        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.08k
        _parsed = true;
325
2.08k
        return Status::OK();
326
2.08k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
54.2k
    Status init() override {
299
54.2k
        CHECK(!_parsed);
300
54.2k
        size_t unused;
301
54.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
54.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
54.2k
        if (_data.size !=
305
54.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
54.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
54.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
54.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
54.2k
        _parsed = true;
325
54.2k
        return Status::OK();
326
54.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
298
63.9k
    Status init() override {
299
63.9k
        CHECK(!_parsed);
300
63.9k
        size_t unused;
301
63.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
63.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
63.9k
        if (_data.size !=
305
63.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
63.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
63.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
63.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
63.9k
        _parsed = true;
325
63.9k
        return Status::OK();
326
63.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
298
2.74k
    Status init() override {
299
2.74k
        CHECK(!_parsed);
300
2.74k
        size_t unused;
301
2.74k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
2.74k
                                                 _num_element_after_padding, _size_of_element));
303
304
2.74k
        if (_data.size !=
305
2.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
2.74k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
2.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
2.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
2.74k
        _parsed = true;
325
2.74k
        return Status::OK();
326
2.74k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
298
14.7k
    Status init() override {
299
14.7k
        CHECK(!_parsed);
300
14.7k
        size_t unused;
301
14.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
14.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
14.7k
        if (_data.size !=
305
14.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
14.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
14.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
14.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
14.7k
        _parsed = true;
325
14.7k
        return Status::OK();
326
14.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
298
1.35k
    Status init() override {
299
1.35k
        CHECK(!_parsed);
300
1.35k
        size_t unused;
301
1.35k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.35k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.35k
        if (_data.size !=
305
1.35k
            _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.35k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.35k
                     _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.35k
        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.35k
        _parsed = true;
325
1.35k
        return Status::OK();
326
1.35k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
298
12.0k
    Status init() override {
299
12.0k
        CHECK(!_parsed);
300
12.0k
        size_t unused;
301
12.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
12.0k
                                                 _num_element_after_padding, _size_of_element));
303
304
12.0k
        if (_data.size !=
305
12.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
12.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
12.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
12.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
12.0k
        _parsed = true;
325
12.0k
        return Status::OK();
326
12.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
298
40.1k
    Status init() override {
299
40.1k
        CHECK(!_parsed);
300
40.1k
        size_t unused;
301
40.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
40.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
40.1k
        if (_data.size !=
305
40.1k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
40.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
40.1k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
40.1k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
40.1k
        _parsed = true;
325
40.1k
        return Status::OK();
326
40.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
298
28.1k
    Status init() override {
299
28.1k
        CHECK(!_parsed);
300
28.1k
        size_t unused;
301
28.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
28.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
28.1k
        if (_data.size !=
305
28.1k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
28.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
28.1k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
28.1k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
28.1k
        _parsed = true;
325
28.1k
        return Status::OK();
326
28.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
298
1.78k
    Status init() override {
299
1.78k
        CHECK(!_parsed);
300
1.78k
        size_t unused;
301
1.78k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.78k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.78k
        if (_data.size !=
305
1.78k
            _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.78k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.78k
                     _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.78k
        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.78k
        _parsed = true;
325
1.78k
        return Status::OK();
326
1.78k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
298
1.20k
    Status init() override {
299
1.20k
        CHECK(!_parsed);
300
1.20k
        size_t unused;
301
1.20k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.20k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.20k
        if (_data.size !=
305
1.20k
            _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.20k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.20k
                     _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.20k
        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.20k
        _parsed = true;
325
1.20k
        return Status::OK();
326
1.20k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
298
1.11k
    Status init() override {
299
1.11k
        CHECK(!_parsed);
300
1.11k
        size_t unused;
301
1.11k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.11k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.11k
        if (_data.size !=
305
1.11k
            _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.11k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.11k
                     _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.11k
        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.11k
        _parsed = true;
325
1.11k
        return Status::OK();
326
1.11k
    }
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
4.51M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
4.51M
        if (_num_elements == 0) [[unlikely]] {
337
10.1k
            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.1k
        }
342
343
4.51M
        DCHECK_LE(pos, _num_elements);
344
4.51M
        _cur_index = pos;
345
4.51M
        return Status::OK();
346
4.51M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.89M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
1.89M
        if (_num_elements == 0) [[unlikely]] {
337
4.74k
            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.74k
        }
342
343
1.89M
        DCHECK_LE(pos, _num_elements);
344
1.89M
        _cur_index = pos;
345
1.89M
        return Status::OK();
346
1.89M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
332k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
332k
        if (_num_elements == 0) [[unlikely]] {
337
440
            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
440
        }
342
343
332k
        DCHECK_LE(pos, _num_elements);
344
332k
        _cur_index = pos;
345
332k
        return Status::OK();
346
332k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
241k
    Status seek_to_position_in_page(size_t pos) override {
335
241k
        DCHECK(_parsed) << "Must call init()";
336
241k
        if (_num_elements == 0) [[unlikely]] {
337
1.35k
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
1.35k
        }
342
343
241k
        DCHECK_LE(pos, _num_elements);
344
241k
        _cur_index = pos;
345
241k
        return Status::OK();
346
241k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
247k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
247k
        if (_num_elements == 0) [[unlikely]] {
337
718
            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
718
        }
342
343
247k
        DCHECK_LE(pos, _num_elements);
344
247k
        _cur_index = pos;
345
247k
        return Status::OK();
346
247k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_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
6
            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
6
        }
342
343
122k
        DCHECK_LE(pos, _num_elements);
344
122k
        _cur_index = pos;
345
122k
        return Status::OK();
346
122k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
334
11.8k
    Status seek_to_position_in_page(size_t pos) override {
335
11.8k
        DCHECK(_parsed) << "Must call init()";
336
11.8k
        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
11.8k
        DCHECK_LE(pos, _num_elements);
344
11.8k
        _cur_index = pos;
345
11.8k
        return Status::OK();
346
11.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
244k
    Status seek_to_position_in_page(size_t pos) override {
335
244k
        DCHECK(_parsed) << "Must call init()";
336
244k
        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
244k
        DCHECK_LE(pos, _num_elements);
344
244k
        _cur_index = pos;
345
244k
        return Status::OK();
346
244k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
334
219k
    Status seek_to_position_in_page(size_t pos) override {
335
219k
        DCHECK(_parsed) << "Must call init()";
336
219k
        if (_num_elements == 0) [[unlikely]] {
337
2
            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
        }
342
343
219k
        DCHECK_LE(pos, _num_elements);
344
219k
        _cur_index = pos;
345
219k
        return Status::OK();
346
219k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
334
233k
    Status seek_to_position_in_page(size_t pos) override {
335
233k
        DCHECK(_parsed) << "Must call init()";
336
233k
        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
233k
        DCHECK_LE(pos, _num_elements);
344
233k
        _cur_index = pos;
345
233k
        return Status::OK();
346
233k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
334
526k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
526k
        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
526k
        DCHECK_LE(pos, _num_elements);
344
526k
        _cur_index = pos;
345
526k
        return Status::OK();
346
526k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
334
72.5k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
72.5k
        if (_num_elements == 0) [[unlikely]] {
337
18
            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
18
        }
342
343
72.5k
        DCHECK_LE(pos, _num_elements);
344
72.5k
        _cur_index = pos;
345
72.5k
        return Status::OK();
346
72.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
214k
    Status seek_to_position_in_page(size_t pos) override {
335
214k
        DCHECK(_parsed) << "Must call init()";
336
214k
        if (_num_elements == 0) [[unlikely]] {
337
8
            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
8
        }
342
343
214k
        DCHECK_LE(pos, _num_elements);
344
214k
        _cur_index = pos;
345
214k
        return Status::OK();
346
214k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
334
6.64k
    Status seek_to_position_in_page(size_t pos) override {
335
6.64k
        DCHECK(_parsed) << "Must call init()";
336
6.64k
        if (_num_elements == 0) [[unlikely]] {
337
353
            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
353
        }
342
343
6.64k
        DCHECK_LE(pos, _num_elements);
344
6.64k
        _cur_index = pos;
345
6.64k
        return Status::OK();
346
6.64k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_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
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
30
        DCHECK_LE(pos, _num_elements);
344
30
        _cur_index = pos;
345
30
        return Status::OK();
346
30
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Line
Count
Source
334
773
    Status seek_to_position_in_page(size_t pos) override {
335
773
        DCHECK(_parsed) << "Must call init()";
336
773
        if (_num_elements == 0) [[unlikely]] {
337
36
            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
36
        }
342
343
773
        DCHECK_LE(pos, _num_elements);
344
773
        _cur_index = pos;
345
773
        return Status::OK();
346
773
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
334
18.5k
    Status seek_to_position_in_page(size_t pos) override {
335
18.5k
        DCHECK(_parsed) << "Must call init()";
336
18.5k
        if (_num_elements == 0) [[unlikely]] {
337
1.68k
            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.68k
        }
342
343
18.5k
        DCHECK_LE(pos, _num_elements);
344
18.5k
        _cur_index = pos;
345
18.5k
        return Status::OK();
346
18.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Line
Count
Source
334
125k
    Status seek_to_position_in_page(size_t pos) override {
335
125k
        DCHECK(_parsed) << "Must call init()";
336
125k
        if (_num_elements == 0) [[unlikely]] {
337
542
            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
542
        }
342
343
125k
        DCHECK_LE(pos, _num_elements);
344
125k
        _cur_index = pos;
345
125k
        return Status::OK();
346
125k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.95k
    Status seek_to_position_in_page(size_t pos) override {
335
1.95k
        DCHECK(_parsed) << "Must call init()";
336
1.95k
        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.95k
        DCHECK_LE(pos, _num_elements);
344
1.95k
        _cur_index = pos;
345
1.95k
        return Status::OK();
346
1.95k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE24seek_to_position_in_pageEm
Line
Count
Source
334
44
    Status seek_to_position_in_page(size_t pos) override {
335
44
        DCHECK(_parsed) << "Must call init()";
336
44
        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
44
        DCHECK_LE(pos, _num_elements);
344
44
        _cur_index = pos;
345
44
        return Status::OK();
346
44
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE24seek_to_position_in_pageEm
Line
Count
Source
334
89
    Status seek_to_position_in_page(size_t pos) override {
335
89
        DCHECK(_parsed) << "Must call init()";
336
89
        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
89
        DCHECK_LE(pos, _num_elements);
344
89
        _cur_index = pos;
345
89
        return Status::OK();
346
89
    }
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.81M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.81M
        DCHECK(_parsed);
389
1.81M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.81M
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.81M
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.81M
        *n = max_fetch;
398
1.81M
        if constexpr (forward_index) {
399
1.63M
            _cur_index += max_fetch;
400
1.63M
        }
401
402
1.81M
        return Status::OK();
403
1.81M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
501k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
501k
        DCHECK(_parsed);
389
501k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
501k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
501k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
501k
        *n = max_fetch;
398
501k
        if constexpr (forward_index) {
399
501k
            _cur_index += max_fetch;
400
501k
        }
401
402
501k
        return Status::OK();
403
501k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
247k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
247k
        DCHECK(_parsed);
389
247k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
247k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
247k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
247k
        *n = max_fetch;
398
247k
        if constexpr (forward_index) {
399
247k
            _cur_index += max_fetch;
400
247k
        }
401
402
247k
        return Status::OK();
403
247k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
13.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
13.6k
        DCHECK(_parsed);
389
13.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
13.6k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
13.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
13.6k
        *n = max_fetch;
398
13.6k
        if constexpr (forward_index) {
399
13.6k
            _cur_index += max_fetch;
400
13.6k
        }
401
402
13.6k
        return Status::OK();
403
13.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
129k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
129k
        DCHECK(_parsed);
389
129k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
129k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
129k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
129k
        *n = max_fetch;
398
129k
        if constexpr (forward_index) {
399
129k
            _cur_index += max_fetch;
400
129k
        }
401
402
129k
        return Status::OK();
403
129k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
24.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
24.1k
        DCHECK(_parsed);
389
24.1k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
24.1k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
24.1k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
24.1k
        *n = max_fetch;
398
24.1k
        if constexpr (forward_index) {
399
24.1k
            _cur_index += max_fetch;
400
24.1k
        }
401
402
24.1k
        return Status::OK();
403
24.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
132k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
132k
        DCHECK(_parsed);
389
132k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
132k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
132k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
132k
        *n = max_fetch;
398
132k
        if constexpr (forward_index) {
399
132k
            _cur_index += max_fetch;
400
132k
        }
401
402
132k
        return Status::OK();
403
132k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
180k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
180k
        DCHECK(_parsed);
389
180k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
180k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
180k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
180k
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
180k
        return Status::OK();
403
180k
    }
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
13.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
13.7k
        DCHECK(_parsed);
389
13.7k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
13.7k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
13.7k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
13.7k
        *n = max_fetch;
398
13.7k
        if constexpr (forward_index) {
399
13.7k
            _cur_index += max_fetch;
400
13.7k
        }
401
402
13.7k
        return Status::OK();
403
13.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
27.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
27.7k
        DCHECK(_parsed);
389
27.7k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
27.7k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
27.7k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
27.7k
        *n = max_fetch;
398
27.7k
        if constexpr (forward_index) {
399
27.7k
            _cur_index += max_fetch;
400
27.7k
        }
401
402
27.7k
        return Status::OK();
403
27.7k
    }
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
6.32k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
6.32k
        DCHECK(_parsed);
389
6.32k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
6.32k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
6.32k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
6.32k
        *n = max_fetch;
398
6.32k
        if constexpr (forward_index) {
399
6.32k
            _cur_index += max_fetch;
400
6.32k
        }
401
402
6.32k
        return Status::OK();
403
6.32k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
379k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
379k
        DCHECK(_parsed);
389
379k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
379k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
379k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
379k
        *n = max_fetch;
398
379k
        if constexpr (forward_index) {
399
379k
            _cur_index += max_fetch;
400
379k
        }
401
402
379k
        return Status::OK();
403
379k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
75.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
75.1k
        DCHECK(_parsed);
389
75.1k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
75.1k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
75.1k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
75.1k
        *n = max_fetch;
398
75.1k
        if constexpr (forward_index) {
399
75.1k
            _cur_index += max_fetch;
400
75.1k
        }
401
402
75.1k
        return Status::OK();
403
75.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.56k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.56k
        DCHECK(_parsed);
389
1.56k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.56k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.56k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.56k
        *n = max_fetch;
398
1.56k
        if constexpr (forward_index) {
399
1.56k
            _cur_index += max_fetch;
400
1.56k
        }
401
402
1.56k
        return Status::OK();
403
1.56k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
7.52k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
7.52k
        DCHECK(_parsed);
389
7.52k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
7.52k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
7.52k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
7.52k
        *n = max_fetch;
398
7.52k
        if constexpr (forward_index) {
399
7.52k
            _cur_index += max_fetch;
400
7.52k
        }
401
402
7.52k
        return Status::OK();
403
7.52k
    }
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.25k
        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
7.25k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
7.25k
        DCHECK(_parsed);
389
7.25k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
7.25k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
7.25k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
7.25k
        *n = max_fetch;
398
7.25k
        if constexpr (forward_index) {
399
7.25k
            _cur_index += max_fetch;
400
7.25k
        }
401
402
7.25k
        return Status::OK();
403
7.25k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
28.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
28.9k
        DCHECK(_parsed);
389
28.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
28.9k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
28.9k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
28.9k
        *n = max_fetch;
398
28.9k
        if constexpr (forward_index) {
399
28.9k
            _cur_index += max_fetch;
400
28.9k
        }
401
402
28.9k
        return Status::OK();
403
28.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
22.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
22.7k
        DCHECK(_parsed);
389
22.7k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
22.7k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
22.7k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
22.7k
        *n = max_fetch;
398
22.7k
        if constexpr (forward_index) {
399
22.7k
            _cur_index += max_fetch;
400
22.7k
        }
401
402
22.7k
        return Status::OK();
403
22.7k
    }
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.20k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.20k
        DCHECK(_parsed);
389
3.20k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.20k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.20k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.20k
        *n = max_fetch;
398
3.20k
        if constexpr (forward_index) {
399
3.20k
            _cur_index += max_fetch;
400
3.20k
        }
401
402
3.20k
        return Status::OK();
403
3.20k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.26k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.26k
        DCHECK(_parsed);
389
3.26k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.26k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.26k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.26k
        *n = max_fetch;
398
3.26k
        if constexpr (forward_index) {
399
3.26k
            _cur_index += max_fetch;
400
3.26k
        }
401
402
3.26k
        return Status::OK();
403
3.26k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.26k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.26k
        DCHECK(_parsed);
389
3.26k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.26k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.26k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.26k
        *n = max_fetch;
398
3.26k
        if constexpr (forward_index) {
399
3.26k
            _cur_index += max_fetch;
400
3.26k
        }
401
402
3.26k
        return Status::OK();
403
3.26k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
404
405
1.62M
    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
501k
    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
247k
    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
13.5k
    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
129k
    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
24.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
132k
    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
13.7k
    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
27.7k
    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
6.32k
    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
379k
    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
75.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.56k
    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
7.51k
    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
7.25k
    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
28.9k
    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
22.7k
    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.20k
    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
3.26k
    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
3.26k
    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
513k
                          MutableColumnPtr& dst) override {
409
513k
        DCHECK(_parsed);
410
513k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
513k
        auto total = *n;
416
513k
        auto read_count = 0;
417
513k
        _buffer.resize(total);
418
97.7M
        for (size_t i = 0; i < total; ++i) {
419
97.2M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
97.2M
            if (UNLIKELY(ord >= _num_elements)) {
421
13.4k
                break;
422
13.4k
            }
423
424
97.2M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
97.2M
        }
426
427
514k
        if (LIKELY(read_count > 0)) {
428
514k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
514k
        }
430
431
513k
        *n = read_count;
432
513k
        return Status::OK();
433
513k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
104k
                          MutableColumnPtr& dst) override {
409
104k
        DCHECK(_parsed);
410
104k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
104k
        auto total = *n;
416
104k
        auto read_count = 0;
417
104k
        _buffer.resize(total);
418
19.1M
        for (size_t i = 0; i < total; ++i) {
419
19.0M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
19.0M
            if (UNLIKELY(ord >= _num_elements)) {
421
2.02k
                break;
422
2.02k
            }
423
424
19.0M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
19.0M
        }
426
427
104k
        if (LIKELY(read_count > 0)) {
428
104k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
104k
        }
430
431
104k
        *n = read_count;
432
104k
        return Status::OK();
433
104k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
66.7k
                          MutableColumnPtr& dst) override {
409
66.7k
        DCHECK(_parsed);
410
66.7k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
66.7k
        auto total = *n;
416
66.7k
        auto read_count = 0;
417
66.7k
        _buffer.resize(total);
418
1.86M
        for (size_t i = 0; i < total; ++i) {
419
1.79M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.79M
            if (UNLIKELY(ord >= _num_elements)) {
421
67
                break;
422
67
            }
423
424
1.79M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.79M
        }
426
427
66.7k
        if (LIKELY(read_count > 0)) {
428
66.7k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
66.7k
        }
430
431
66.7k
        *n = read_count;
432
66.7k
        return Status::OK();
433
66.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
5.22k
                          MutableColumnPtr& dst) override {
409
5.22k
        DCHECK(_parsed);
410
5.22k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
5.22k
        auto total = *n;
416
5.22k
        auto read_count = 0;
417
5.22k
        _buffer.resize(total);
418
600k
        for (size_t i = 0; i < total; ++i) {
419
594k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
594k
            if (UNLIKELY(ord >= _num_elements)) {
421
13
                break;
422
13
            }
423
424
594k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
594k
        }
426
427
5.22k
        if (LIKELY(read_count > 0)) {
428
5.22k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
5.22k
        }
430
431
5.22k
        *n = read_count;
432
5.22k
        return Status::OK();
433
5.22k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
165k
                          MutableColumnPtr& dst) override {
409
165k
        DCHECK(_parsed);
410
165k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
165k
        auto total = *n;
416
165k
        auto read_count = 0;
417
165k
        _buffer.resize(total);
418
16.6M
        for (size_t i = 0; i < total; ++i) {
419
16.5M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
16.5M
            if (UNLIKELY(ord >= _num_elements)) {
421
2.29k
                break;
422
2.29k
            }
423
424
16.5M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
16.5M
        }
426
427
165k
        if (LIKELY(read_count > 0)) {
428
165k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
165k
        }
430
431
165k
        *n = read_count;
432
165k
        return Status::OK();
433
165k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
7.88k
                          MutableColumnPtr& dst) override {
409
7.88k
        DCHECK(_parsed);
410
7.88k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
7.88k
        auto total = *n;
416
7.88k
        auto read_count = 0;
417
7.88k
        _buffer.resize(total);
418
1.24M
        for (size_t i = 0; i < total; ++i) {
419
1.24M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.24M
            if (UNLIKELY(ord >= _num_elements)) {
421
578
                break;
422
578
            }
423
424
1.24M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.24M
        }
426
427
7.88k
        if (LIKELY(read_count > 0)) {
428
7.88k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
7.88k
        }
430
431
7.88k
        *n = read_count;
432
7.88k
        return Status::OK();
433
7.88k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
27.8k
                          MutableColumnPtr& dst) override {
409
27.8k
        DCHECK(_parsed);
410
27.8k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
27.8k
        auto total = *n;
416
27.8k
        auto read_count = 0;
417
27.8k
        _buffer.resize(total);
418
486k
        for (size_t i = 0; i < total; ++i) {
419
458k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
458k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
458k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
458k
        }
426
427
27.8k
        if (LIKELY(read_count > 0)) {
428
27.8k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
27.8k
        }
430
431
27.8k
        *n = read_count;
432
27.8k
        return Status::OK();
433
27.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
8.42k
                          MutableColumnPtr& dst) override {
409
8.42k
        DCHECK(_parsed);
410
8.42k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
8.42k
        auto total = *n;
416
8.42k
        auto read_count = 0;
417
8.42k
        _buffer.resize(total);
418
1.15M
        for (size_t i = 0; i < total; ++i) {
419
1.14M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.14M
            if (UNLIKELY(ord >= _num_elements)) {
421
30
                break;
422
30
            }
423
424
1.14M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.14M
        }
426
427
8.42k
        if (LIKELY(read_count > 0)) {
428
8.42k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
8.42k
        }
430
431
8.42k
        *n = read_count;
432
8.42k
        return Status::OK();
433
8.42k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
15.0k
                          MutableColumnPtr& dst) override {
409
15.0k
        DCHECK(_parsed);
410
15.0k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
15.0k
        auto total = *n;
416
15.0k
        auto read_count = 0;
417
15.0k
        _buffer.resize(total);
418
7.05M
        for (size_t i = 0; i < total; ++i) {
419
7.03M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
7.03M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.38k
                break;
422
1.38k
            }
423
424
7.03M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
7.03M
        }
426
427
15.0k
        if (LIKELY(read_count > 0)) {
428
15.0k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
15.0k
        }
430
431
15.0k
        *n = read_count;
432
15.0k
        return Status::OK();
433
15.0k
    }
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.36k
                          MutableColumnPtr& dst) override {
409
1.36k
        DCHECK(_parsed);
410
1.36k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.36k
        auto total = *n;
416
1.36k
        auto read_count = 0;
417
1.36k
        _buffer.resize(total);
418
435k
        for (size_t i = 0; i < total; ++i) {
419
434k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
434k
            if (UNLIKELY(ord >= _num_elements)) {
421
15
                break;
422
15
            }
423
424
434k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
434k
        }
426
427
1.36k
        if (LIKELY(read_count > 0)) {
428
1.36k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.36k
        }
430
431
1.36k
        *n = read_count;
432
1.36k
        return Status::OK();
433
1.36k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
25.5k
                          MutableColumnPtr& dst) override {
409
25.5k
        DCHECK(_parsed);
410
25.5k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
25.5k
        auto total = *n;
416
25.5k
        auto read_count = 0;
417
25.5k
        _buffer.resize(total);
418
6.53M
        for (size_t i = 0; i < total; ++i) {
419
6.51M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
6.51M
            if (UNLIKELY(ord >= _num_elements)) {
421
681
                break;
422
681
            }
423
424
6.51M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
6.51M
        }
426
427
25.5k
        if (LIKELY(read_count > 0)) {
428
25.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
25.5k
        }
430
431
25.5k
        *n = read_count;
432
25.5k
        return Status::OK();
433
25.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
29.7k
                          MutableColumnPtr& dst) override {
409
29.7k
        DCHECK(_parsed);
410
29.7k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
29.7k
        auto total = *n;
416
29.7k
        auto read_count = 0;
417
29.7k
        _buffer.resize(total);
418
9.62M
        for (size_t i = 0; i < total; ++i) {
419
9.59M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.59M
            if (UNLIKELY(ord >= _num_elements)) {
421
204
                break;
422
204
            }
423
424
9.59M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.59M
        }
426
427
29.7k
        if (LIKELY(read_count > 0)) {
428
29.7k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
29.7k
        }
430
431
29.7k
        *n = read_count;
432
29.7k
        return Status::OK();
433
29.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1.69k
                          MutableColumnPtr& dst) override {
409
1.69k
        DCHECK(_parsed);
410
1.69k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.69k
        auto total = *n;
416
1.69k
        auto read_count = 0;
417
1.69k
        _buffer.resize(total);
418
433k
        for (size_t i = 0; i < total; ++i) {
419
431k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
431k
            if (UNLIKELY(ord >= _num_elements)) {
421
245
                break;
422
245
            }
423
424
431k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
431k
        }
426
427
1.69k
        if (LIKELY(read_count > 0)) {
428
1.69k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.69k
        }
430
431
1.69k
        *n = read_count;
432
1.69k
        return Status::OK();
433
1.69k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
11.6k
                          MutableColumnPtr& dst) override {
409
11.6k
        DCHECK(_parsed);
410
11.6k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
11.6k
        auto total = *n;
416
11.6k
        auto read_count = 0;
417
11.6k
        _buffer.resize(total);
418
24.7k
        for (size_t i = 0; i < total; ++i) {
419
13.1k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
13.1k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
13.1k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
13.1k
        }
426
427
11.6k
        if (LIKELY(read_count > 0)) {
428
11.6k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
11.6k
        }
430
431
11.6k
        *n = read_count;
432
11.6k
        return Status::OK();
433
11.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
128
                          MutableColumnPtr& dst) override {
409
128
        DCHECK(_parsed);
410
128
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
128
        auto total = *n;
416
128
        auto read_count = 0;
417
128
        _buffer.resize(total);
418
261
        for (size_t i = 0; i < total; ++i) {
419
133
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
133
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
133
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
133
        }
426
427
128
        if (LIKELY(read_count > 0)) {
428
128
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
128
        }
430
431
128
        *n = read_count;
432
128
        return Status::OK();
433
128
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
3.65k
                          MutableColumnPtr& dst) override {
409
3.65k
        DCHECK(_parsed);
410
3.65k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
3.65k
        auto total = *n;
416
3.65k
        auto read_count = 0;
417
3.65k
        _buffer.resize(total);
418
16.9k
        for (size_t i = 0; i < total; ++i) {
419
13.2k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
13.2k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
13.2k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
13.2k
        }
426
427
3.65k
        if (LIKELY(read_count > 0)) {
428
3.65k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
3.65k
        }
430
431
3.65k
        *n = read_count;
432
3.65k
        return Status::OK();
433
3.65k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
25.5k
                          MutableColumnPtr& dst) override {
409
25.5k
        DCHECK(_parsed);
410
25.5k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
25.5k
        auto total = *n;
416
25.5k
        auto read_count = 0;
417
25.5k
        _buffer.resize(total);
418
23.5M
        for (size_t i = 0; i < total; ++i) {
419
23.5M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
23.5M
            if (UNLIKELY(ord >= _num_elements)) {
421
5.21k
                break;
422
5.21k
            }
423
424
23.4M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
23.4M
        }
426
427
25.5k
        if (LIKELY(read_count > 0)) {
428
25.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
25.5k
        }
430
431
25.5k
        *n = read_count;
432
25.5k
        return Status::OK();
433
25.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
11.6k
                          MutableColumnPtr& dst) override {
409
11.6k
        DCHECK(_parsed);
410
11.6k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
11.6k
        auto total = *n;
416
11.6k
        auto read_count = 0;
417
11.6k
        _buffer.resize(total);
418
8.89M
        for (size_t i = 0; i < total; ++i) {
419
8.88M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
8.88M
            if (UNLIKELY(ord >= _num_elements)) {
421
747
                break;
422
747
            }
423
424
8.88M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
8.88M
        }
426
427
11.6k
        if (LIKELY(read_count > 0)) {
428
11.6k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
11.6k
        }
430
431
11.6k
        *n = read_count;
432
11.6k
        return Status::OK();
433
11.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
964
                          MutableColumnPtr& dst) override {
409
964
        DCHECK(_parsed);
410
964
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
964
        auto total = *n;
416
964
        auto read_count = 0;
417
964
        _buffer.resize(total);
418
2.78k
        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
964
        if (LIKELY(read_count > 0)) {
428
964
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
964
        }
430
431
964
        *n = read_count;
432
964
        return Status::OK();
433
964
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
444
                          MutableColumnPtr& dst) override {
409
444
        DCHECK(_parsed);
410
444
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
444
        auto total = *n;
416
444
        auto read_count = 0;
417
444
        _buffer.resize(total);
418
1.15k
        for (size_t i = 0; i < total; ++i) {
419
707
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
707
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
707
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
707
        }
426
427
444
        if (LIKELY(read_count > 0)) {
428
443
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
443
        }
430
431
444
        *n = read_count;
432
444
        return Status::OK();
433
444
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
353
                          MutableColumnPtr& dst) override {
409
353
        DCHECK(_parsed);
410
353
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
353
        auto total = *n;
416
353
        auto read_count = 0;
417
353
        _buffer.resize(total);
418
1.22k
        for (size_t i = 0; i < total; ++i) {
419
867
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
867
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
867
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
867
        }
426
427
353
        if (LIKELY(read_count > 0)) {
428
353
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
353
        }
430
431
353
        *n = read_count;
432
353
        return Status::OK();
433
353
    }
434
435
180k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
180k
        return next_batch<false>(n, dst);
437
180k
    }
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
180k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
180k
        return next_batch<false>(n, dst);
437
180k
    }
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
4.14M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
1.96M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
441
237k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
441
236k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
279k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
441
115k
    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
242k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
214k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
441
227k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
441
244k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
441
41.0k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
441
213k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Line
Count
Source
441
1.01k
    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
2.11k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
441
2.53k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
441
119k
    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
41
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
Line
Count
Source
441
99
    size_t current_index() const override { return _cur_index; }
442
443
100M
    char* get_data(size_t index) const {
444
100M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
100M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
20.5M
    char* get_data(size_t index) const {
444
20.5M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20.5M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
2.04M
    char* get_data(size_t index) const {
444
2.04M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
2.04M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
443
608k
    char* get_data(size_t index) const {
444
608k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
608k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
443
16.6M
    char* get_data(size_t index) const {
444
16.6M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
16.6M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
1.26M
    char* get_data(size_t index) const {
444
1.26M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.26M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
770k
    char* get_data(size_t index) const {
444
770k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
770k
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
1.16M
    char* get_data(size_t index) const {
444
1.16M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.16M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
7.06M
    char* get_data(size_t index) const {
444
7.06M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
7.06M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
440k
    char* get_data(size_t index) const {
444
440k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
440k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
6.89M
    char* get_data(size_t index) const {
444
6.89M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
6.89M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
443
9.66M
    char* get_data(size_t index) const {
444
9.66M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.66M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
443
432k
    char* get_data(size_t index) const {
444
432k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
432k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
443
20.6k
    char* get_data(size_t index) const {
444
20.6k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20.6k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
443
1.38k
    char* get_data(size_t index) const {
444
1.38k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.38k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
443
20.5k
    char* get_data(size_t index) const {
444
20.5k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20.5k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
443
23.5M
    char* get_data(size_t index) const {
444
23.5M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
23.5M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
8.90M
    char* get_data(size_t index) const {
444
8.90M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
8.90M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
443
5.02k
    char* get_data(size_t index) const {
444
5.02k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
5.02k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Line
Count
Source
443
3.97k
    char* get_data(size_t index) const {
444
3.97k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
3.97k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
Line
Count
Source
443
4.13k
    char* get_data(size_t index) const {
444
4.13k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
4.13k
    }
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