Coverage Report

Created: 2026-08-06 08:56

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
706k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
345k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
38.9k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
9.36k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
75.6k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
12.0k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
95
67.5k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
95
12.3k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
95
14.9k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
334
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
37.5k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
95
42.4k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
432
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
95
7.21k
    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
9.59k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
95
11.9k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
95
16.9k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
95
1.29k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
95
926
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
95
823
    Status init() override { return reset(); }
96
97
150M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
150M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
45.7k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
9.51k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
124k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
16.8k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
68.4k
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12is_page_fullEv
Line
Count
Source
97
12.1k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
97
17.3k
    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
353
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
73.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
44.7k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
97
498
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
Line
Count
Source
97
7.23k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
97
249
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
97
5.11k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
26.4k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
97
17.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
859
    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.17M
    Status add(const uint8_t* vals, size_t* count) override {
100
1.17M
        return add_internal<false>(vals, count);
101
1.17M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
99
700k
    Status add(const uint8_t* vals, size_t* count) override {
100
700k
        return add_internal<false>(vals, count);
101
700k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
45.7k
    Status add(const uint8_t* vals, size_t* count) override {
100
45.7k
        return add_internal<false>(vals, count);
101
45.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
9.51k
    Status add(const uint8_t* vals, size_t* count) override {
100
9.51k
        return add_internal<false>(vals, count);
101
9.51k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
124k
    Status add(const uint8_t* vals, size_t* count) override {
100
124k
        return add_internal<false>(vals, count);
101
124k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
16.8k
    Status add(const uint8_t* vals, size_t* count) override {
100
16.8k
        return add_internal<false>(vals, count);
101
16.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
68.4k
    Status add(const uint8_t* vals, size_t* count) override {
100
68.4k
        return add_internal<false>(vals, count);
101
68.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
99
12.1k
    Status add(const uint8_t* vals, size_t* count) override {
100
12.1k
        return add_internal<false>(vals, count);
101
12.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
99
17.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
17.3k
        return add_internal<false>(vals, count);
101
17.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
353
    Status add(const uint8_t* vals, size_t* count) override {
100
353
        return add_internal<false>(vals, count);
101
353
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
73.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
73.3k
        return add_internal<false>(vals, count);
101
73.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
44.7k
    Status add(const uint8_t* vals, size_t* count) override {
100
44.7k
        return add_internal<false>(vals, count);
101
44.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
99
498
    Status add(const uint8_t* vals, size_t* count) override {
100
498
        return add_internal<false>(vals, count);
101
498
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
Line
Count
Source
99
7.23k
    Status add(const uint8_t* vals, size_t* count) override {
100
7.23k
        return add_internal<false>(vals, count);
101
7.23k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
249
    Status add(const uint8_t* vals, size_t* count) override {
100
249
        return add_internal<false>(vals, count);
101
249
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
99
5.11k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.11k
        return add_internal<false>(vals, count);
101
5.11k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
26.4k
    Status add(const uint8_t* vals, size_t* count) override {
100
26.4k
        return add_internal<false>(vals, count);
101
26.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
99
17.9k
    Status add(const uint8_t* vals, size_t* count) override {
100
17.9k
        return add_internal<false>(vals, count);
101
17.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
859
    Status add(const uint8_t* vals, size_t* count) override {
100
859
        return add_internal<false>(vals, count);
101
859
    }
_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
150M
    Status single_add(const uint8_t* vals, size_t* count) {
104
150M
        return add_internal<true>(vals, count);
105
150M
    }
106
107
    template <bool single>
108
148M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
148M
        DCHECK(!_finished);
110
148M
        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
148M
        uint32_t to_add = cast_set<UInt32>(
126
148M
                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
148M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
148M
        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
148M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
151M
        _count += to_add;
134
151M
        _remain_element_capacity -= to_add;
135
151M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
151M
        *num_written = to_add;
138
151M
        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
150M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
150M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
150M
                        *reinterpret_cast<const uint32_t*>(vals);
149
150M
                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
150M
        }
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
151M
        return Status::OK();
159
148M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
700k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
700k
        DCHECK(!_finished);
110
700k
        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
700k
        uint32_t to_add = cast_set<UInt32>(
126
700k
                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
700k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
700k
        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
700k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
700k
        _count += to_add;
134
700k
        _remain_element_capacity -= to_add;
135
700k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
700k
        *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
700k
        memcpy(&_data[orig_size], vals, to_add_size);
158
700k
        return Status::OK();
159
700k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
147M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
147M
        DCHECK(!_finished);
110
147M
        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
147M
        uint32_t to_add = cast_set<UInt32>(
126
147M
                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
147M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
147M
        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
147M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
150M
        _count += to_add;
134
150M
        _remain_element_capacity -= to_add;
135
150M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
150M
        *num_written = to_add;
138
150M
        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
150M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
150M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
150M
                        *reinterpret_cast<const uint32_t*>(vals);
149
150M
                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
150M
        }
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
150M
        return Status::OK();
159
147M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
45.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
45.7k
        DCHECK(!_finished);
110
45.7k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
45.7k
        uint32_t to_add = cast_set<UInt32>(
126
45.7k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
45.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
45.7k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
45.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
45.7k
        _count += to_add;
134
45.7k
        _remain_element_capacity -= to_add;
135
45.7k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
45.7k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
45.7k
        memcpy(&_data[orig_size], vals, to_add_size);
158
45.7k
        return Status::OK();
159
45.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
9.51k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
9.51k
        DCHECK(!_finished);
110
9.51k
        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.51k
        uint32_t to_add = cast_set<UInt32>(
126
9.51k
                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.51k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
9.51k
        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.51k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
9.51k
        _count += to_add;
134
9.51k
        _remain_element_capacity -= to_add;
135
9.51k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
9.51k
        *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.51k
        memcpy(&_data[orig_size], vals, to_add_size);
158
9.51k
        return Status::OK();
159
9.51k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
124k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
124k
        DCHECK(!_finished);
110
124k
        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
124k
        uint32_t to_add = cast_set<UInt32>(
126
124k
                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
124k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
124k
        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
124k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
124k
        _count += to_add;
134
124k
        _remain_element_capacity -= to_add;
135
124k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
124k
        *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
124k
        memcpy(&_data[orig_size], vals, to_add_size);
158
124k
        return Status::OK();
159
124k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
16.8k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
16.8k
        DCHECK(!_finished);
110
16.8k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
16.8k
        uint32_t to_add = cast_set<UInt32>(
126
16.8k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
16.8k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
16.8k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
16.8k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
16.8k
        _count += to_add;
134
16.8k
        _remain_element_capacity -= to_add;
135
16.8k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
16.8k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
16.8k
        memcpy(&_data[orig_size], vals, to_add_size);
158
16.8k
        return Status::OK();
159
16.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
68.4k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
68.4k
        DCHECK(!_finished);
110
68.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
68.4k
        uint32_t to_add = cast_set<UInt32>(
126
68.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
68.4k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
68.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
68.4k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
68.4k
        _count += to_add;
134
68.4k
        _remain_element_capacity -= to_add;
135
68.4k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
68.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
68.4k
        memcpy(&_data[orig_size], vals, to_add_size);
158
68.4k
        return Status::OK();
159
68.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
12.1k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
12.1k
        DCHECK(!_finished);
110
12.1k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
12.1k
        uint32_t to_add = cast_set<UInt32>(
126
12.1k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
12.1k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
12.1k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
12.1k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
12.1k
        _count += to_add;
134
12.1k
        _remain_element_capacity -= to_add;
135
12.1k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
12.1k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
12.1k
        memcpy(&_data[orig_size], vals, to_add_size);
158
12.1k
        return Status::OK();
159
12.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
17.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
17.3k
        DCHECK(!_finished);
110
17.3k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
17.3k
        uint32_t to_add = cast_set<UInt32>(
126
17.3k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
17.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
17.3k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
17.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
17.3k
        _count += to_add;
134
17.3k
        _remain_element_capacity -= to_add;
135
17.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
17.3k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
17.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
17.3k
        return Status::OK();
159
17.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
353
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
353
        DCHECK(!_finished);
110
353
        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
353
        uint32_t to_add = cast_set<UInt32>(
126
353
                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
353
        int to_add_size = to_add * SIZE_OF_TYPE;
129
353
        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
353
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
353
        _count += to_add;
134
353
        _remain_element_capacity -= to_add;
135
353
        _raw_data_size += to_add_size;
136
        // return added number through count
137
353
        *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
353
        memcpy(&_data[orig_size], vals, to_add_size);
158
353
        return Status::OK();
159
353
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
73.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
73.3k
        DCHECK(!_finished);
110
73.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
73.3k
        uint32_t to_add = cast_set<UInt32>(
126
73.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
73.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
73.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
73.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
73.3k
        _count += to_add;
134
73.3k
        _remain_element_capacity -= to_add;
135
73.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
73.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
73.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
73.3k
        return Status::OK();
159
73.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
44.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
44.7k
        DCHECK(!_finished);
110
44.7k
        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
44.7k
        uint32_t to_add = cast_set<UInt32>(
126
44.7k
                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
44.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
44.7k
        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
44.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
44.7k
        _count += to_add;
134
44.7k
        _remain_element_capacity -= to_add;
135
44.7k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
44.7k
        *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
44.7k
        memcpy(&_data[orig_size], vals, to_add_size);
158
44.7k
        return Status::OK();
159
44.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
498
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
498
        DCHECK(!_finished);
110
498
        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
498
        uint32_t to_add = cast_set<UInt32>(
126
498
                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
498
        int to_add_size = to_add * SIZE_OF_TYPE;
129
498
        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
498
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
498
        _count += to_add;
134
498
        _remain_element_capacity -= to_add;
135
498
        _raw_data_size += to_add_size;
136
        // return added number through count
137
498
        *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
498
        memcpy(&_data[orig_size], vals, to_add_size);
158
498
        return Status::OK();
159
498
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
7.23k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
7.23k
        DCHECK(!_finished);
110
7.23k
        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.23k
        uint32_t to_add = cast_set<UInt32>(
126
7.23k
                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.23k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
7.23k
        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.23k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
7.23k
        _count += to_add;
134
7.23k
        _remain_element_capacity -= to_add;
135
7.23k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
7.23k
        *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.23k
        memcpy(&_data[orig_size], vals, to_add_size);
158
7.23k
        return Status::OK();
159
7.23k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
249
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
249
        DCHECK(!_finished);
110
249
        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
249
        uint32_t to_add = cast_set<UInt32>(
126
249
                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
249
        int to_add_size = to_add * SIZE_OF_TYPE;
129
249
        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
249
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
249
        _count += to_add;
134
249
        _remain_element_capacity -= to_add;
135
249
        _raw_data_size += to_add_size;
136
        // return added number through count
137
249
        *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
249
        memcpy(&_data[orig_size], vals, to_add_size);
158
249
        return Status::OK();
159
249
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
5.11k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.11k
        DCHECK(!_finished);
110
5.11k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
5.11k
        uint32_t to_add = cast_set<UInt32>(
126
5.11k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
5.11k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.11k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
5.11k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.11k
        _count += to_add;
134
5.11k
        _remain_element_capacity -= to_add;
135
5.11k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.11k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
5.11k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.11k
        return Status::OK();
159
5.11k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
26.4k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
26.4k
        DCHECK(!_finished);
110
26.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
26.4k
        uint32_t to_add = cast_set<UInt32>(
126
26.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
26.4k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
26.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
26.4k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
26.4k
        _count += to_add;
134
26.4k
        _remain_element_capacity -= to_add;
135
26.4k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
26.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
26.4k
        memcpy(&_data[orig_size], vals, to_add_size);
158
26.4k
        return Status::OK();
159
26.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
17.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
17.9k
        DCHECK(!_finished);
110
17.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
17.9k
        uint32_t to_add = cast_set<UInt32>(
126
17.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
17.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
17.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
17.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
17.9k
        _count += to_add;
134
17.9k
        _remain_element_capacity -= to_add;
135
17.9k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
17.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
17.9k
        memcpy(&_data[orig_size], vals, to_add_size);
158
17.9k
        return Status::OK();
159
17.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
859
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
859
        DCHECK(!_finished);
110
859
        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
859
        uint32_t to_add = cast_set<UInt32>(
126
859
                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
859
        int to_add_size = to_add * SIZE_OF_TYPE;
129
859
        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
859
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
859
        _count += to_add;
134
859
        _remain_element_capacity -= to_add;
135
859
        _raw_data_size += to_add_size;
136
        // return added number through count
137
859
        *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
859
        memcpy(&_data[orig_size], vals, to_add_size);
158
859
        return Status::OK();
159
859
    }
_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
699k
    Status finish(OwnedSlice* slice) override {
162
699k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
699k
        return Status::OK();
164
699k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
331k
    Status finish(OwnedSlice* slice) override {
162
331k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
331k
        return Status::OK();
164
331k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
37.8k
    Status finish(OwnedSlice* slice) override {
162
37.8k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
37.8k
        return Status::OK();
164
37.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
8.87k
    Status finish(OwnedSlice* slice) override {
162
8.87k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
8.87k
        return Status::OK();
164
8.87k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
78.8k
    Status finish(OwnedSlice* slice) override {
162
78.8k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
78.8k
        return Status::OK();
164
78.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
11.9k
    Status finish(OwnedSlice* slice) override {
162
11.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
11.9k
        return Status::OK();
164
11.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
67.3k
    Status finish(OwnedSlice* slice) override {
162
67.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
67.3k
        return Status::OK();
164
67.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
11.5k
    Status finish(OwnedSlice* slice) override {
162
11.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
11.5k
        return Status::OK();
164
11.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
14.9k
    Status finish(OwnedSlice* slice) override {
162
14.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
14.9k
        return Status::OK();
164
14.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
346
    Status finish(OwnedSlice* slice) override {
162
346
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
346
        return Status::OK();
164
346
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
38.3k
    Status finish(OwnedSlice* slice) override {
162
38.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
38.3k
        return Status::OK();
164
38.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
41.4k
    Status finish(OwnedSlice* slice) override {
162
41.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
41.4k
        return Status::OK();
164
41.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
586
    Status finish(OwnedSlice* slice) override {
162
586
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
586
        return Status::OK();
164
586
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7.31k
    Status finish(OwnedSlice* slice) override {
162
7.31k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.31k
        return Status::OK();
164
7.31k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
249
    Status finish(OwnedSlice* slice) override {
162
249
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
249
        return Status::OK();
164
249
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
9.58k
    Status finish(OwnedSlice* slice) override {
162
9.58k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
9.59k
        return Status::OK();
164
9.58k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
19.3k
    Status finish(OwnedSlice* slice) override {
162
19.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
19.3k
        return Status::OK();
164
19.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
17.1k
    Status finish(OwnedSlice* slice) override {
162
17.1k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
17.1k
        return Status::OK();
164
17.1k
    }
_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
837
    Status finish(OwnedSlice* slice) override {
162
837
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
837
        return Status::OK();
164
837
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
737
    Status finish(OwnedSlice* slice) override {
162
737
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
737
        return Status::OK();
164
737
    }
165
166
1.69M
    Status reset() override {
167
1.69M
        RETURN_IF_CATCH_EXCEPTION({
168
1.69M
            size_t block_size = _options.data_page_size;
169
1.69M
            _count = 0;
170
1.69M
            _raw_data_size = 0;
171
1.69M
            _data.clear();
172
1.69M
            _data.reserve(block_size);
173
1.69M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.69M
                    << "buffer must be naturally-aligned";
175
1.69M
            _buffer.clear();
176
1.69M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.69M
            _finished = false;
178
1.69M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.69M
        });
180
1.69M
        return Status::OK();
181
1.69M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
166
965k
    Status reset() override {
167
965k
        RETURN_IF_CATCH_EXCEPTION({
168
965k
            size_t block_size = _options.data_page_size;
169
965k
            _count = 0;
170
965k
            _raw_data_size = 0;
171
965k
            _data.clear();
172
965k
            _data.reserve(block_size);
173
965k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
965k
                    << "buffer must be naturally-aligned";
175
965k
            _buffer.clear();
176
965k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
965k
            _finished = false;
178
965k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
965k
        });
180
967k
        return Status::OK();
181
965k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
76.8k
    Status reset() override {
167
76.8k
        RETURN_IF_CATCH_EXCEPTION({
168
76.8k
            size_t block_size = _options.data_page_size;
169
76.8k
            _count = 0;
170
76.8k
            _raw_data_size = 0;
171
76.8k
            _data.clear();
172
76.8k
            _data.reserve(block_size);
173
76.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
76.8k
                    << "buffer must be naturally-aligned";
175
76.8k
            _buffer.clear();
176
76.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
76.8k
            _finished = false;
178
76.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
76.8k
        });
180
76.8k
        return Status::OK();
181
76.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
166
18.2k
    Status reset() override {
167
18.2k
        RETURN_IF_CATCH_EXCEPTION({
168
18.2k
            size_t block_size = _options.data_page_size;
169
18.2k
            _count = 0;
170
18.2k
            _raw_data_size = 0;
171
18.2k
            _data.clear();
172
18.2k
            _data.reserve(block_size);
173
18.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
18.2k
                    << "buffer must be naturally-aligned";
175
18.2k
            _buffer.clear();
176
18.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
18.2k
            _finished = false;
178
18.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
18.2k
        });
180
18.2k
        return Status::OK();
181
18.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
154k
    Status reset() override {
167
154k
        RETURN_IF_CATCH_EXCEPTION({
168
154k
            size_t block_size = _options.data_page_size;
169
154k
            _count = 0;
170
154k
            _raw_data_size = 0;
171
154k
            _data.clear();
172
154k
            _data.reserve(block_size);
173
154k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
154k
                    << "buffer must be naturally-aligned";
175
154k
            _buffer.clear();
176
154k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
154k
            _finished = false;
178
154k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
154k
        });
180
154k
        return Status::OK();
181
154k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
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
23.9k
        return Status::OK();
181
23.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
166
134k
    Status reset() override {
167
134k
        RETURN_IF_CATCH_EXCEPTION({
168
134k
            size_t block_size = _options.data_page_size;
169
134k
            _count = 0;
170
134k
            _raw_data_size = 0;
171
134k
            _data.clear();
172
134k
            _data.reserve(block_size);
173
134k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
134k
                    << "buffer must be naturally-aligned";
175
134k
            _buffer.clear();
176
134k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
134k
            _finished = false;
178
134k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
134k
        });
180
134k
        return Status::OK();
181
134k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
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
23.9k
        return Status::OK();
181
23.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
166
29.8k
    Status reset() override {
167
29.8k
        RETURN_IF_CATCH_EXCEPTION({
168
29.8k
            size_t block_size = _options.data_page_size;
169
29.8k
            _count = 0;
170
29.8k
            _raw_data_size = 0;
171
29.8k
            _data.clear();
172
29.8k
            _data.reserve(block_size);
173
29.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
29.8k
                    << "buffer must be naturally-aligned";
175
29.8k
            _buffer.clear();
176
29.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
29.8k
            _finished = false;
178
29.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
29.8k
        });
180
29.9k
        return Status::OK();
181
29.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
166
680
    Status reset() override {
167
680
        RETURN_IF_CATCH_EXCEPTION({
168
680
            size_t block_size = _options.data_page_size;
169
680
            _count = 0;
170
680
            _raw_data_size = 0;
171
680
            _data.clear();
172
680
            _data.reserve(block_size);
173
680
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
680
                    << "buffer must be naturally-aligned";
175
680
            _buffer.clear();
176
680
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
680
            _finished = false;
178
680
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
680
        });
180
680
        return Status::OK();
181
680
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
166
75.8k
    Status reset() override {
167
75.8k
        RETURN_IF_CATCH_EXCEPTION({
168
75.8k
            size_t block_size = _options.data_page_size;
169
75.8k
            _count = 0;
170
75.8k
            _raw_data_size = 0;
171
75.8k
            _data.clear();
172
75.8k
            _data.reserve(block_size);
173
75.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
75.8k
                    << "buffer must be naturally-aligned";
175
75.8k
            _buffer.clear();
176
75.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
75.8k
            _finished = false;
178
75.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
75.8k
        });
180
75.9k
        return Status::OK();
181
75.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
166
83.8k
    Status reset() override {
167
83.8k
        RETURN_IF_CATCH_EXCEPTION({
168
83.8k
            size_t block_size = _options.data_page_size;
169
83.8k
            _count = 0;
170
83.8k
            _raw_data_size = 0;
171
83.8k
            _data.clear();
172
83.8k
            _data.reserve(block_size);
173
83.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
83.8k
                    << "buffer must be naturally-aligned";
175
83.8k
            _buffer.clear();
176
83.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
83.8k
            _finished = false;
178
83.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
83.8k
        });
180
83.9k
        return Status::OK();
181
83.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
166
1.01k
    Status reset() override {
167
1.01k
        RETURN_IF_CATCH_EXCEPTION({
168
1.01k
            size_t block_size = _options.data_page_size;
169
1.01k
            _count = 0;
170
1.01k
            _raw_data_size = 0;
171
1.01k
            _data.clear();
172
1.01k
            _data.reserve(block_size);
173
1.01k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.01k
                    << "buffer must be naturally-aligned";
175
1.01k
            _buffer.clear();
176
1.01k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.01k
            _finished = false;
178
1.01k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.01k
        });
180
1.01k
        return Status::OK();
181
1.01k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
Line
Count
Source
166
14.4k
    Status reset() override {
167
14.4k
        RETURN_IF_CATCH_EXCEPTION({
168
14.4k
            size_t block_size = _options.data_page_size;
169
14.4k
            _count = 0;
170
14.4k
            _raw_data_size = 0;
171
14.4k
            _data.clear();
172
14.4k
            _data.reserve(block_size);
173
14.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
14.4k
                    << "buffer must be naturally-aligned";
175
14.4k
            _buffer.clear();
176
14.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
14.4k
            _finished = false;
178
14.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
14.4k
        });
180
14.6k
        return Status::OK();
181
14.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
166
587
    Status reset() override {
167
587
        RETURN_IF_CATCH_EXCEPTION({
168
587
            size_t block_size = _options.data_page_size;
169
587
            _count = 0;
170
587
            _raw_data_size = 0;
171
587
            _data.clear();
172
587
            _data.reserve(block_size);
173
587
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
587
                    << "buffer must be naturally-aligned";
175
587
            _buffer.clear();
176
587
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
587
            _finished = false;
178
587
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
587
        });
180
587
        return Status::OK();
181
587
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
166
19.1k
    Status reset() override {
167
19.1k
        RETURN_IF_CATCH_EXCEPTION({
168
19.1k
            size_t block_size = _options.data_page_size;
169
19.1k
            _count = 0;
170
19.1k
            _raw_data_size = 0;
171
19.1k
            _data.clear();
172
19.1k
            _data.reserve(block_size);
173
19.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
19.1k
                    << "buffer must be naturally-aligned";
175
19.1k
            _buffer.clear();
176
19.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
19.1k
            _finished = false;
178
19.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
19.1k
        });
180
19.1k
        return Status::OK();
181
19.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
31.2k
    Status reset() override {
167
31.2k
        RETURN_IF_CATCH_EXCEPTION({
168
31.2k
            size_t block_size = _options.data_page_size;
169
31.2k
            _count = 0;
170
31.2k
            _raw_data_size = 0;
171
31.2k
            _data.clear();
172
31.2k
            _data.reserve(block_size);
173
31.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
31.2k
                    << "buffer must be naturally-aligned";
175
31.2k
            _buffer.clear();
176
31.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
31.2k
            _finished = false;
178
31.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
31.2k
        });
180
31.2k
        return Status::OK();
181
31.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
166
34.0k
    Status reset() override {
167
34.0k
        RETURN_IF_CATCH_EXCEPTION({
168
34.0k
            size_t block_size = _options.data_page_size;
169
34.0k
            _count = 0;
170
34.0k
            _raw_data_size = 0;
171
34.0k
            _data.clear();
172
34.0k
            _data.reserve(block_size);
173
34.0k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
34.0k
                    << "buffer must be naturally-aligned";
175
34.0k
            _buffer.clear();
176
34.0k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
34.0k
            _finished = false;
178
34.0k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
34.0k
        });
180
34.0k
        return Status::OK();
181
34.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Line
Count
Source
166
2.49k
    Status reset() override {
167
2.49k
        RETURN_IF_CATCH_EXCEPTION({
168
2.49k
            size_t block_size = _options.data_page_size;
169
2.49k
            _count = 0;
170
2.49k
            _raw_data_size = 0;
171
2.49k
            _data.clear();
172
2.49k
            _data.reserve(block_size);
173
2.49k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
2.49k
                    << "buffer must be naturally-aligned";
175
2.49k
            _buffer.clear();
176
2.49k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
2.49k
            _finished = false;
178
2.49k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
2.49k
        });
180
2.50k
        return Status::OK();
181
2.49k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Line
Count
Source
166
1.76k
    Status reset() override {
167
1.76k
        RETURN_IF_CATCH_EXCEPTION({
168
1.76k
            size_t block_size = _options.data_page_size;
169
1.76k
            _count = 0;
170
1.76k
            _raw_data_size = 0;
171
1.76k
            _data.clear();
172
1.76k
            _data.reserve(block_size);
173
1.76k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.76k
                    << "buffer must be naturally-aligned";
175
1.76k
            _buffer.clear();
176
1.76k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.76k
            _finished = false;
178
1.76k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.76k
        });
180
1.76k
        return Status::OK();
181
1.76k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
166
1.56k
    Status reset() override {
167
1.56k
        RETURN_IF_CATCH_EXCEPTION({
168
1.56k
            size_t block_size = _options.data_page_size;
169
1.56k
            _count = 0;
170
1.56k
            _raw_data_size = 0;
171
1.56k
            _data.clear();
172
1.56k
            _data.reserve(block_size);
173
1.56k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.56k
                    << "buffer must be naturally-aligned";
175
1.56k
            _buffer.clear();
176
1.56k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.56k
            _finished = false;
178
1.56k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.56k
        });
180
1.56k
        return Status::OK();
181
1.56k
    }
182
183
4
    size_t count() const override { return _count; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
183
4
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5countEv
184
185
35.1k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
17.8k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
185
3.72k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
185
1.16k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
2.58k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
1.79k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
793
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
759
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
185
774
    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.61k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
2.20k
    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
28
    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
157
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
185
313
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
185
1.14k
    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
427k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
59.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
37.8k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
8.87k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
78.8k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
187
11.9k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
67.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
187
11.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
14.9k
    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
346
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
187
38.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
187
41.4k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
187
586
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
Line
Count
Source
187
7.31k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
187
249
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
187
9.59k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
19.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
187
17.1k
    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
837
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
187
737
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
704k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
344k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
38.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.36k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
75.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
12.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
67.3k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
12.3k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
14.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
334
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
37.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
42.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
432
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
7.14k
            : _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
9.58k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
11.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
16.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1.29k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
923
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
823
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
192
193
699k
    OwnedSlice _finish(int final_size_of_type) {
194
699k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
699k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
699k
        int padding_elems = num_elems_after_padding - _count;
199
699k
        int padding_bytes = padding_elems * final_size_of_type;
200
20.0M
        for (int i = 0; i < padding_bytes; i++) {
201
19.3M
            _data.push_back(0);
202
19.3M
        }
203
204
        // reserve enough place for compression
205
699k
        _buffer.resize(
206
699k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
699k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
699k
        int64_t bytes =
210
699k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
699k
                                         num_elems_after_padding, final_size_of_type, 0);
212
699k
        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
699k
        encode_fixed32_le(&_buffer[0], _count);
222
699k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
699k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
699k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
699k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
699k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
699k
        return _buffer.build();
229
699k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
331k
    OwnedSlice _finish(int final_size_of_type) {
194
331k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
331k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
331k
        int padding_elems = num_elems_after_padding - _count;
199
331k
        int padding_bytes = padding_elems * final_size_of_type;
200
6.21M
        for (int i = 0; i < padding_bytes; i++) {
201
5.88M
            _data.push_back(0);
202
5.88M
        }
203
204
        // reserve enough place for compression
205
331k
        _buffer.resize(
206
331k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
331k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
331k
        int64_t bytes =
210
331k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
331k
                                         num_elems_after_padding, final_size_of_type, 0);
212
331k
        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
331k
        encode_fixed32_le(&_buffer[0], _count);
222
331k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
331k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
331k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
331k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
331k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
331k
        return _buffer.build();
229
331k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
37.8k
    OwnedSlice _finish(int final_size_of_type) {
194
37.8k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
37.8k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
37.8k
        int padding_elems = num_elems_after_padding - _count;
199
37.8k
        int padding_bytes = padding_elems * final_size_of_type;
200
226k
        for (int i = 0; i < padding_bytes; i++) {
201
188k
            _data.push_back(0);
202
188k
        }
203
204
        // reserve enough place for compression
205
37.8k
        _buffer.resize(
206
37.8k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
37.8k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
37.8k
        int64_t bytes =
210
37.8k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
37.8k
                                         num_elems_after_padding, final_size_of_type, 0);
212
37.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
37.8k
        encode_fixed32_le(&_buffer[0], _count);
222
37.8k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
37.8k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
37.8k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
37.8k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
37.8k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
37.8k
        return _buffer.build();
229
37.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
8.87k
    OwnedSlice _finish(int final_size_of_type) {
194
8.87k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
8.87k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
8.87k
        int padding_elems = num_elems_after_padding - _count;
199
8.87k
        int padding_bytes = padding_elems * final_size_of_type;
200
88.3k
        for (int i = 0; i < padding_bytes; i++) {
201
79.5k
            _data.push_back(0);
202
79.5k
        }
203
204
        // reserve enough place for compression
205
8.87k
        _buffer.resize(
206
8.87k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
8.87k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
8.87k
        int64_t bytes =
210
8.87k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
8.87k
                                         num_elems_after_padding, final_size_of_type, 0);
212
8.87k
        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.87k
        encode_fixed32_le(&_buffer[0], _count);
222
8.87k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
8.87k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
8.87k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
8.87k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
8.87k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
8.87k
        return _buffer.build();
229
8.87k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
78.8k
    OwnedSlice _finish(int final_size_of_type) {
194
78.8k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
78.8k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
78.8k
        int padding_elems = num_elems_after_padding - _count;
199
78.8k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.66M
        for (int i = 0; i < padding_bytes; i++) {
201
3.58M
            _data.push_back(0);
202
3.58M
        }
203
204
        // reserve enough place for compression
205
78.8k
        _buffer.resize(
206
78.8k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
78.8k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
78.8k
        int64_t bytes =
210
78.8k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
78.8k
                                         num_elems_after_padding, final_size_of_type, 0);
212
78.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
78.8k
        encode_fixed32_le(&_buffer[0], _count);
222
78.8k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
78.8k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
78.8k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
78.8k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
78.8k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
78.8k
        return _buffer.build();
229
78.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
11.9k
    OwnedSlice _finish(int final_size_of_type) {
194
11.9k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
11.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
11.9k
        int padding_elems = num_elems_after_padding - _count;
199
11.9k
        int padding_bytes = padding_elems * final_size_of_type;
200
750k
        for (int i = 0; i < padding_bytes; i++) {
201
738k
            _data.push_back(0);
202
738k
        }
203
204
        // reserve enough place for compression
205
11.9k
        _buffer.resize(
206
11.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
11.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
11.9k
        int64_t bytes =
210
11.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
11.9k
                                         num_elems_after_padding, final_size_of_type, 0);
212
11.9k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
11.9k
        encode_fixed32_le(&_buffer[0], _count);
222
11.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
11.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
11.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
11.9k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
11.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
11.9k
        return _buffer.build();
229
11.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
67.3k
    OwnedSlice _finish(int final_size_of_type) {
194
67.3k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
67.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
67.3k
        int padding_elems = num_elems_after_padding - _count;
199
67.3k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.24M
        for (int i = 0; i < padding_bytes; i++) {
201
3.18M
            _data.push_back(0);
202
3.18M
        }
203
204
        // reserve enough place for compression
205
67.3k
        _buffer.resize(
206
67.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
67.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
67.3k
        int64_t bytes =
210
67.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
67.3k
                                         num_elems_after_padding, final_size_of_type, 0);
212
67.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
67.3k
        encode_fixed32_le(&_buffer[0], _count);
222
67.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
67.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
67.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
67.3k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
67.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
67.3k
        return _buffer.build();
229
67.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
11.5k
    OwnedSlice _finish(int final_size_of_type) {
194
11.5k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
11.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
11.5k
        int padding_elems = num_elems_after_padding - _count;
199
11.5k
        int padding_bytes = padding_elems * final_size_of_type;
200
245k
        for (int i = 0; i < padding_bytes; i++) {
201
234k
            _data.push_back(0);
202
234k
        }
203
204
        // reserve enough place for compression
205
11.5k
        _buffer.resize(
206
11.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
11.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
11.5k
        int64_t bytes =
210
11.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
11.5k
                                         num_elems_after_padding, final_size_of_type, 0);
212
11.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
11.5k
        encode_fixed32_le(&_buffer[0], _count);
222
11.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
11.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
11.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
11.5k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
11.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
11.5k
        return _buffer.build();
229
11.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
14.9k
    OwnedSlice _finish(int final_size_of_type) {
194
14.9k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
14.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
14.9k
        int padding_elems = num_elems_after_padding - _count;
199
14.9k
        int padding_bytes = padding_elems * final_size_of_type;
200
608k
        for (int i = 0; i < padding_bytes; i++) {
201
593k
            _data.push_back(0);
202
593k
        }
203
204
        // reserve enough place for compression
205
14.9k
        _buffer.resize(
206
14.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
14.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
14.9k
        int64_t bytes =
210
14.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
14.9k
                                         num_elems_after_padding, final_size_of_type, 0);
212
14.9k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
14.9k
        encode_fixed32_le(&_buffer[0], _count);
222
14.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
14.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
14.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
14.9k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
14.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
14.9k
        return _buffer.build();
229
14.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
346
    OwnedSlice _finish(int final_size_of_type) {
194
346
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
346
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
346
        int padding_elems = num_elems_after_padding - _count;
199
346
        int padding_bytes = padding_elems * final_size_of_type;
200
5.19k
        for (int i = 0; i < padding_bytes; i++) {
201
4.84k
            _data.push_back(0);
202
4.84k
        }
203
204
        // reserve enough place for compression
205
346
        _buffer.resize(
206
346
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
346
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
346
        int64_t bytes =
210
346
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
346
                                         num_elems_after_padding, final_size_of_type, 0);
212
346
        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
346
        encode_fixed32_le(&_buffer[0], _count);
222
346
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
346
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
346
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
346
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
346
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
346
        return _buffer.build();
229
346
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
193
38.3k
    OwnedSlice _finish(int final_size_of_type) {
194
38.3k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
38.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
38.3k
        int padding_elems = num_elems_after_padding - _count;
199
38.3k
        int padding_bytes = padding_elems * final_size_of_type;
200
808k
        for (int i = 0; i < padding_bytes; i++) {
201
770k
            _data.push_back(0);
202
770k
        }
203
204
        // reserve enough place for compression
205
38.3k
        _buffer.resize(
206
38.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
38.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
38.3k
        int64_t bytes =
210
38.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
38.3k
                                         num_elems_after_padding, final_size_of_type, 0);
212
38.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
38.3k
        encode_fixed32_le(&_buffer[0], _count);
222
38.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
38.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
38.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
38.3k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
38.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
38.3k
        return _buffer.build();
229
38.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
193
41.4k
    OwnedSlice _finish(int final_size_of_type) {
194
41.4k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
41.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
41.4k
        int padding_elems = num_elems_after_padding - _count;
199
41.4k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.72M
        for (int i = 0; i < padding_bytes; i++) {
201
1.68M
            _data.push_back(0);
202
1.68M
        }
203
204
        // reserve enough place for compression
205
41.4k
        _buffer.resize(
206
41.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
41.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
41.4k
        int64_t bytes =
210
41.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
41.4k
                                         num_elems_after_padding, final_size_of_type, 0);
212
41.4k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
41.4k
        encode_fixed32_le(&_buffer[0], _count);
222
41.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
41.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
41.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
41.4k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
41.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
41.4k
        return _buffer.build();
229
41.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
193
586
    OwnedSlice _finish(int final_size_of_type) {
194
586
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
586
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
586
        int padding_elems = num_elems_after_padding - _count;
199
586
        int padding_bytes = padding_elems * final_size_of_type;
200
13.3k
        for (int i = 0; i < padding_bytes; i++) {
201
12.7k
            _data.push_back(0);
202
12.7k
        }
203
204
        // reserve enough place for compression
205
586
        _buffer.resize(
206
586
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
586
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
586
        int64_t bytes =
210
586
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
586
                                         num_elems_after_padding, final_size_of_type, 0);
212
586
        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
586
        encode_fixed32_le(&_buffer[0], _count);
222
586
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
586
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
586
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
586
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
586
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
586
        return _buffer.build();
229
586
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
Line
Count
Source
193
7.31k
    OwnedSlice _finish(int final_size_of_type) {
194
7.31k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.31k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.31k
        int padding_elems = num_elems_after_padding - _count;
199
7.31k
        int padding_bytes = padding_elems * final_size_of_type;
200
382k
        for (int i = 0; i < padding_bytes; i++) {
201
374k
            _data.push_back(0);
202
374k
        }
203
204
        // reserve enough place for compression
205
7.31k
        _buffer.resize(
206
7.31k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.31k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.31k
        int64_t bytes =
210
7.31k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.31k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.31k
        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.31k
        encode_fixed32_le(&_buffer[0], _count);
222
7.31k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.31k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.31k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.31k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.31k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.31k
        return _buffer.build();
229
7.31k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
193
249
    OwnedSlice _finish(int final_size_of_type) {
194
249
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
249
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
249
        int padding_elems = num_elems_after_padding - _count;
199
249
        int padding_bytes = padding_elems * final_size_of_type;
200
15.4k
        for (int i = 0; i < padding_bytes; i++) {
201
15.2k
            _data.push_back(0);
202
15.2k
        }
203
204
        // reserve enough place for compression
205
249
        _buffer.resize(
206
249
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
249
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
249
        int64_t bytes =
210
249
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
249
                                         num_elems_after_padding, final_size_of_type, 0);
212
249
        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
249
        encode_fixed32_le(&_buffer[0], _count);
222
249
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
249
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
249
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
249
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
249
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
249
        return _buffer.build();
229
249
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
193
9.59k
    OwnedSlice _finish(int final_size_of_type) {
194
9.59k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
9.59k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
9.59k
        int padding_elems = num_elems_after_padding - _count;
199
9.59k
        int padding_bytes = padding_elems * final_size_of_type;
200
115k
        for (int i = 0; i < padding_bytes; i++) {
201
106k
            _data.push_back(0);
202
106k
        }
203
204
        // reserve enough place for compression
205
9.59k
        _buffer.resize(
206
9.59k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
9.59k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
9.59k
        int64_t bytes =
210
9.59k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
9.59k
                                         num_elems_after_padding, final_size_of_type, 0);
212
9.59k
        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.59k
        encode_fixed32_le(&_buffer[0], _count);
222
9.59k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
9.59k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
9.59k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
9.59k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
9.59k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
9.59k
        return _buffer.build();
229
9.59k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
19.3k
    OwnedSlice _finish(int final_size_of_type) {
194
19.3k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
19.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
19.3k
        int padding_elems = num_elems_after_padding - _count;
199
19.3k
        int padding_bytes = padding_elems * final_size_of_type;
200
484k
        for (int i = 0; i < padding_bytes; i++) {
201
465k
            _data.push_back(0);
202
465k
        }
203
204
        // reserve enough place for compression
205
19.3k
        _buffer.resize(
206
19.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
19.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
19.3k
        int64_t bytes =
210
19.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
19.3k
                                         num_elems_after_padding, final_size_of_type, 0);
212
19.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
19.3k
        encode_fixed32_le(&_buffer[0], _count);
222
19.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
19.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
19.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
19.3k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
19.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
19.3k
        return _buffer.build();
229
19.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
193
17.1k
    OwnedSlice _finish(int final_size_of_type) {
194
17.1k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
17.1k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
17.1k
        int padding_elems = num_elems_after_padding - _count;
199
17.1k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.15M
        for (int i = 0; i < padding_bytes; i++) {
201
1.13M
            _data.push_back(0);
202
1.13M
        }
203
204
        // reserve enough place for compression
205
17.1k
        _buffer.resize(
206
17.1k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
17.1k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
17.1k
        int64_t bytes =
210
17.1k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
17.1k
                                         num_elems_after_padding, final_size_of_type, 0);
212
17.1k
        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.1k
        encode_fixed32_le(&_buffer[0], _count);
222
17.1k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
17.1k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
17.1k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
17.1k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
17.1k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
17.1k
        return _buffer.build();
229
17.1k
    }
_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
185k
        for (int i = 0; i < padding_bytes; i++) {
201
184k
            _data.push_back(0);
202
184k
        }
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
837
    OwnedSlice _finish(int final_size_of_type) {
194
837
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
837
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
837
        int padding_elems = num_elems_after_padding - _count;
199
837
        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
837
        _buffer.resize(
206
837
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
837
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
837
        int64_t bytes =
210
837
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
837
                                         num_elems_after_padding, final_size_of_type, 0);
212
837
        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
837
        encode_fixed32_le(&_buffer[0], _count);
222
837
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
837
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
837
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
837
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
837
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
837
        return _buffer.build();
229
837
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
193
737
    OwnedSlice _finish(int final_size_of_type) {
194
737
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
737
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
737
        int padding_elems = num_elems_after_padding - _count;
199
737
        int padding_bytes = padding_elems * final_size_of_type;
200
59.4k
        for (int i = 0; i < padding_bytes; i++) {
201
58.6k
            _data.push_back(0);
202
58.6k
        }
203
204
        // reserve enough place for compression
205
737
        _buffer.resize(
206
737
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
737
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
737
        int64_t bytes =
210
737
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
737
                                         num_elems_after_padding, final_size_of_type, 0);
212
737
        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
737
        encode_fixed32_le(&_buffer[0], _count);
222
737
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
737
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
737
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
737
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
737
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
737
        return _buffer.build();
229
737
    }
230
231
    using CppType = typename TypeTraits<Type>::CppType;
232
233
    CppType cell(int idx) const {
234
        DCHECK_GE(idx, 0);
235
        CppType ret;
236
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
237
        return ret;
238
    }
239
240
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
241
    PageBuilderOptions _options;
242
    uint32_t _count;
243
    uint32_t _remain_element_capacity;
244
    bool _finished;
245
    faststring _data;
246
    faststring _buffer;
247
    uint64_t _raw_data_size = 0;
248
};
249
250
inline Status parse_bit_shuffle_header(const Slice& data, size_t& num_elements,
251
                                       size_t& compressed_size, size_t& num_element_after_padding,
252
1.62M
                                       int& size_of_element) {
253
1.62M
    if (data.size < BITSHUFFLE_PAGE_HEADER_SIZE) {
254
0
        return Status::InternalError("file corruption: invalid data size:{}, header size:{}",
255
0
                                     data.size, BITSHUFFLE_PAGE_HEADER_SIZE);
256
0
    }
257
258
1.62M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
1.62M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
1.62M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
1.62M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
1.62M
    if (num_element_after_padding != ALIGN_UP(num_elements, 8)) {
263
0
        return Status::InternalError(
264
0
                "num of element information corrupted,"
265
0
                " _num_element_after_padding:{}, _num_elements:{}, expected_padding:{},"
266
0
                " compressed_size:{}, size_of_element:{}, data_size:{}",
267
0
                num_element_after_padding, num_elements, ALIGN_UP(num_elements, 8), compressed_size,
268
0
                size_of_element, data.size);
269
0
    }
270
1.62M
    switch (size_of_element) {
271
102k
    case 1:
272
122k
    case 2:
273
124k
    case 3:
274
1.09M
    case 4:
275
1.54M
    case 8:
276
1.54M
    case 12:
277
1.62M
    case 16:
278
1.62M
    case 32:
279
1.62M
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
1.62M
    }
283
1.62M
    return Status::OK();
284
1.62M
}
285
286
template <FieldType Type>
287
class BitShufflePageDecoder : public PageDecoder {
288
public:
289
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
290
1.00M
            : _data(data),
291
1.00M
              _options(options),
292
1.00M
              _parsed(false),
293
1.00M
              _num_elements(0),
294
1.00M
              _num_element_after_padding(0),
295
1.00M
              _size_of_element(0),
296
1.00M
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
495k
            : _data(data),
291
495k
              _options(options),
292
495k
              _parsed(false),
293
495k
              _num_elements(0),
294
495k
              _num_element_after_padding(0),
295
495k
              _size_of_element(0),
296
495k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
66.9k
            : _data(data),
291
66.9k
              _options(options),
292
66.9k
              _parsed(false),
293
66.9k
              _num_elements(0),
294
66.9k
              _num_element_after_padding(0),
295
66.9k
              _size_of_element(0),
296
66.9k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
11.8k
            : _data(data),
291
11.8k
              _options(options),
292
11.8k
              _parsed(false),
293
11.8k
              _num_elements(0),
294
11.8k
              _num_element_after_padding(0),
295
11.8k
              _size_of_element(0),
296
11.8k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
44.5k
            : _data(data),
291
44.5k
              _options(options),
292
44.5k
              _parsed(false),
293
44.5k
              _num_elements(0),
294
44.5k
              _num_element_after_padding(0),
295
44.5k
              _size_of_element(0),
296
44.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
14.5k
            : _data(data),
291
14.5k
              _options(options),
292
14.5k
              _parsed(false),
293
14.5k
              _num_elements(0),
294
14.5k
              _num_element_after_padding(0),
295
14.5k
              _size_of_element(0),
296
14.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
88.3k
            : _data(data),
291
88.3k
              _options(options),
292
88.3k
              _parsed(false),
293
88.3k
              _num_elements(0),
294
88.3k
              _num_element_after_padding(0),
295
88.3k
              _size_of_element(0),
296
88.3k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
19.1k
            : _data(data),
291
19.1k
              _options(options),
292
19.1k
              _parsed(false),
293
19.1k
              _num_elements(0),
294
19.1k
              _num_element_after_padding(0),
295
19.1k
              _size_of_element(0),
296
19.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
29.4k
            : _data(data),
291
29.4k
              _options(options),
292
29.4k
              _parsed(false),
293
29.4k
              _num_elements(0),
294
29.4k
              _num_element_after_padding(0),
295
29.4k
              _size_of_element(0),
296
29.4k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.43k
            : _data(data),
291
1.43k
              _options(options),
292
1.43k
              _parsed(false),
293
1.43k
              _num_elements(0),
294
1.43k
              _num_element_after_padding(0),
295
1.43k
              _size_of_element(0),
296
1.43k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
58.2k
            : _data(data),
291
58.2k
              _options(options),
292
58.2k
              _parsed(false),
293
58.2k
              _num_elements(0),
294
58.2k
              _num_element_after_padding(0),
295
58.2k
              _size_of_element(0),
296
58.2k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
63.7k
            : _data(data),
291
63.7k
              _options(options),
292
63.7k
              _parsed(false),
293
63.7k
              _num_elements(0),
294
63.7k
              _num_element_after_padding(0),
295
63.7k
              _size_of_element(0),
296
63.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
2.18k
            : _data(data),
291
2.18k
              _options(options),
292
2.18k
              _parsed(false),
293
2.18k
              _num_elements(0),
294
2.18k
              _num_element_after_padding(0),
295
2.18k
              _size_of_element(0),
296
2.18k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
14.9k
            : _data(data),
291
14.9k
              _options(options),
292
14.9k
              _parsed(false),
293
14.9k
              _num_elements(0),
294
14.9k
              _num_element_after_padding(0),
295
14.9k
              _size_of_element(0),
296
14.9k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.37k
            : _data(data),
291
1.37k
              _options(options),
292
1.37k
              _parsed(false),
293
1.37k
              _num_elements(0),
294
1.37k
              _num_element_after_padding(0),
295
1.37k
              _size_of_element(0),
296
1.37k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
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_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
41.0k
            : _data(data),
291
41.0k
              _options(options),
292
41.0k
              _parsed(false),
293
41.0k
              _num_elements(0),
294
41.0k
              _num_element_after_padding(0),
295
41.0k
              _size_of_element(0),
296
41.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
29.3k
            : _data(data),
291
29.3k
              _options(options),
292
29.3k
              _parsed(false),
293
29.3k
              _num_elements(0),
294
29.3k
              _num_element_after_padding(0),
295
29.3k
              _size_of_element(0),
296
29.3k
              _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.10k
            : _data(data),
291
1.10k
              _options(options),
292
1.10k
              _parsed(false),
293
1.10k
              _num_elements(0),
294
1.10k
              _num_element_after_padding(0),
295
1.10k
              _size_of_element(0),
296
1.10k
              _cur_index(0) {}
297
298
1.00M
    Status init() override {
299
1.00M
        CHECK(!_parsed);
300
1.00M
        size_t unused;
301
1.00M
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.00M
                                                 _num_element_after_padding, _size_of_element));
303
304
1.00M
        if (_data.size !=
305
1.00M
            _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.00M
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.00M
                     _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.00M
        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.00M
        _parsed = true;
325
1.00M
        return Status::OK();
326
1.00M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
298
494k
    Status init() override {
299
494k
        CHECK(!_parsed);
300
494k
        size_t unused;
301
494k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
494k
                                                 _num_element_after_padding, _size_of_element));
303
304
494k
        if (_data.size !=
305
494k
            _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
494k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
494k
                     _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
494k
        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
494k
        _parsed = true;
325
494k
        return Status::OK();
326
494k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
66.9k
    Status init() override {
299
66.9k
        CHECK(!_parsed);
300
66.9k
        size_t unused;
301
66.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
66.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
66.9k
        if (_data.size !=
305
66.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
66.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
66.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
66.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
66.9k
        _parsed = true;
325
66.9k
        return Status::OK();
326
66.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
11.8k
    Status init() override {
299
11.8k
        CHECK(!_parsed);
300
11.8k
        size_t unused;
301
11.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
11.8k
                                                 _num_element_after_padding, _size_of_element));
303
304
11.8k
        if (_data.size !=
305
11.8k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
11.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
11.8k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
11.8k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
11.8k
        _parsed = true;
325
11.8k
        return Status::OK();
326
11.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
44.4k
    Status init() override {
299
44.4k
        CHECK(!_parsed);
300
44.4k
        size_t unused;
301
44.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
44.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
44.4k
        if (_data.size !=
305
44.4k
            _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
44.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
44.4k
                     _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
44.4k
        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
44.4k
        _parsed = true;
325
44.4k
        return Status::OK();
326
44.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
298
14.5k
    Status init() override {
299
14.5k
        CHECK(!_parsed);
300
14.5k
        size_t unused;
301
14.5k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
14.5k
                                                 _num_element_after_padding, _size_of_element));
303
304
14.5k
        if (_data.size !=
305
14.5k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
14.5k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
14.5k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
14.5k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
14.5k
        _parsed = true;
325
14.5k
        return Status::OK();
326
14.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
298
88.3k
    Status init() override {
299
88.3k
        CHECK(!_parsed);
300
88.3k
        size_t unused;
301
88.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
88.3k
                                                 _num_element_after_padding, _size_of_element));
303
304
88.3k
        if (_data.size !=
305
88.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
88.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
88.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
88.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
88.3k
        _parsed = true;
325
88.3k
        return Status::OK();
326
88.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
298
19.1k
    Status init() override {
299
19.1k
        CHECK(!_parsed);
300
19.1k
        size_t unused;
301
19.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
19.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
19.1k
        if (_data.size !=
305
19.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
19.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
19.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
19.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
19.1k
        _parsed = true;
325
19.1k
        return Status::OK();
326
19.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
298
29.4k
    Status init() override {
299
29.4k
        CHECK(!_parsed);
300
29.4k
        size_t unused;
301
29.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
29.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
29.4k
        if (_data.size !=
305
29.4k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
29.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
29.4k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
29.4k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
29.4k
        _parsed = true;
325
29.4k
        return Status::OK();
326
29.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
1.43k
    Status init() override {
299
1.43k
        CHECK(!_parsed);
300
1.43k
        size_t unused;
301
1.43k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.43k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.43k
        if (_data.size !=
305
1.43k
            _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.43k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.43k
                     _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.43k
        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.43k
        _parsed = true;
325
1.43k
        return Status::OK();
326
1.43k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
58.2k
    Status init() override {
299
58.2k
        CHECK(!_parsed);
300
58.2k
        size_t unused;
301
58.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
58.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
58.2k
        if (_data.size !=
305
58.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
58.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
58.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
58.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
58.2k
        _parsed = true;
325
58.2k
        return Status::OK();
326
58.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
298
63.7k
    Status init() override {
299
63.7k
        CHECK(!_parsed);
300
63.7k
        size_t unused;
301
63.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
63.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
63.7k
        if (_data.size !=
305
63.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
63.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
63.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
63.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
63.7k
        _parsed = true;
325
63.7k
        return Status::OK();
326
63.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
298
2.18k
    Status init() override {
299
2.18k
        CHECK(!_parsed);
300
2.18k
        size_t unused;
301
2.18k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
2.18k
                                                 _num_element_after_padding, _size_of_element));
303
304
2.18k
        if (_data.size !=
305
2.18k
            _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.18k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
2.18k
                     _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.18k
        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.18k
        _parsed = true;
325
2.18k
        return Status::OK();
326
2.18k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
298
14.9k
    Status init() override {
299
14.9k
        CHECK(!_parsed);
300
14.9k
        size_t unused;
301
14.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
14.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
14.9k
        if (_data.size !=
305
14.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
14.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
14.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
14.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
14.9k
        _parsed = true;
325
14.9k
        return Status::OK();
326
14.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
298
1.37k
    Status init() override {
299
1.37k
        CHECK(!_parsed);
300
1.37k
        size_t unused;
301
1.37k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.37k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.37k
        if (_data.size !=
305
1.37k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.37k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.37k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.37k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.37k
        _parsed = true;
325
1.37k
        return Status::OK();
326
1.37k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
298
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_9FieldTypeE32EE4initEv
Line
Count
Source
298
41.0k
    Status init() override {
299
41.0k
        CHECK(!_parsed);
300
41.0k
        size_t unused;
301
41.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
41.0k
                                                 _num_element_after_padding, _size_of_element));
303
304
41.0k
        if (_data.size !=
305
41.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
41.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
41.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
41.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
41.0k
        _parsed = true;
325
41.0k
        return Status::OK();
326
41.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
298
29.3k
    Status init() override {
299
29.3k
        CHECK(!_parsed);
300
29.3k
        size_t unused;
301
29.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
29.3k
                                                 _num_element_after_padding, _size_of_element));
303
304
29.3k
        if (_data.size !=
305
29.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
29.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
29.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
29.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
29.3k
        _parsed = true;
325
29.3k
        return Status::OK();
326
29.3k
    }
_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
3.24M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
3.24M
        if (_num_elements == 0) [[unlikely]] {
337
3.56k
            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
3.56k
        }
342
343
3.24M
        DCHECK_LE(pos, _num_elements);
344
3.24M
        _cur_index = pos;
345
3.24M
        return Status::OK();
346
3.24M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.50M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
1.50M
        if (_num_elements == 0) [[unlikely]] {
337
1.86k
            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.86k
        }
342
343
1.50M
        DCHECK_LE(pos, _num_elements);
344
1.50M
        _cur_index = pos;
345
1.50M
        return Status::OK();
346
1.50M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
83.1k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
83.1k
        if (_num_elements == 0) [[unlikely]] {
337
528
            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
528
        }
342
343
83.1k
        DCHECK_LE(pos, _num_elements);
344
83.1k
        _cur_index = pos;
345
83.1k
        return Status::OK();
346
83.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
818
    Status seek_to_position_in_page(size_t pos) override {
335
818
        DCHECK(_parsed) << "Must call init()";
336
818
        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
818
        DCHECK_LE(pos, _num_elements);
344
818
        _cur_index = pos;
345
818
        return Status::OK();
346
818
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
39.8k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
39.8k
        if (_num_elements == 0) [[unlikely]] {
337
544
            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
544
        }
342
343
39.8k
        DCHECK_LE(pos, _num_elements);
344
39.8k
        _cur_index = pos;
345
39.8k
        return Status::OK();
346
39.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
334
4.22k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
4.22k
        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
4.22k
        DCHECK_LE(pos, _num_elements);
344
4.22k
        _cur_index = pos;
345
4.22k
        return Status::OK();
346
4.22k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
334
11.0k
    Status seek_to_position_in_page(size_t pos) override {
335
11.0k
        DCHECK(_parsed) << "Must call init()";
336
11.0k
        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.0k
        DCHECK_LE(pos, _num_elements);
344
11.0k
        _cur_index = pos;
345
11.0k
        return Status::OK();
346
11.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
238k
    Status seek_to_position_in_page(size_t pos) override {
335
238k
        DCHECK(_parsed) << "Must call init()";
336
238k
        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
238k
        DCHECK_LE(pos, _num_elements);
344
238k
        _cur_index = pos;
345
238k
        return Status::OK();
346
238k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_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
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
214k
        DCHECK_LE(pos, _num_elements);
344
214k
        _cur_index = pos;
345
214k
        return Status::OK();
346
214k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
334
223k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
223k
        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
223k
        DCHECK_LE(pos, _num_elements);
344
223k
        _cur_index = pos;
345
223k
        return Status::OK();
346
223k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
334
503k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
503k
        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
503k
        DCHECK_LE(pos, _num_elements);
344
503k
        _cur_index = pos;
345
503k
        return Status::OK();
346
503k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
334
65.1k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
65.1k
        if (_num_elements == 0) [[unlikely]] {
337
14
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
14
        }
342
343
65.1k
        DCHECK_LE(pos, _num_elements);
344
65.1k
        _cur_index = pos;
345
65.1k
        return Status::OK();
346
65.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
209k
    Status seek_to_position_in_page(size_t pos) override {
335
209k
        DCHECK(_parsed) << "Must call init()";
336
209k
        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
209k
        DCHECK_LE(pos, _num_elements);
344
209k
        _cur_index = pos;
345
209k
        return Status::OK();
346
209k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
334
6.67k
    Status seek_to_position_in_page(size_t pos) override {
335
6.67k
        DCHECK(_parsed) << "Must call init()";
336
6.67k
        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.67k
        DCHECK_LE(pos, _num_elements);
344
6.67k
        _cur_index = pos;
345
6.67k
        return Status::OK();
346
6.67k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
Line
Count
Source
334
28
    Status seek_to_position_in_page(size_t pos) override {
335
28
        DCHECK(_parsed) << "Must call init()";
336
28
        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
28
        DCHECK_LE(pos, _num_elements);
344
28
        _cur_index = pos;
345
28
        return Status::OK();
346
28
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Line
Count
Source
334
872
    Status seek_to_position_in_page(size_t pos) override {
335
872
        DCHECK(_parsed) << "Must call init()";
336
872
        if (_num_elements == 0) [[unlikely]] {
337
27
            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
27
        }
342
343
872
        DCHECK_LE(pos, _num_elements);
344
872
        _cur_index = pos;
345
872
        return Status::OK();
346
872
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
334
17.5k
    Status seek_to_position_in_page(size_t pos) override {
335
17.5k
        DCHECK(_parsed) << "Must call init()";
336
17.5k
        if (_num_elements == 0) [[unlikely]] {
337
12
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
12
        }
342
343
17.5k
        DCHECK_LE(pos, _num_elements);
344
17.5k
        _cur_index = pos;
345
17.5k
        return Status::OK();
346
17.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Line
Count
Source
334
122k
    Status seek_to_position_in_page(size_t pos) override {
335
122k
        DCHECK(_parsed) << "Must call init()";
336
122k
        if (_num_elements == 0) [[unlikely]] {
337
10
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
10
        }
342
343
122k
        DCHECK_LE(pos, _num_elements);
344
122k
        _cur_index = pos;
345
122k
        return Status::OK();
346
122k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.98k
    Status seek_to_position_in_page(size_t pos) override {
335
1.98k
        DCHECK(_parsed) << "Must call init()";
336
1.98k
        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.98k
        DCHECK_LE(pos, _num_elements);
344
1.98k
        _cur_index = pos;
345
1.98k
        return Status::OK();
346
1.98k
    }
_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.50M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.50M
        DCHECK(_parsed);
389
1.50M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.50M
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.50M
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.50M
        *n = max_fetch;
398
1.50M
        if constexpr (forward_index) {
399
1.33M
            _cur_index += max_fetch;
400
1.33M
        }
401
402
1.50M
        return Status::OK();
403
1.50M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
369k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
369k
        DCHECK(_parsed);
389
369k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
369k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
369k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
369k
        *n = max_fetch;
398
369k
        if constexpr (forward_index) {
399
369k
            _cur_index += max_fetch;
400
369k
        }
401
402
369k
        return Status::OK();
403
369k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
181k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
181k
        DCHECK(_parsed);
389
181k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
181k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
181k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
181k
        *n = max_fetch;
398
181k
        if constexpr (forward_index) {
399
181k
            _cur_index += max_fetch;
400
181k
        }
401
402
181k
        return Status::OK();
403
181k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
10.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
10.8k
        DCHECK(_parsed);
389
10.8k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
10.8k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
10.8k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
10.8k
        *n = max_fetch;
398
10.8k
        if constexpr (forward_index) {
399
10.8k
            _cur_index += max_fetch;
400
10.8k
        }
401
402
10.8k
        return Status::OK();
403
10.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
65.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
65.1k
        DCHECK(_parsed);
389
65.1k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
65.1k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
65.1k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
65.1k
        *n = max_fetch;
398
65.1k
        if constexpr (forward_index) {
399
65.1k
            _cur_index += max_fetch;
400
65.1k
        }
401
402
65.1k
        return Status::OK();
403
65.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
18.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
18.5k
        DCHECK(_parsed);
389
18.5k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
18.5k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
18.5k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
18.5k
        *n = max_fetch;
398
18.5k
        if constexpr (forward_index) {
399
18.5k
            _cur_index += max_fetch;
400
18.5k
        }
401
402
18.5k
        return Status::OK();
403
18.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
134k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
134k
        DCHECK(_parsed);
389
134k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
134k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
134k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
134k
        *n = max_fetch;
398
134k
        if constexpr (forward_index) {
399
134k
            _cur_index += max_fetch;
400
134k
        }
401
402
134k
        return Status::OK();
403
134k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
169k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
169k
        DCHECK(_parsed);
389
169k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
169k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
169k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
169k
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
169k
        return Status::OK();
403
169k
    }
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.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
13.8k
        DCHECK(_parsed);
389
13.8k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
13.8k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
13.8k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
13.8k
        *n = max_fetch;
398
13.8k
        if constexpr (forward_index) {
399
13.8k
            _cur_index += max_fetch;
400
13.8k
        }
401
402
13.8k
        return Status::OK();
403
13.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
21.3k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
21.3k
        DCHECK(_parsed);
389
21.3k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
21.3k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
21.3k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
21.3k
        *n = max_fetch;
398
21.3k
        if constexpr (forward_index) {
399
21.3k
            _cur_index += max_fetch;
400
21.3k
        }
401
402
21.3k
        return Status::OK();
403
21.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.12k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.12k
        DCHECK(_parsed);
389
3.12k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.12k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.12k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.12k
        *n = max_fetch;
398
3.12k
        if constexpr (forward_index) {
399
3.12k
            _cur_index += max_fetch;
400
3.12k
        }
401
402
3.12k
        return Status::OK();
403
3.12k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
373k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
373k
        DCHECK(_parsed);
389
373k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
373k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
373k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
373k
        *n = max_fetch;
398
373k
        if constexpr (forward_index) {
399
373k
            _cur_index += max_fetch;
400
373k
        }
401
402
373k
        return Status::OK();
403
373k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
64.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
64.8k
        DCHECK(_parsed);
389
64.8k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
64.8k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
64.8k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
64.8k
        *n = max_fetch;
398
64.8k
        if constexpr (forward_index) {
399
64.8k
            _cur_index += max_fetch;
400
64.8k
        }
401
402
64.8k
        return Status::OK();
403
64.8k
    }
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.14k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.14k
        DCHECK(_parsed);
389
1.14k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.14k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.14k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.14k
        *n = max_fetch;
398
1.14k
        if constexpr (forward_index) {
399
1.14k
            _cur_index += max_fetch;
400
1.14k
        }
401
402
1.14k
        return Status::OK();
403
1.14k
    }
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.57k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
7.57k
        DCHECK(_parsed);
389
7.57k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
7.57k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
7.57k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
7.57k
        *n = max_fetch;
398
7.57k
        if constexpr (forward_index) {
399
7.57k
            _cur_index += max_fetch;
400
7.57k
        }
401
402
7.57k
        return Status::OK();
403
7.57k
    }
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.24k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.24k
        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.24k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.24k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.24k
        *n = max_fetch;
398
1.24k
        if constexpr (forward_index) {
399
1.24k
            _cur_index += max_fetch;
400
1.24k
        }
401
402
1.24k
        return Status::OK();
403
1.24k
    }
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.90k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
7.90k
        DCHECK(_parsed);
389
7.90k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
7.90k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
7.90k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
7.90k
        *n = max_fetch;
398
7.90k
        if constexpr (forward_index) {
399
7.90k
            _cur_index += max_fetch;
400
7.90k
        }
401
402
7.90k
        return Status::OK();
403
7.90k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
31.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
31.7k
        DCHECK(_parsed);
389
31.7k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
31.7k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
31.7k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
31.7k
        *n = max_fetch;
398
31.7k
        if constexpr (forward_index) {
399
31.7k
            _cur_index += max_fetch;
400
31.7k
        }
401
402
31.7k
        return Status::OK();
403
31.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
20.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
20.6k
        DCHECK(_parsed);
389
20.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
20.6k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
20.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
20.6k
        *n = max_fetch;
398
20.6k
        if constexpr (forward_index) {
399
20.6k
            _cur_index += max_fetch;
400
20.6k
        }
401
402
20.6k
        return Status::OK();
403
20.6k
    }
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.23k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.23k
        DCHECK(_parsed);
389
3.23k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.23k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.23k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.23k
        *n = max_fetch;
398
3.23k
        if constexpr (forward_index) {
399
3.23k
            _cur_index += max_fetch;
400
3.23k
        }
401
402
3.23k
        return Status::OK();
403
3.23k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
759
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
759
        DCHECK(_parsed);
389
759
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
759
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
759
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
759
        *n = max_fetch;
398
759
        if constexpr (forward_index) {
399
759
            _cur_index += max_fetch;
400
759
        }
401
402
759
        return Status::OK();
403
759
    }
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.33M
    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
369k
    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
181k
    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
10.8k
    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
65.1k
    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
18.5k
    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
134k
    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.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
21.3k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
3.12k
    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
373k
    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
64.8k
    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.14k
    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.58k
    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.24k
    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.90k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
31.7k
    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
20.6k
    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.23k
    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
759
    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
293k
                          MutableColumnPtr& dst) override {
409
293k
        DCHECK(_parsed);
410
293k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
293k
        auto total = *n;
416
293k
        auto read_count = 0;
417
293k
        _buffer.resize(total);
418
74.0M
        for (size_t i = 0; i < total; ++i) {
419
73.7M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
73.7M
            if (UNLIKELY(ord >= _num_elements)) {
421
10.6k
                break;
422
10.6k
            }
423
424
73.7M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
73.7M
        }
426
427
293k
        if (LIKELY(read_count > 0)) {
428
293k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
293k
        }
430
431
293k
        *n = read_count;
432
293k
        return Status::OK();
433
293k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
66.2k
                          MutableColumnPtr& dst) override {
409
66.2k
        DCHECK(_parsed);
410
66.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
66.2k
        auto total = *n;
416
66.2k
        auto read_count = 0;
417
66.2k
        _buffer.resize(total);
418
17.1M
        for (size_t i = 0; i < total; ++i) {
419
17.0M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
17.0M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.32k
                break;
422
1.32k
            }
423
424
17.0M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
17.0M
        }
426
427
66.2k
        if (LIKELY(read_count > 0)) {
428
66.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
66.2k
        }
430
431
66.2k
        *n = read_count;
432
66.2k
        return Status::OK();
433
66.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
18.2k
                          MutableColumnPtr& dst) override {
409
18.2k
        DCHECK(_parsed);
410
18.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
18.2k
        auto total = *n;
416
18.2k
        auto read_count = 0;
417
18.2k
        _buffer.resize(total);
418
712k
        for (size_t i = 0; i < total; ++i) {
419
694k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
694k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
694k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
694k
        }
426
427
18.3k
        if (LIKELY(read_count > 0)) {
428
18.3k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
18.3k
        }
430
431
18.2k
        *n = read_count;
432
18.2k
        return Status::OK();
433
18.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4.48k
                          MutableColumnPtr& dst) override {
409
4.48k
        DCHECK(_parsed);
410
4.48k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.48k
        auto total = *n;
416
4.48k
        auto read_count = 0;
417
4.48k
        _buffer.resize(total);
418
19.3k
        for (size_t i = 0; i < total; ++i) {
419
14.8k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.8k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
14.8k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.8k
        }
426
427
4.48k
        if (LIKELY(read_count > 0)) {
428
4.48k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.48k
        }
430
431
4.48k
        *n = read_count;
432
4.48k
        return Status::OK();
433
4.48k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
20.3k
                          MutableColumnPtr& dst) override {
409
20.3k
        DCHECK(_parsed);
410
20.3k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
20.3k
        auto total = *n;
416
20.3k
        auto read_count = 0;
417
20.3k
        _buffer.resize(total);
418
1.01M
        for (size_t i = 0; i < total; ++i) {
419
998k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
998k
            if (UNLIKELY(ord >= _num_elements)) {
421
18
                break;
422
18
            }
423
424
998k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
998k
        }
426
427
20.3k
        if (LIKELY(read_count > 0)) {
428
20.3k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
20.3k
        }
430
431
20.3k
        *n = read_count;
432
20.3k
        return Status::OK();
433
20.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
6.02k
                          MutableColumnPtr& dst) override {
409
6.02k
        DCHECK(_parsed);
410
6.02k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
6.02k
        auto total = *n;
416
6.02k
        auto read_count = 0;
417
6.02k
        _buffer.resize(total);
418
15.3k
        for (size_t i = 0; i < total; ++i) {
419
9.28k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.28k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
9.28k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.28k
        }
426
427
6.02k
        if (LIKELY(read_count > 0)) {
428
6.02k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
6.02k
        }
430
431
6.02k
        *n = read_count;
432
6.02k
        return Status::OK();
433
6.02k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
29.3k
                          MutableColumnPtr& dst) override {
409
29.3k
        DCHECK(_parsed);
410
29.3k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
29.3k
        auto total = *n;
416
29.3k
        auto read_count = 0;
417
29.3k
        _buffer.resize(total);
418
364k
        for (size_t i = 0; i < total; ++i) {
419
334k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
334k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
334k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
334k
        }
426
427
29.3k
        if (LIKELY(read_count > 0)) {
428
29.3k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
29.3k
        }
430
431
29.3k
        *n = read_count;
432
29.3k
        return Status::OK();
433
29.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
9.95k
                          MutableColumnPtr& dst) override {
409
9.95k
        DCHECK(_parsed);
410
9.95k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
9.95k
        auto total = *n;
416
9.95k
        auto read_count = 0;
417
9.95k
        _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
9.95k
        if (LIKELY(read_count > 0)) {
428
9.94k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
9.94k
        }
430
431
9.95k
        *n = read_count;
432
9.95k
        return Status::OK();
433
9.95k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
17.0k
                          MutableColumnPtr& dst) override {
409
17.0k
        DCHECK(_parsed);
410
17.0k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
17.0k
        auto total = *n;
416
17.0k
        auto read_count = 0;
417
17.0k
        _buffer.resize(total);
418
5.91M
        for (size_t i = 0; i < total; ++i) {
419
5.90M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
5.90M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.53k
                break;
422
1.53k
            }
423
424
5.90M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
5.90M
        }
426
427
17.0k
        if (LIKELY(read_count > 0)) {
428
17.0k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
17.0k
        }
430
431
17.0k
        *n = read_count;
432
17.0k
        return Status::OK();
433
17.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.31k
                          MutableColumnPtr& dst) override {
409
1.31k
        DCHECK(_parsed);
410
1.31k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.31k
        auto total = *n;
416
1.31k
        auto read_count = 0;
417
1.31k
        _buffer.resize(total);
418
432k
        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
14
                break;
422
14
            }
423
424
431k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
431k
        }
426
427
1.31k
        if (LIKELY(read_count > 0)) {
428
1.31k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.31k
        }
430
431
1.31k
        *n = read_count;
432
1.31k
        return Status::OK();
433
1.31k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
29.5k
                          MutableColumnPtr& dst) override {
409
29.5k
        DCHECK(_parsed);
410
29.5k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
29.5k
        auto total = *n;
416
29.5k
        auto read_count = 0;
417
29.5k
        _buffer.resize(total);
418
6.76M
        for (size_t i = 0; i < total; ++i) {
419
6.73M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
6.73M
            if (UNLIKELY(ord >= _num_elements)) {
421
986
                break;
422
986
            }
423
424
6.73M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
6.73M
        }
426
427
29.5k
        if (LIKELY(read_count > 0)) {
428
29.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
29.5k
        }
430
431
29.5k
        *n = read_count;
432
29.5k
        return Status::OK();
433
29.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
30.6k
                          MutableColumnPtr& dst) override {
409
30.6k
        DCHECK(_parsed);
410
30.6k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
30.6k
        auto total = *n;
416
30.6k
        auto read_count = 0;
417
30.6k
        _buffer.resize(total);
418
9.46M
        for (size_t i = 0; i < total; ++i) {
419
9.43M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.43M
            if (UNLIKELY(ord >= _num_elements)) {
421
204
                break;
422
204
            }
423
424
9.43M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.43M
        }
426
427
30.6k
        if (LIKELY(read_count > 0)) {
428
30.6k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
30.6k
        }
430
431
30.6k
        *n = read_count;
432
30.6k
        return Status::OK();
433
30.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1.64k
                          MutableColumnPtr& dst) override {
409
1.64k
        DCHECK(_parsed);
410
1.64k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.64k
        auto total = *n;
416
1.64k
        auto read_count = 0;
417
1.64k
        _buffer.resize(total);
418
428k
        for (size_t i = 0; i < total; ++i) {
419
426k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
426k
            if (UNLIKELY(ord >= _num_elements)) {
421
248
                break;
422
248
            }
423
424
426k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
426k
        }
426
427
1.64k
        if (LIKELY(read_count > 0)) {
428
1.64k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.64k
        }
430
431
1.64k
        *n = read_count;
432
1.64k
        return Status::OK();
433
1.64k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
11.7k
                          MutableColumnPtr& dst) override {
409
11.7k
        DCHECK(_parsed);
410
11.7k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
11.7k
        auto total = *n;
416
11.7k
        auto read_count = 0;
417
11.7k
        _buffer.resize(total);
418
25.0k
        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
11.7k
        if (LIKELY(read_count > 0)) {
428
11.7k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
11.7k
        }
430
431
11.7k
        *n = read_count;
432
11.7k
        return Status::OK();
433
11.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
139
                          MutableColumnPtr& dst) override {
409
139
        DCHECK(_parsed);
410
139
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
139
        auto total = *n;
416
139
        auto read_count = 0;
417
139
        _buffer.resize(total);
418
283
        for (size_t i = 0; i < total; ++i) {
419
144
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
144
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
144
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
144
        }
426
427
139
        if (LIKELY(read_count > 0)) {
428
139
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
139
        }
430
431
139
        *n = read_count;
432
139
        return Status::OK();
433
139
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4.54k
                          MutableColumnPtr& dst) override {
409
4.54k
        DCHECK(_parsed);
410
4.54k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.54k
        auto total = *n;
416
4.54k
        auto read_count = 0;
417
4.54k
        _buffer.resize(total);
418
18.8k
        for (size_t i = 0; i < total; ++i) {
419
14.2k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.2k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
14.2k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.2k
        }
426
427
4.55k
        if (LIKELY(read_count > 0)) {
428
4.55k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.55k
        }
430
431
4.54k
        *n = read_count;
432
4.54k
        return Status::OK();
433
4.54k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
27.3k
                          MutableColumnPtr& dst) override {
409
27.3k
        DCHECK(_parsed);
410
27.3k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
27.3k
        auto total = *n;
416
27.3k
        auto read_count = 0;
417
27.3k
        _buffer.resize(total);
418
21.8M
        for (size_t i = 0; i < total; ++i) {
419
21.7M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
21.7M
            if (UNLIKELY(ord >= _num_elements)) {
421
5.51k
                break;
422
5.51k
            }
423
424
21.7M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
21.7M
        }
426
427
27.3k
        if (LIKELY(read_count > 0)) {
428
27.3k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
27.3k
        }
430
431
27.3k
        *n = read_count;
432
27.3k
        return Status::OK();
433
27.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.2k
                          MutableColumnPtr& dst) override {
409
13.2k
        DCHECK(_parsed);
410
13.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.2k
        auto total = *n;
416
13.2k
        auto read_count = 0;
417
13.2k
        _buffer.resize(total);
418
8.78M
        for (size_t i = 0; i < total; ++i) {
419
8.77M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
8.77M
            if (UNLIKELY(ord >= _num_elements)) {
421
741
                break;
422
741
            }
423
424
8.77M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
8.77M
        }
426
427
13.2k
        if (LIKELY(read_count > 0)) {
428
13.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.2k
        }
430
431
13.2k
        *n = read_count;
432
13.2k
        return Status::OK();
433
13.2k
    }
_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
443
                          MutableColumnPtr& dst) override {
409
443
        DCHECK(_parsed);
410
443
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
443
        auto total = *n;
416
443
        auto read_count = 0;
417
443
        _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
443
        if (LIKELY(read_count > 0)) {
428
443
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
443
        }
430
431
443
        *n = read_count;
432
443
        return Status::OK();
433
443
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
354
                          MutableColumnPtr& dst) override {
409
354
        DCHECK(_parsed);
410
354
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
354
        auto total = *n;
416
354
        auto read_count = 0;
417
354
        _buffer.resize(total);
418
1.22k
        for (size_t i = 0; i < total; ++i) {
419
869
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
869
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
869
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
869
        }
426
427
354
        if (LIKELY(read_count > 0)) {
428
352
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
352
        }
430
431
354
        *n = read_count;
432
354
        return Status::OK();
433
354
    }
434
435
169k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
169k
        return next_batch<false>(n, dst);
437
169k
    }
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
169k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
169k
        return next_batch<false>(n, dst);
437
169k
    }
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
2.99M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
1.70M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
441
674
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
441
261
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
8.74k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
441
269
    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
236k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
209k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
441
221k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
441
238k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
441
39.6k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
441
208k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Line
Count
Source
441
1.04k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE13current_indexEv
Line
Count
Source
441
6
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE13current_indexEv
Line
Count
Source
441
3.42k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
441
937
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
441
118k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE13current_indexEv
Line
Count
Source
441
308
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE13current_indexEv
Line
Count
Source
441
39
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
Line
Count
Source
441
98
    size_t current_index() const override { return _cur_index; }
442
443
76.2M
    char* get_data(size_t index) const {
444
76.2M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
76.2M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
18.3M
    char* get_data(size_t index) const {
444
18.3M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
18.3M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
876k
    char* get_data(size_t index) const {
444
876k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
876k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
443
25.6k
    char* get_data(size_t index) const {
444
25.6k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
25.6k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
443
1.06M
    char* get_data(size_t index) const {
444
1.06M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.06M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
27.8k
    char* get_data(size_t index) const {
444
27.8k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
27.8k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
638k
    char* get_data(size_t index) const {
444
638k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
638k
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
1.15M
    char* get_data(size_t index) const {
444
1.15M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.15M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
5.92M
    char* get_data(size_t index) const {
444
5.92M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
5.92M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
434k
    char* get_data(size_t index) const {
444
434k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
434k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
7.11M
    char* get_data(size_t index) const {
444
7.11M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
7.11M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
443
9.49M
    char* get_data(size_t index) const {
444
9.49M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.49M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
443
427k
    char* get_data(size_t index) const {
444
427k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
427k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
443
20.8k
    char* get_data(size_t index) const {
444
20.8k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20.8k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
443
1.39k
    char* get_data(size_t index) const {
444
1.39k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.39k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
443
22.1k
    char* get_data(size_t index) const {
444
22.1k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
22.1k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
443
21.8M
    char* get_data(size_t index) const {
444
21.8M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
21.8M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
8.79M
    char* get_data(size_t index) const {
444
8.79M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
8.79M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
443
5.05k
    char* get_data(size_t index) const {
444
5.05k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
5.05k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Line
Count
Source
443
1.46k
    char* get_data(size_t index) const {
444
1.46k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.46k
    }
_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