Coverage Report

Created: 2026-08-14 08:30

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
821k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
426k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
61.9k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
8.89k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
80.6k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
10.7k
    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
13.0k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
95
15.5k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
342
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
38.7k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
95
46.8k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
439
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
95
7.54k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
342
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
95
10.0k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
95
12.4k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
95
17.4k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
95
1.21k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
95
720
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
95
718
    Status init() override { return reset(); }
96
97
167M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
166M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
69.8k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
8.61k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
459k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
10.5k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
68.2k
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12is_page_fullEv
Line
Count
Source
97
12.7k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
97
17.5k
    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
361
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
46.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
46.5k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
97
505
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
Line
Count
Source
97
7.57k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
97
255
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
97
5.41k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
25.7k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
97
18.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Line
Count
Source
97
1.39k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Line
Count
Source
97
629
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
97
642
    bool is_page_full() override { return _remain_element_capacity == 0; }
98
99
1.51M
    Status add(const uint8_t* vals, size_t* count) override {
100
1.51M
        return add_internal<false>(vals, count);
101
1.51M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
99
713k
    Status add(const uint8_t* vals, size_t* count) override {
100
713k
        return add_internal<false>(vals, count);
101
713k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
69.8k
    Status add(const uint8_t* vals, size_t* count) override {
100
69.8k
        return add_internal<false>(vals, count);
101
69.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
8.61k
    Status add(const uint8_t* vals, size_t* count) override {
100
8.61k
        return add_internal<false>(vals, count);
101
8.61k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
459k
    Status add(const uint8_t* vals, size_t* count) override {
100
459k
        return add_internal<false>(vals, count);
101
459k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
10.5k
    Status add(const uint8_t* vals, size_t* count) override {
100
10.5k
        return add_internal<false>(vals, count);
101
10.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
68.2k
    Status add(const uint8_t* vals, size_t* count) override {
100
68.2k
        return add_internal<false>(vals, count);
101
68.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
99
12.7k
    Status add(const uint8_t* vals, size_t* count) override {
100
12.7k
        return add_internal<false>(vals, count);
101
12.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
99
17.5k
    Status add(const uint8_t* vals, size_t* count) override {
100
17.5k
        return add_internal<false>(vals, count);
101
17.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
361
    Status add(const uint8_t* vals, size_t* count) override {
100
361
        return add_internal<false>(vals, count);
101
361
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
46.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
46.3k
        return add_internal<false>(vals, count);
101
46.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
46.5k
    Status add(const uint8_t* vals, size_t* count) override {
100
46.5k
        return add_internal<false>(vals, count);
101
46.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
99
505
    Status add(const uint8_t* vals, size_t* count) override {
100
505
        return add_internal<false>(vals, count);
101
505
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
Line
Count
Source
99
7.57k
    Status add(const uint8_t* vals, size_t* count) override {
100
7.57k
        return add_internal<false>(vals, count);
101
7.57k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
255
    Status add(const uint8_t* vals, size_t* count) override {
100
255
        return add_internal<false>(vals, count);
101
255
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
99
5.41k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.41k
        return add_internal<false>(vals, count);
101
5.41k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
25.7k
    Status add(const uint8_t* vals, size_t* count) override {
100
25.7k
        return add_internal<false>(vals, count);
101
25.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
99
18.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
18.3k
        return add_internal<false>(vals, count);
101
18.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Line
Count
Source
99
1.39k
    Status add(const uint8_t* vals, size_t* count) override {
100
1.39k
        return add_internal<false>(vals, count);
101
1.39k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Line
Count
Source
99
629
    Status add(const uint8_t* vals, size_t* count) override {
100
629
        return add_internal<false>(vals, count);
101
629
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
99
642
    Status add(const uint8_t* vals, size_t* count) override {
100
642
        return add_internal<false>(vals, count);
101
642
    }
102
103
163M
    Status single_add(const uint8_t* vals, size_t* count) {
104
163M
        return add_internal<true>(vals, count);
105
163M
    }
106
107
    template <bool single>
108
164M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
164M
        DCHECK(!_finished);
110
164M
        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
164M
        uint32_t to_add = cast_set<UInt32>(
126
164M
                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
164M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
164M
        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
164M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
164M
        _count += to_add;
134
164M
        _remain_element_capacity -= to_add;
135
164M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
164M
        *num_written = to_add;
138
164M
        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
163M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
163M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
163M
                        *reinterpret_cast<const uint32_t*>(vals);
149
163M
                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
163M
        }
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
164M
        return Status::OK();
159
164M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
713k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
713k
        DCHECK(!_finished);
110
713k
        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
713k
        uint32_t to_add = cast_set<UInt32>(
126
713k
                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
713k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
713k
        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
713k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
713k
        _count += to_add;
134
713k
        _remain_element_capacity -= to_add;
135
713k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
713k
        *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
713k
        memcpy(&_data[orig_size], vals, to_add_size);
158
713k
        return Status::OK();
159
713k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
163M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
163M
        DCHECK(!_finished);
110
163M
        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
163M
        uint32_t to_add = cast_set<UInt32>(
126
163M
                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
163M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
163M
        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
163M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
163M
        _count += to_add;
134
163M
        _remain_element_capacity -= to_add;
135
163M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
163M
        *num_written = to_add;
138
163M
        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
163M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
163M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
163M
                        *reinterpret_cast<const uint32_t*>(vals);
149
163M
                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
163M
        }
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
163M
        return Status::OK();
159
163M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
69.8k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
69.8k
        DCHECK(!_finished);
110
69.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
69.8k
        uint32_t to_add = cast_set<UInt32>(
126
69.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
69.8k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
69.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
69.8k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
69.8k
        _count += to_add;
134
69.8k
        _remain_element_capacity -= to_add;
135
69.8k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
69.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
69.8k
        memcpy(&_data[orig_size], vals, to_add_size);
158
69.8k
        return Status::OK();
159
69.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
8.61k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
8.61k
        DCHECK(!_finished);
110
8.61k
        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
8.61k
        uint32_t to_add = cast_set<UInt32>(
126
8.61k
                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
8.61k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
8.61k
        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
8.61k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
8.61k
        _count += to_add;
134
8.61k
        _remain_element_capacity -= to_add;
135
8.61k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
8.61k
        *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
8.61k
        memcpy(&_data[orig_size], vals, to_add_size);
158
8.61k
        return Status::OK();
159
8.61k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
459k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
459k
        DCHECK(!_finished);
110
459k
        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
459k
        uint32_t to_add = cast_set<UInt32>(
126
459k
                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
459k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
459k
        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
459k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
459k
        _count += to_add;
134
459k
        _remain_element_capacity -= to_add;
135
459k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
459k
        *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
459k
        memcpy(&_data[orig_size], vals, to_add_size);
158
459k
        return Status::OK();
159
459k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
10.5k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
10.5k
        DCHECK(!_finished);
110
10.5k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
10.5k
        uint32_t to_add = cast_set<UInt32>(
126
10.5k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
10.5k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
10.5k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
10.5k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
10.5k
        _count += to_add;
134
10.5k
        _remain_element_capacity -= to_add;
135
10.5k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
10.5k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
10.5k
        memcpy(&_data[orig_size], vals, to_add_size);
158
10.5k
        return Status::OK();
159
10.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
68.2k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
68.2k
        DCHECK(!_finished);
110
68.2k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
68.2k
        uint32_t to_add = cast_set<UInt32>(
126
68.2k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
68.2k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
68.2k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
68.2k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
68.2k
        _count += to_add;
134
68.2k
        _remain_element_capacity -= to_add;
135
68.2k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
68.2k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
68.2k
        memcpy(&_data[orig_size], vals, to_add_size);
158
68.2k
        return Status::OK();
159
68.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
12.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
12.7k
        DCHECK(!_finished);
110
12.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
12.7k
        uint32_t to_add = cast_set<UInt32>(
126
12.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
12.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
12.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
12.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
12.7k
        _count += to_add;
134
12.7k
        _remain_element_capacity -= to_add;
135
12.7k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
12.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
12.7k
        memcpy(&_data[orig_size], vals, to_add_size);
158
12.7k
        return Status::OK();
159
12.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
17.5k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
17.5k
        DCHECK(!_finished);
110
17.5k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
17.5k
        uint32_t to_add = cast_set<UInt32>(
126
17.5k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
17.5k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
17.5k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
17.5k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
17.5k
        _count += to_add;
134
17.5k
        _remain_element_capacity -= to_add;
135
17.5k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
17.5k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
17.5k
        memcpy(&_data[orig_size], vals, to_add_size);
158
17.5k
        return Status::OK();
159
17.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
361
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
361
        DCHECK(!_finished);
110
361
        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
361
        uint32_t to_add = cast_set<UInt32>(
126
361
                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
361
        int to_add_size = to_add * SIZE_OF_TYPE;
129
361
        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
361
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
361
        _count += to_add;
134
361
        _remain_element_capacity -= to_add;
135
361
        _raw_data_size += to_add_size;
136
        // return added number through count
137
361
        *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
361
        memcpy(&_data[orig_size], vals, to_add_size);
158
361
        return Status::OK();
159
361
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
46.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
46.3k
        DCHECK(!_finished);
110
46.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
46.3k
        uint32_t to_add = cast_set<UInt32>(
126
46.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
46.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
46.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
46.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
46.3k
        _count += to_add;
134
46.3k
        _remain_element_capacity -= to_add;
135
46.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
46.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
46.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
46.3k
        return Status::OK();
159
46.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
46.5k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
46.5k
        DCHECK(!_finished);
110
46.5k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
46.5k
        uint32_t to_add = cast_set<UInt32>(
126
46.5k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
46.5k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
46.5k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
46.5k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
46.5k
        _count += to_add;
134
46.5k
        _remain_element_capacity -= to_add;
135
46.5k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
46.5k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
46.5k
        memcpy(&_data[orig_size], vals, to_add_size);
158
46.5k
        return Status::OK();
159
46.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
505
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
505
        DCHECK(!_finished);
110
505
        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
505
        uint32_t to_add = cast_set<UInt32>(
126
505
                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
505
        int to_add_size = to_add * SIZE_OF_TYPE;
129
505
        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
505
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
505
        _count += to_add;
134
505
        _remain_element_capacity -= to_add;
135
505
        _raw_data_size += to_add_size;
136
        // return added number through count
137
505
        *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
505
        memcpy(&_data[orig_size], vals, to_add_size);
158
505
        return Status::OK();
159
505
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
7.57k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
7.57k
        DCHECK(!_finished);
110
7.57k
        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.57k
        uint32_t to_add = cast_set<UInt32>(
126
7.57k
                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.57k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
7.57k
        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.57k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
7.57k
        _count += to_add;
134
7.57k
        _remain_element_capacity -= to_add;
135
7.57k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
7.57k
        *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.57k
        memcpy(&_data[orig_size], vals, to_add_size);
158
7.57k
        return Status::OK();
159
7.57k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
255
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
255
        DCHECK(!_finished);
110
255
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
255
        uint32_t to_add = cast_set<UInt32>(
126
255
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
255
        int to_add_size = to_add * SIZE_OF_TYPE;
129
255
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
255
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
255
        _count += to_add;
134
255
        _remain_element_capacity -= to_add;
135
255
        _raw_data_size += to_add_size;
136
        // return added number through count
137
255
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
255
        memcpy(&_data[orig_size], vals, to_add_size);
158
255
        return Status::OK();
159
255
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
5.41k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.41k
        DCHECK(!_finished);
110
5.41k
        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.41k
        uint32_t to_add = cast_set<UInt32>(
126
5.41k
                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.41k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.41k
        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.41k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.41k
        _count += to_add;
134
5.41k
        _remain_element_capacity -= to_add;
135
5.41k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.41k
        *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.41k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.41k
        return Status::OK();
159
5.41k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
25.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
25.7k
        DCHECK(!_finished);
110
25.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
25.7k
        uint32_t to_add = cast_set<UInt32>(
126
25.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
25.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
25.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
25.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
25.7k
        _count += to_add;
134
25.7k
        _remain_element_capacity -= to_add;
135
25.7k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
25.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
25.7k
        memcpy(&_data[orig_size], vals, to_add_size);
158
25.7k
        return Status::OK();
159
25.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
18.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
18.3k
        DCHECK(!_finished);
110
18.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
18.3k
        uint32_t to_add = cast_set<UInt32>(
126
18.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
18.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
18.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
18.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
18.3k
        _count += to_add;
134
18.3k
        _remain_element_capacity -= to_add;
135
18.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
18.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
18.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
18.3k
        return Status::OK();
159
18.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
1.39k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
1.39k
        DCHECK(!_finished);
110
1.39k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
1.39k
        uint32_t to_add = cast_set<UInt32>(
126
1.39k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
1.39k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
1.39k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
1.39k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
1.39k
        _count += to_add;
134
1.39k
        _remain_element_capacity -= to_add;
135
1.39k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
1.39k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
1.39k
        memcpy(&_data[orig_size], vals, to_add_size);
158
1.39k
        return Status::OK();
159
1.39k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
629
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
629
        DCHECK(!_finished);
110
629
        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
629
        uint32_t to_add = cast_set<UInt32>(
126
629
                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
629
        int to_add_size = to_add * SIZE_OF_TYPE;
129
629
        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
629
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
629
        _count += to_add;
134
629
        _remain_element_capacity -= to_add;
135
629
        _raw_data_size += to_add_size;
136
        // return added number through count
137
629
        *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
629
        memcpy(&_data[orig_size], vals, to_add_size);
158
629
        return Status::OK();
159
629
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
642
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
642
        DCHECK(!_finished);
110
642
        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
642
        uint32_t to_add = cast_set<UInt32>(
126
642
                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
642
        int to_add_size = to_add * SIZE_OF_TYPE;
129
642
        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
642
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
642
        _count += to_add;
134
642
        _remain_element_capacity -= to_add;
135
642
        _raw_data_size += to_add_size;
136
        // return added number through count
137
642
        *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
642
        memcpy(&_data[orig_size], vals, to_add_size);
158
642
        return Status::OK();
159
642
    }
160
161
827k
    Status finish(OwnedSlice* slice) override {
162
827k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
827k
        return Status::OK();
164
827k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
422k
    Status finish(OwnedSlice* slice) override {
162
422k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
422k
        return Status::OK();
164
422k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
61.7k
    Status finish(OwnedSlice* slice) override {
162
61.7k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
61.7k
        return Status::OK();
164
61.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
8.50k
    Status finish(OwnedSlice* slice) override {
162
8.50k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
8.50k
        return Status::OK();
164
8.50k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
85.1k
    Status finish(OwnedSlice* slice) override {
162
85.1k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
85.1k
        return Status::OK();
164
85.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
10.6k
    Status finish(OwnedSlice* slice) override {
162
10.6k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
10.6k
        return Status::OK();
164
10.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
67.7k
    Status finish(OwnedSlice* slice) override {
162
67.7k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
67.7k
        return Status::OK();
164
67.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
12.2k
    Status finish(OwnedSlice* slice) override {
162
12.2k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
12.2k
        return Status::OK();
164
12.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
15.3k
    Status finish(OwnedSlice* slice) override {
162
15.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
15.3k
        return Status::OK();
164
15.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
354
    Status finish(OwnedSlice* slice) override {
162
354
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
354
        return Status::OK();
164
354
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
39.4k
    Status finish(OwnedSlice* slice) override {
162
39.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
39.4k
        return Status::OK();
164
39.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
45.8k
    Status finish(OwnedSlice* slice) override {
162
45.8k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
45.8k
        return Status::OK();
164
45.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
593
    Status finish(OwnedSlice* slice) override {
162
593
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
593
        return Status::OK();
164
593
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7.65k
    Status finish(OwnedSlice* slice) override {
162
7.65k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.66k
        return Status::OK();
164
7.65k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
255
    Status finish(OwnedSlice* slice) override {
162
255
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
255
        return Status::OK();
164
255
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
10.0k
    Status finish(OwnedSlice* slice) override {
162
10.0k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
10.0k
        return Status::OK();
164
10.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
19.4k
    Status finish(OwnedSlice* slice) override {
162
19.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
19.4k
        return Status::OK();
164
19.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
17.5k
    Status finish(OwnedSlice* slice) override {
162
17.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
17.5k
        return Status::OK();
164
17.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
1.12k
    Status finish(OwnedSlice* slice) override {
162
1.12k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
1.12k
        return Status::OK();
164
1.12k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
633
    Status finish(OwnedSlice* slice) override {
162
633
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
633
        return Status::OK();
164
633
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
630
    Status finish(OwnedSlice* slice) override {
162
630
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
630
        return Status::OK();
164
630
    }
165
166
1.97M
    Status reset() override {
167
1.97M
        RETURN_IF_CATCH_EXCEPTION({
168
1.97M
            size_t block_size = _options.data_page_size;
169
1.97M
            _count = 0;
170
1.97M
            _raw_data_size = 0;
171
1.97M
            _data.clear();
172
1.97M
            _data.reserve(block_size);
173
1.97M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.97M
                    << "buffer must be naturally-aligned";
175
1.97M
            _buffer.clear();
176
1.97M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.97M
            _finished = false;
178
1.97M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.97M
        });
180
1.98M
        return Status::OK();
181
1.97M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
166
1.17M
    Status reset() override {
167
1.17M
        RETURN_IF_CATCH_EXCEPTION({
168
1.17M
            size_t block_size = _options.data_page_size;
169
1.17M
            _count = 0;
170
1.17M
            _raw_data_size = 0;
171
1.17M
            _data.clear();
172
1.17M
            _data.reserve(block_size);
173
1.17M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.17M
                    << "buffer must be naturally-aligned";
175
1.17M
            _buffer.clear();
176
1.17M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.17M
            _finished = false;
178
1.17M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.17M
        });
180
1.18M
        return Status::OK();
181
1.17M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
123k
    Status reset() override {
167
123k
        RETURN_IF_CATCH_EXCEPTION({
168
123k
            size_t block_size = _options.data_page_size;
169
123k
            _count = 0;
170
123k
            _raw_data_size = 0;
171
123k
            _data.clear();
172
123k
            _data.reserve(block_size);
173
123k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
123k
                    << "buffer must be naturally-aligned";
175
123k
            _buffer.clear();
176
123k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
123k
            _finished = false;
178
123k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
123k
        });
180
123k
        return Status::OK();
181
123k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
166
17.3k
    Status reset() override {
167
17.3k
        RETURN_IF_CATCH_EXCEPTION({
168
17.3k
            size_t block_size = _options.data_page_size;
169
17.3k
            _count = 0;
170
17.3k
            _raw_data_size = 0;
171
17.3k
            _data.clear();
172
17.3k
            _data.reserve(block_size);
173
17.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
17.3k
                    << "buffer must be naturally-aligned";
175
17.3k
            _buffer.clear();
176
17.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
17.3k
            _finished = false;
178
17.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
17.3k
        });
180
17.4k
        return Status::OK();
181
17.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
165k
    Status reset() override {
167
165k
        RETURN_IF_CATCH_EXCEPTION({
168
165k
            size_t block_size = _options.data_page_size;
169
165k
            _count = 0;
170
165k
            _raw_data_size = 0;
171
165k
            _data.clear();
172
165k
            _data.reserve(block_size);
173
165k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
165k
                    << "buffer must be naturally-aligned";
175
165k
            _buffer.clear();
176
165k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
165k
            _finished = false;
178
165k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
165k
        });
180
166k
        return Status::OK();
181
165k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
166
21.4k
    Status reset() override {
167
21.4k
        RETURN_IF_CATCH_EXCEPTION({
168
21.4k
            size_t block_size = _options.data_page_size;
169
21.4k
            _count = 0;
170
21.4k
            _raw_data_size = 0;
171
21.4k
            _data.clear();
172
21.4k
            _data.reserve(block_size);
173
21.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
21.4k
                    << "buffer must be naturally-aligned";
175
21.4k
            _buffer.clear();
176
21.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
21.4k
            _finished = false;
178
21.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
21.4k
        });
180
21.4k
        return Status::OK();
181
21.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
166
135k
    Status reset() override {
167
135k
        RETURN_IF_CATCH_EXCEPTION({
168
135k
            size_t block_size = _options.data_page_size;
169
135k
            _count = 0;
170
135k
            _raw_data_size = 0;
171
135k
            _data.clear();
172
135k
            _data.reserve(block_size);
173
135k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
135k
                    << "buffer must be naturally-aligned";
175
135k
            _buffer.clear();
176
135k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
135k
            _finished = false;
178
135k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
135k
        });
180
135k
        return Status::OK();
181
135k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
166
25.3k
    Status reset() override {
167
25.3k
        RETURN_IF_CATCH_EXCEPTION({
168
25.3k
            size_t block_size = _options.data_page_size;
169
25.3k
            _count = 0;
170
25.3k
            _raw_data_size = 0;
171
25.3k
            _data.clear();
172
25.3k
            _data.reserve(block_size);
173
25.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
25.3k
                    << "buffer must be naturally-aligned";
175
25.3k
            _buffer.clear();
176
25.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
25.3k
            _finished = false;
178
25.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
25.3k
        });
180
25.3k
        return Status::OK();
181
25.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
166
30.9k
    Status reset() override {
167
30.9k
        RETURN_IF_CATCH_EXCEPTION({
168
30.9k
            size_t block_size = _options.data_page_size;
169
30.9k
            _count = 0;
170
30.9k
            _raw_data_size = 0;
171
30.9k
            _data.clear();
172
30.9k
            _data.reserve(block_size);
173
30.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
30.9k
                    << "buffer must be naturally-aligned";
175
30.9k
            _buffer.clear();
176
30.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
30.9k
            _finished = false;
178
30.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
30.9k
        });
180
31.0k
        return Status::OK();
181
30.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
166
696
    Status reset() override {
167
696
        RETURN_IF_CATCH_EXCEPTION({
168
696
            size_t block_size = _options.data_page_size;
169
696
            _count = 0;
170
696
            _raw_data_size = 0;
171
696
            _data.clear();
172
696
            _data.reserve(block_size);
173
696
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
696
                    << "buffer must be naturally-aligned";
175
696
            _buffer.clear();
176
696
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
696
            _finished = false;
178
696
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
696
        });
180
696
        return Status::OK();
181
696
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
166
78.1k
    Status reset() override {
167
78.1k
        RETURN_IF_CATCH_EXCEPTION({
168
78.1k
            size_t block_size = _options.data_page_size;
169
78.1k
            _count = 0;
170
78.1k
            _raw_data_size = 0;
171
78.1k
            _data.clear();
172
78.1k
            _data.reserve(block_size);
173
78.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
78.1k
                    << "buffer must be naturally-aligned";
175
78.1k
            _buffer.clear();
176
78.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
78.1k
            _finished = false;
178
78.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
78.1k
        });
180
78.2k
        return Status::OK();
181
78.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
166
92.7k
    Status reset() override {
167
92.7k
        RETURN_IF_CATCH_EXCEPTION({
168
92.7k
            size_t block_size = _options.data_page_size;
169
92.7k
            _count = 0;
170
92.7k
            _raw_data_size = 0;
171
92.7k
            _data.clear();
172
92.7k
            _data.reserve(block_size);
173
92.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
92.7k
                    << "buffer must be naturally-aligned";
175
92.7k
            _buffer.clear();
176
92.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
92.7k
            _finished = false;
178
92.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
92.7k
        });
180
92.8k
        return Status::OK();
181
92.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
166
1.03k
    Status reset() override {
167
1.03k
        RETURN_IF_CATCH_EXCEPTION({
168
1.03k
            size_t block_size = _options.data_page_size;
169
1.03k
            _count = 0;
170
1.03k
            _raw_data_size = 0;
171
1.03k
            _data.clear();
172
1.03k
            _data.reserve(block_size);
173
1.03k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.03k
                    << "buffer must be naturally-aligned";
175
1.03k
            _buffer.clear();
176
1.03k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.03k
            _finished = false;
178
1.03k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.03k
        });
180
1.03k
        return Status::OK();
181
1.03k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
Line
Count
Source
166
15.1k
    Status reset() override {
167
15.1k
        RETURN_IF_CATCH_EXCEPTION({
168
15.1k
            size_t block_size = _options.data_page_size;
169
15.1k
            _count = 0;
170
15.1k
            _raw_data_size = 0;
171
15.1k
            _data.clear();
172
15.1k
            _data.reserve(block_size);
173
15.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
15.1k
                    << "buffer must be naturally-aligned";
175
15.1k
            _buffer.clear();
176
15.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
15.1k
            _finished = false;
178
15.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
15.1k
        });
180
15.3k
        return Status::OK();
181
15.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
166
597
    Status reset() override {
167
597
        RETURN_IF_CATCH_EXCEPTION({
168
597
            size_t block_size = _options.data_page_size;
169
597
            _count = 0;
170
597
            _raw_data_size = 0;
171
597
            _data.clear();
172
597
            _data.reserve(block_size);
173
597
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
597
                    << "buffer must be naturally-aligned";
175
597
            _buffer.clear();
176
597
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
597
            _finished = false;
178
597
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
597
        });
180
597
        return Status::OK();
181
597
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
166
20.0k
    Status reset() override {
167
20.0k
        RETURN_IF_CATCH_EXCEPTION({
168
20.0k
            size_t block_size = _options.data_page_size;
169
20.0k
            _count = 0;
170
20.0k
            _raw_data_size = 0;
171
20.0k
            _data.clear();
172
20.0k
            _data.reserve(block_size);
173
20.0k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
20.0k
                    << "buffer must be naturally-aligned";
175
20.0k
            _buffer.clear();
176
20.0k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
20.0k
            _finished = false;
178
20.0k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
20.0k
        });
180
20.0k
        return Status::OK();
181
20.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
31.9k
    Status reset() override {
167
31.9k
        RETURN_IF_CATCH_EXCEPTION({
168
31.9k
            size_t block_size = _options.data_page_size;
169
31.9k
            _count = 0;
170
31.9k
            _raw_data_size = 0;
171
31.9k
            _data.clear();
172
31.9k
            _data.reserve(block_size);
173
31.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
31.9k
                    << "buffer must be naturally-aligned";
175
31.9k
            _buffer.clear();
176
31.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
31.9k
            _finished = false;
178
31.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
31.9k
        });
180
31.9k
        return Status::OK();
181
31.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
166
34.9k
    Status reset() override {
167
34.9k
        RETURN_IF_CATCH_EXCEPTION({
168
34.9k
            size_t block_size = _options.data_page_size;
169
34.9k
            _count = 0;
170
34.9k
            _raw_data_size = 0;
171
34.9k
            _data.clear();
172
34.9k
            _data.reserve(block_size);
173
34.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
34.9k
                    << "buffer must be naturally-aligned";
175
34.9k
            _buffer.clear();
176
34.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
34.9k
            _finished = false;
178
34.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
34.9k
        });
180
34.9k
        return Status::OK();
181
34.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Line
Count
Source
166
2.33k
    Status reset() override {
167
2.33k
        RETURN_IF_CATCH_EXCEPTION({
168
2.33k
            size_t block_size = _options.data_page_size;
169
2.33k
            _count = 0;
170
2.33k
            _raw_data_size = 0;
171
2.33k
            _data.clear();
172
2.33k
            _data.reserve(block_size);
173
2.33k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
2.33k
                    << "buffer must be naturally-aligned";
175
2.33k
            _buffer.clear();
176
2.33k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
2.33k
            _finished = false;
178
2.33k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
2.33k
        });
180
2.34k
        return Status::OK();
181
2.33k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Line
Count
Source
166
1.35k
    Status reset() override {
167
1.35k
        RETURN_IF_CATCH_EXCEPTION({
168
1.35k
            size_t block_size = _options.data_page_size;
169
1.35k
            _count = 0;
170
1.35k
            _raw_data_size = 0;
171
1.35k
            _data.clear();
172
1.35k
            _data.reserve(block_size);
173
1.35k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.35k
                    << "buffer must be naturally-aligned";
175
1.35k
            _buffer.clear();
176
1.35k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.35k
            _finished = false;
178
1.35k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.35k
        });
180
1.35k
        return Status::OK();
181
1.35k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
166
1.34k
    Status reset() override {
167
1.34k
        RETURN_IF_CATCH_EXCEPTION({
168
1.34k
            size_t block_size = _options.data_page_size;
169
1.34k
            _count = 0;
170
1.34k
            _raw_data_size = 0;
171
1.34k
            _data.clear();
172
1.34k
            _data.reserve(block_size);
173
1.34k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.34k
                    << "buffer must be naturally-aligned";
175
1.34k
            _buffer.clear();
176
1.34k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.34k
            _finished = false;
178
1.34k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.34k
        });
180
1.34k
        return Status::OK();
181
1.34k
    }
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
124k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
69.4k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
185
20.7k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
185
652
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
21.6k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
924
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
2.62k
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
769
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
185
818
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4sizeEv
Line
Count
Source
185
40
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4sizeEv
Line
Count
Source
185
1.87k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
3.01k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4sizeEv
Line
Count
Source
185
47
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4sizeEv
Line
Count
Source
185
40
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4sizeEv
Line
Count
Source
185
36
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4sizeEv
Line
Count
Source
185
214
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
185
371
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
185
1.24k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4sizeEv
Line
Count
Source
185
38
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4sizeEv
Line
Count
Source
185
60
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4sizeEv
Line
Count
Source
185
44
    uint64_t size() const override { return _buffer.size(); }
186
187
506k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
101k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
61.7k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
8.50k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
85.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
187
10.6k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
67.7k
    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
12.2k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
15.3k
    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
354
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
187
39.4k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
187
45.8k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
187
593
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
Line
Count
Source
187
7.65k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
187
255
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
187
10.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
19.4k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
187
17.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE17get_raw_data_sizeEv
Line
Count
Source
187
1.12k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Line
Count
Source
187
633
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
187
630
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
821k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
426k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
61.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
8.89k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
80.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
10.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
67.5k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
13.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
15.5k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
342
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
38.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
46.8k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
439
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
7.52k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
342
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
10.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
12.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
17.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1.21k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
721
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
718
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
192
193
827k
    OwnedSlice _finish(int final_size_of_type) {
194
827k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
827k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
827k
        int padding_elems = num_elems_after_padding - _count;
199
827k
        int padding_bytes = padding_elems * final_size_of_type;
200
22.5M
        for (int i = 0; i < padding_bytes; i++) {
201
21.6M
            _data.push_back(0);
202
21.6M
        }
203
204
        // reserve enough place for compression
205
827k
        _buffer.resize(
206
827k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
827k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
827k
        int64_t bytes =
210
827k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
827k
                                         num_elems_after_padding, final_size_of_type, 0);
212
827k
        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
827k
        encode_fixed32_le(&_buffer[0], _count);
222
827k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
827k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
827k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
827k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
827k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
827k
        return _buffer.build();
229
827k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
422k
    OwnedSlice _finish(int final_size_of_type) {
194
422k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
422k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
422k
        int padding_elems = num_elems_after_padding - _count;
199
422k
        int padding_bytes = padding_elems * final_size_of_type;
200
8.47M
        for (int i = 0; i < padding_bytes; i++) {
201
8.05M
            _data.push_back(0);
202
8.05M
        }
203
204
        // reserve enough place for compression
205
422k
        _buffer.resize(
206
422k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
422k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
422k
        int64_t bytes =
210
422k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
422k
                                         num_elems_after_padding, final_size_of_type, 0);
212
422k
        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
422k
        encode_fixed32_le(&_buffer[0], _count);
222
422k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
422k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
422k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
422k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
422k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
422k
        return _buffer.build();
229
422k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
61.7k
    OwnedSlice _finish(int final_size_of_type) {
194
61.7k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
61.7k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
61.7k
        int padding_elems = num_elems_after_padding - _count;
199
61.7k
        int padding_bytes = padding_elems * final_size_of_type;
200
395k
        for (int i = 0; i < padding_bytes; i++) {
201
334k
            _data.push_back(0);
202
334k
        }
203
204
        // reserve enough place for compression
205
61.7k
        _buffer.resize(
206
61.7k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
61.7k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
61.7k
        int64_t bytes =
210
61.7k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
61.7k
                                         num_elems_after_padding, final_size_of_type, 0);
212
61.7k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
61.7k
        encode_fixed32_le(&_buffer[0], _count);
222
61.7k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
61.7k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
61.7k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
61.7k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
61.7k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
61.7k
        return _buffer.build();
229
61.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
8.50k
    OwnedSlice _finish(int final_size_of_type) {
194
8.50k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
8.50k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
8.50k
        int padding_elems = num_elems_after_padding - _count;
199
8.50k
        int padding_bytes = padding_elems * final_size_of_type;
200
92.2k
        for (int i = 0; i < padding_bytes; i++) {
201
83.7k
            _data.push_back(0);
202
83.7k
        }
203
204
        // reserve enough place for compression
205
8.50k
        _buffer.resize(
206
8.50k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
8.50k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
8.50k
        int64_t bytes =
210
8.50k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
8.50k
                                         num_elems_after_padding, final_size_of_type, 0);
212
8.50k
        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.50k
        encode_fixed32_le(&_buffer[0], _count);
222
8.50k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
8.50k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
8.50k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
8.50k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
8.50k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
8.50k
        return _buffer.build();
229
8.50k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
85.1k
    OwnedSlice _finish(int final_size_of_type) {
194
85.1k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
85.1k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
85.1k
        int padding_elems = num_elems_after_padding - _count;
199
85.1k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.40M
        for (int i = 0; i < padding_bytes; i++) {
201
3.32M
            _data.push_back(0);
202
3.32M
        }
203
204
        // reserve enough place for compression
205
85.1k
        _buffer.resize(
206
85.1k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
85.1k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
85.1k
        int64_t bytes =
210
85.1k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
85.1k
                                         num_elems_after_padding, final_size_of_type, 0);
212
85.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
85.1k
        encode_fixed32_le(&_buffer[0], _count);
222
85.1k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
85.1k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
85.1k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
85.1k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
85.1k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
85.1k
        return _buffer.build();
229
85.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
10.6k
    OwnedSlice _finish(int final_size_of_type) {
194
10.6k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
10.6k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
10.6k
        int padding_elems = num_elems_after_padding - _count;
199
10.6k
        int padding_bytes = padding_elems * final_size_of_type;
200
757k
        for (int i = 0; i < padding_bytes; i++) {
201
746k
            _data.push_back(0);
202
746k
        }
203
204
        // reserve enough place for compression
205
10.6k
        _buffer.resize(
206
10.6k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
10.6k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
10.6k
        int64_t bytes =
210
10.6k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
10.6k
                                         num_elems_after_padding, final_size_of_type, 0);
212
10.6k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
10.6k
        encode_fixed32_le(&_buffer[0], _count);
222
10.6k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
10.6k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
10.6k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
10.6k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
10.6k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
10.6k
        return _buffer.build();
229
10.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
67.7k
    OwnedSlice _finish(int final_size_of_type) {
194
67.7k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
67.7k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
67.7k
        int padding_elems = num_elems_after_padding - _count;
199
67.7k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.22M
        for (int i = 0; i < padding_bytes; i++) {
201
3.15M
            _data.push_back(0);
202
3.15M
        }
203
204
        // reserve enough place for compression
205
67.7k
        _buffer.resize(
206
67.7k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
67.7k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
67.7k
        int64_t bytes =
210
67.7k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
67.7k
                                         num_elems_after_padding, final_size_of_type, 0);
212
67.7k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
67.7k
        encode_fixed32_le(&_buffer[0], _count);
222
67.7k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
67.7k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
67.7k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
67.7k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
67.7k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
67.7k
        return _buffer.build();
229
67.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
12.2k
    OwnedSlice _finish(int final_size_of_type) {
194
12.2k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
12.2k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
12.2k
        int padding_elems = num_elems_after_padding - _count;
199
12.2k
        int padding_bytes = padding_elems * final_size_of_type;
200
263k
        for (int i = 0; i < padding_bytes; i++) {
201
251k
            _data.push_back(0);
202
251k
        }
203
204
        // reserve enough place for compression
205
12.2k
        _buffer.resize(
206
12.2k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
12.2k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
12.2k
        int64_t bytes =
210
12.2k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
12.2k
                                         num_elems_after_padding, final_size_of_type, 0);
212
12.2k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
12.2k
        encode_fixed32_le(&_buffer[0], _count);
222
12.2k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
12.2k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
12.2k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
12.2k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
12.2k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
12.2k
        return _buffer.build();
229
12.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
15.3k
    OwnedSlice _finish(int final_size_of_type) {
194
15.3k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
15.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
15.3k
        int padding_elems = num_elems_after_padding - _count;
199
15.3k
        int padding_bytes = padding_elems * final_size_of_type;
200
632k
        for (int i = 0; i < padding_bytes; i++) {
201
617k
            _data.push_back(0);
202
617k
        }
203
204
        // reserve enough place for compression
205
15.3k
        _buffer.resize(
206
15.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
15.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
15.3k
        int64_t bytes =
210
15.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
15.3k
                                         num_elems_after_padding, final_size_of_type, 0);
212
15.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
15.3k
        encode_fixed32_le(&_buffer[0], _count);
222
15.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
15.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
15.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
15.3k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
15.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
15.3k
        return _buffer.build();
229
15.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
354
    OwnedSlice _finish(int final_size_of_type) {
194
354
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
354
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
354
        int padding_elems = num_elems_after_padding - _count;
199
354
        int padding_bytes = padding_elems * final_size_of_type;
200
5.31k
        for (int i = 0; i < padding_bytes; i++) {
201
4.96k
            _data.push_back(0);
202
4.96k
        }
203
204
        // reserve enough place for compression
205
354
        _buffer.resize(
206
354
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
354
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
354
        int64_t bytes =
210
354
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
354
                                         num_elems_after_padding, final_size_of_type, 0);
212
354
        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
354
        encode_fixed32_le(&_buffer[0], _count);
222
354
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
354
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
354
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
354
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
354
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
354
        return _buffer.build();
229
354
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
193
39.4k
    OwnedSlice _finish(int final_size_of_type) {
194
39.4k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
39.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
39.4k
        int padding_elems = num_elems_after_padding - _count;
199
39.4k
        int padding_bytes = padding_elems * final_size_of_type;
200
836k
        for (int i = 0; i < padding_bytes; i++) {
201
797k
            _data.push_back(0);
202
797k
        }
203
204
        // reserve enough place for compression
205
39.4k
        _buffer.resize(
206
39.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
39.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
39.4k
        int64_t bytes =
210
39.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
39.4k
                                         num_elems_after_padding, final_size_of_type, 0);
212
39.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
39.4k
        encode_fixed32_le(&_buffer[0], _count);
222
39.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
39.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
39.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
39.4k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
39.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
39.4k
        return _buffer.build();
229
39.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
193
45.8k
    OwnedSlice _finish(int final_size_of_type) {
194
45.8k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
45.8k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
45.8k
        int padding_elems = num_elems_after_padding - _count;
199
45.8k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.93M
        for (int i = 0; i < padding_bytes; i++) {
201
1.88M
            _data.push_back(0);
202
1.88M
        }
203
204
        // reserve enough place for compression
205
45.8k
        _buffer.resize(
206
45.8k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
45.8k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
45.8k
        int64_t bytes =
210
45.8k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
45.8k
                                         num_elems_after_padding, final_size_of_type, 0);
212
45.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
45.8k
        encode_fixed32_le(&_buffer[0], _count);
222
45.8k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
45.8k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
45.8k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
45.8k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
45.8k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
45.8k
        return _buffer.build();
229
45.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
193
593
    OwnedSlice _finish(int final_size_of_type) {
194
593
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
593
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
593
        int padding_elems = num_elems_after_padding - _count;
199
593
        int padding_bytes = padding_elems * final_size_of_type;
200
13.6k
        for (int i = 0; i < padding_bytes; i++) {
201
13.0k
            _data.push_back(0);
202
13.0k
        }
203
204
        // reserve enough place for compression
205
593
        _buffer.resize(
206
593
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
593
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
593
        int64_t bytes =
210
593
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
593
                                         num_elems_after_padding, final_size_of_type, 0);
212
593
        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
593
        encode_fixed32_le(&_buffer[0], _count);
222
593
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
593
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
593
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
593
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
593
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
593
        return _buffer.build();
229
593
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
Line
Count
Source
193
7.65k
    OwnedSlice _finish(int final_size_of_type) {
194
7.65k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.65k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.65k
        int padding_elems = num_elems_after_padding - _count;
199
7.65k
        int padding_bytes = padding_elems * final_size_of_type;
200
399k
        for (int i = 0; i < padding_bytes; i++) {
201
391k
            _data.push_back(0);
202
391k
        }
203
204
        // reserve enough place for compression
205
7.65k
        _buffer.resize(
206
7.65k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.65k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.65k
        int64_t bytes =
210
7.65k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.65k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.65k
        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.65k
        encode_fixed32_le(&_buffer[0], _count);
222
7.65k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.65k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.65k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.65k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.65k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.65k
        return _buffer.build();
229
7.65k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
193
255
    OwnedSlice _finish(int final_size_of_type) {
194
255
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
255
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
255
        int padding_elems = num_elems_after_padding - _count;
199
255
        int padding_bytes = padding_elems * final_size_of_type;
200
15.8k
        for (int i = 0; i < padding_bytes; i++) {
201
15.5k
            _data.push_back(0);
202
15.5k
        }
203
204
        // reserve enough place for compression
205
255
        _buffer.resize(
206
255
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
255
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
255
        int64_t bytes =
210
255
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
255
                                         num_elems_after_padding, final_size_of_type, 0);
212
255
        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
255
        encode_fixed32_le(&_buffer[0], _count);
222
255
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
255
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
255
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
255
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
255
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
255
        return _buffer.build();
229
255
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
193
10.0k
    OwnedSlice _finish(int final_size_of_type) {
194
10.0k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
10.0k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
10.0k
        int padding_elems = num_elems_after_padding - _count;
199
10.0k
        int padding_bytes = padding_elems * final_size_of_type;
200
124k
        for (int i = 0; i < padding_bytes; i++) {
201
114k
            _data.push_back(0);
202
114k
        }
203
204
        // reserve enough place for compression
205
10.0k
        _buffer.resize(
206
10.0k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
10.0k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
10.0k
        int64_t bytes =
210
10.0k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
10.0k
                                         num_elems_after_padding, final_size_of_type, 0);
212
10.0k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
10.0k
        encode_fixed32_le(&_buffer[0], _count);
222
10.0k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
10.0k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
10.0k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
10.0k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
10.0k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
10.0k
        return _buffer.build();
229
10.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
19.4k
    OwnedSlice _finish(int final_size_of_type) {
194
19.4k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
19.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
19.4k
        int padding_elems = num_elems_after_padding - _count;
199
19.4k
        int padding_bytes = padding_elems * final_size_of_type;
200
506k
        for (int i = 0; i < padding_bytes; i++) {
201
486k
            _data.push_back(0);
202
486k
        }
203
204
        // reserve enough place for compression
205
19.4k
        _buffer.resize(
206
19.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
19.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
19.4k
        int64_t bytes =
210
19.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
19.4k
                                         num_elems_after_padding, final_size_of_type, 0);
212
19.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
19.4k
        encode_fixed32_le(&_buffer[0], _count);
222
19.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
19.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
19.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
19.4k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
19.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
19.4k
        return _buffer.build();
229
19.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
193
17.5k
    OwnedSlice _finish(int final_size_of_type) {
194
17.5k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
17.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
17.5k
        int padding_elems = num_elems_after_padding - _count;
199
17.5k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.18M
        for (int i = 0; i < padding_bytes; i++) {
201
1.16M
            _data.push_back(0);
202
1.16M
        }
203
204
        // reserve enough place for compression
205
17.5k
        _buffer.resize(
206
17.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
17.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
17.5k
        int64_t bytes =
210
17.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
17.5k
                                         num_elems_after_padding, final_size_of_type, 0);
212
17.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
17.5k
        encode_fixed32_le(&_buffer[0], _count);
222
17.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
17.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
17.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
17.5k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
17.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
17.5k
        return _buffer.build();
229
17.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE7_finishEi
Line
Count
Source
193
1.12k
    OwnedSlice _finish(int final_size_of_type) {
194
1.12k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
1.12k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
1.12k
        int padding_elems = num_elems_after_padding - _count;
199
1.12k
        int padding_bytes = padding_elems * final_size_of_type;
200
175k
        for (int i = 0; i < padding_bytes; i++) {
201
174k
            _data.push_back(0);
202
174k
        }
203
204
        // reserve enough place for compression
205
1.12k
        _buffer.resize(
206
1.12k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
1.12k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
1.12k
        int64_t bytes =
210
1.12k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
1.12k
                                         num_elems_after_padding, final_size_of_type, 0);
212
1.12k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
1.12k
        encode_fixed32_le(&_buffer[0], _count);
222
1.12k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
1.12k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
1.12k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
1.12k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
1.12k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
1.12k
        return _buffer.build();
229
1.12k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Line
Count
Source
193
633
    OwnedSlice _finish(int final_size_of_type) {
194
633
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
633
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
633
        int padding_elems = num_elems_after_padding - _count;
199
633
        int padding_bytes = padding_elems * final_size_of_type;
200
12.9k
        for (int i = 0; i < padding_bytes; i++) {
201
12.3k
            _data.push_back(0);
202
12.3k
        }
203
204
        // reserve enough place for compression
205
633
        _buffer.resize(
206
633
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
633
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
633
        int64_t bytes =
210
633
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
633
                                         num_elems_after_padding, final_size_of_type, 0);
212
633
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
633
        encode_fixed32_le(&_buffer[0], _count);
222
633
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
633
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
633
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
633
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
633
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
633
        return _buffer.build();
229
633
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
193
630
    OwnedSlice _finish(int final_size_of_type) {
194
630
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
630
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
630
        int padding_elems = num_elems_after_padding - _count;
199
630
        int padding_bytes = padding_elems * final_size_of_type;
200
51.6k
        for (int i = 0; i < padding_bytes; i++) {
201
51.0k
            _data.push_back(0);
202
51.0k
        }
203
204
        // reserve enough place for compression
205
630
        _buffer.resize(
206
630
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
630
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
630
        int64_t bytes =
210
630
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
630
                                         num_elems_after_padding, final_size_of_type, 0);
212
630
        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
630
        encode_fixed32_le(&_buffer[0], _count);
222
630
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
630
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
630
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
630
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
630
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
630
        return _buffer.build();
229
630
    }
230
231
    using CppType = typename TypeTraits<Type>::CppType;
232
233
    CppType cell(int idx) const {
234
        DCHECK_GE(idx, 0);
235
        CppType ret;
236
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
237
        return ret;
238
    }
239
240
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
241
    PageBuilderOptions _options;
242
    uint32_t _count;
243
    uint32_t _remain_element_capacity;
244
    bool _finished;
245
    faststring _data;
246
    faststring _buffer;
247
    uint64_t _raw_data_size = 0;
248
};
249
250
inline Status parse_bit_shuffle_header(const Slice& data, size_t& num_elements,
251
                                       size_t& compressed_size, size_t& num_element_after_padding,
252
2.67M
                                       int& size_of_element) {
253
2.67M
    if (data.size < BITSHUFFLE_PAGE_HEADER_SIZE) {
254
0
        return Status::InternalError("file corruption: invalid data size:{}, header size:{}",
255
0
                                     data.size, BITSHUFFLE_PAGE_HEADER_SIZE);
256
0
    }
257
258
2.67M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
2.67M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
2.67M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
2.67M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
2.67M
    if (num_element_after_padding != ALIGN_UP(num_elements, 8)) {
263
0
        return Status::InternalError(
264
0
                "num of element information corrupted,"
265
0
                " _num_element_after_padding:{}, _num_elements:{}, expected_padding:{},"
266
0
                " compressed_size:{}, size_of_element:{}, data_size:{}",
267
0
                num_element_after_padding, num_elements, ALIGN_UP(num_elements, 8), compressed_size,
268
0
                size_of_element, data.size);
269
0
    }
270
2.67M
    switch (size_of_element) {
271
319k
    case 1:
272
364k
    case 2:
273
367k
    case 3:
274
1.86M
    case 4:
275
2.56M
    case 8:
276
2.57M
    case 12:
277
2.67M
    case 16:
278
2.67M
    case 32:
279
2.67M
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
2.67M
    }
283
2.67M
    return Status::OK();
284
2.67M
}
285
286
template <FieldType Type>
287
class BitShufflePageDecoder : public PageDecoder {
288
public:
289
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
290
1.36M
            : _data(data),
291
1.36M
              _options(options),
292
1.36M
              _parsed(false),
293
1.36M
              _num_elements(0),
294
1.36M
              _num_element_after_padding(0),
295
1.36M
              _size_of_element(0),
296
1.36M
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
652k
            : _data(data),
291
652k
              _options(options),
292
652k
              _parsed(false),
293
652k
              _num_elements(0),
294
652k
              _num_element_after_padding(0),
295
652k
              _size_of_element(0),
296
652k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
176k
            : _data(data),
291
176k
              _options(options),
292
176k
              _parsed(false),
293
176k
              _num_elements(0),
294
176k
              _num_element_after_padding(0),
295
176k
              _size_of_element(0),
296
176k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
22.7k
            : _data(data),
291
22.7k
              _options(options),
292
22.7k
              _parsed(false),
293
22.7k
              _num_elements(0),
294
22.7k
              _num_element_after_padding(0),
295
22.7k
              _size_of_element(0),
296
22.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
102k
            : _data(data),
291
102k
              _options(options),
292
102k
              _parsed(false),
293
102k
              _num_elements(0),
294
102k
              _num_element_after_padding(0),
295
102k
              _size_of_element(0),
296
102k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
21.0k
            : _data(data),
291
21.0k
              _options(options),
292
21.0k
              _parsed(false),
293
21.0k
              _num_elements(0),
294
21.0k
              _num_element_after_padding(0),
295
21.0k
              _size_of_element(0),
296
21.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
93.2k
            : _data(data),
291
93.2k
              _options(options),
292
93.2k
              _parsed(false),
293
93.2k
              _num_elements(0),
294
93.2k
              _num_element_after_padding(0),
295
93.2k
              _size_of_element(0),
296
93.2k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
20.3k
            : _data(data),
291
20.3k
              _options(options),
292
20.3k
              _parsed(false),
293
20.3k
              _num_elements(0),
294
20.3k
              _num_element_after_padding(0),
295
20.3k
              _size_of_element(0),
296
20.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
28.5k
            : _data(data),
291
28.5k
              _options(options),
292
28.5k
              _parsed(false),
293
28.5k
              _num_elements(0),
294
28.5k
              _num_element_after_padding(0),
295
28.5k
              _size_of_element(0),
296
28.5k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.62k
            : _data(data),
291
1.62k
              _options(options),
292
1.62k
              _parsed(false),
293
1.62k
              _num_elements(0),
294
1.62k
              _num_element_after_padding(0),
295
1.62k
              _size_of_element(0),
296
1.62k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
60.6k
            : _data(data),
291
60.6k
              _options(options),
292
60.6k
              _parsed(false),
293
60.6k
              _num_elements(0),
294
60.6k
              _num_element_after_padding(0),
295
60.6k
              _size_of_element(0),
296
60.6k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
70.6k
            : _data(data),
291
70.6k
              _options(options),
292
70.6k
              _parsed(false),
293
70.6k
              _num_elements(0),
294
70.6k
              _num_element_after_padding(0),
295
70.6k
              _size_of_element(0),
296
70.6k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
2.40k
            : _data(data),
291
2.40k
              _options(options),
292
2.40k
              _parsed(false),
293
2.40k
              _num_elements(0),
294
2.40k
              _num_element_after_padding(0),
295
2.40k
              _size_of_element(0),
296
2.40k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
16.2k
            : _data(data),
291
16.2k
              _options(options),
292
16.2k
              _parsed(false),
293
16.2k
              _num_elements(0),
294
16.2k
              _num_element_after_padding(0),
295
16.2k
              _size_of_element(0),
296
16.2k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.46k
            : _data(data),
291
1.46k
              _options(options),
292
1.46k
              _parsed(false),
293
1.46k
              _num_elements(0),
294
1.46k
              _num_element_after_padding(0),
295
1.46k
              _size_of_element(0),
296
1.46k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
15.8k
            : _data(data),
291
15.8k
              _options(options),
292
15.8k
              _parsed(false),
293
15.8k
              _num_elements(0),
294
15.8k
              _num_element_after_padding(0),
295
15.8k
              _size_of_element(0),
296
15.8k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
40.2k
            : _data(data),
291
40.2k
              _options(options),
292
40.2k
              _parsed(false),
293
40.2k
              _num_elements(0),
294
40.2k
              _num_element_after_padding(0),
295
40.2k
              _size_of_element(0),
296
40.2k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
30.8k
            : _data(data),
291
30.8k
              _options(options),
292
30.8k
              _parsed(false),
293
30.8k
              _num_elements(0),
294
30.8k
              _num_element_after_padding(0),
295
30.8k
              _size_of_element(0),
296
30.8k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.75k
            : _data(data),
291
1.75k
              _options(options),
292
1.75k
              _parsed(false),
293
1.75k
              _num_elements(0),
294
1.75k
              _num_element_after_padding(0),
295
1.75k
              _size_of_element(0),
296
1.75k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
946
            : _data(data),
291
946
              _options(options),
292
946
              _parsed(false),
293
946
              _num_elements(0),
294
946
              _num_element_after_padding(0),
295
946
              _size_of_element(0),
296
946
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
984
            : _data(data),
291
984
              _options(options),
292
984
              _parsed(false),
293
984
              _num_elements(0),
294
984
              _num_element_after_padding(0),
295
984
              _size_of_element(0),
296
984
              _cur_index(0) {}
297
298
1.36M
    Status init() override {
299
1.36M
        CHECK(!_parsed);
300
1.36M
        size_t unused;
301
1.36M
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.36M
                                                 _num_element_after_padding, _size_of_element));
303
304
1.36M
        if (_data.size !=
305
1.36M
            _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.36M
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.36M
                     _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.36M
        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.36M
        _parsed = true;
325
1.36M
        return Status::OK();
326
1.36M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
298
652k
    Status init() override {
299
652k
        CHECK(!_parsed);
300
652k
        size_t unused;
301
652k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
652k
                                                 _num_element_after_padding, _size_of_element));
303
304
652k
        if (_data.size !=
305
652k
            _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
652k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
652k
                     _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
652k
        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
652k
        _parsed = true;
325
652k
        return Status::OK();
326
652k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
176k
    Status init() override {
299
176k
        CHECK(!_parsed);
300
176k
        size_t unused;
301
176k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
176k
                                                 _num_element_after_padding, _size_of_element));
303
304
176k
        if (_data.size !=
305
176k
            _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
176k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
176k
                     _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
176k
        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
176k
        _parsed = true;
325
176k
        return Status::OK();
326
176k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
22.7k
    Status init() override {
299
22.7k
        CHECK(!_parsed);
300
22.7k
        size_t unused;
301
22.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
22.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
22.7k
        if (_data.size !=
305
22.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
22.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
22.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
22.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
22.7k
        _parsed = true;
325
22.7k
        return Status::OK();
326
22.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
102k
    Status init() override {
299
102k
        CHECK(!_parsed);
300
102k
        size_t unused;
301
102k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
102k
                                                 _num_element_after_padding, _size_of_element));
303
304
102k
        if (_data.size !=
305
102k
            _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
102k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
102k
                     _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
102k
        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
102k
        _parsed = true;
325
102k
        return Status::OK();
326
102k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
298
21.0k
    Status init() override {
299
21.0k
        CHECK(!_parsed);
300
21.0k
        size_t unused;
301
21.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
21.0k
                                                 _num_element_after_padding, _size_of_element));
303
304
21.0k
        if (_data.size !=
305
21.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
21.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
21.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
21.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
21.0k
        _parsed = true;
325
21.0k
        return Status::OK();
326
21.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
298
93.1k
    Status init() override {
299
93.1k
        CHECK(!_parsed);
300
93.1k
        size_t unused;
301
93.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
93.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
93.1k
        if (_data.size !=
305
93.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
93.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
93.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
93.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
93.1k
        _parsed = true;
325
93.1k
        return Status::OK();
326
93.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
298
20.3k
    Status init() override {
299
20.3k
        CHECK(!_parsed);
300
20.3k
        size_t unused;
301
20.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
20.3k
                                                 _num_element_after_padding, _size_of_element));
303
304
20.3k
        if (_data.size !=
305
20.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
20.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
20.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
20.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
20.3k
        _parsed = true;
325
20.3k
        return Status::OK();
326
20.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
298
28.4k
    Status init() override {
299
28.4k
        CHECK(!_parsed);
300
28.4k
        size_t unused;
301
28.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
28.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
28.4k
        if (_data.size !=
305
28.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
28.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
28.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
28.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
28.4k
        _parsed = true;
325
28.4k
        return Status::OK();
326
28.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
1.62k
    Status init() override {
299
1.62k
        CHECK(!_parsed);
300
1.62k
        size_t unused;
301
1.62k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.62k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.62k
        if (_data.size !=
305
1.62k
            _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.62k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.62k
                     _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.62k
        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.62k
        _parsed = true;
325
1.62k
        return Status::OK();
326
1.62k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
60.6k
    Status init() override {
299
60.6k
        CHECK(!_parsed);
300
60.6k
        size_t unused;
301
60.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
60.6k
                                                 _num_element_after_padding, _size_of_element));
303
304
60.6k
        if (_data.size !=
305
60.6k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
60.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
60.6k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
60.6k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
60.6k
        _parsed = true;
325
60.6k
        return Status::OK();
326
60.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
298
70.6k
    Status init() override {
299
70.6k
        CHECK(!_parsed);
300
70.6k
        size_t unused;
301
70.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
70.6k
                                                 _num_element_after_padding, _size_of_element));
303
304
70.6k
        if (_data.size !=
305
70.6k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
70.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
70.6k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
70.6k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
70.6k
        _parsed = true;
325
70.6k
        return Status::OK();
326
70.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
298
2.40k
    Status init() override {
299
2.40k
        CHECK(!_parsed);
300
2.40k
        size_t unused;
301
2.40k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
2.40k
                                                 _num_element_after_padding, _size_of_element));
303
304
2.40k
        if (_data.size !=
305
2.40k
            _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.40k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
2.40k
                     _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.40k
        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.40k
        _parsed = true;
325
2.40k
        return Status::OK();
326
2.40k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
298
16.2k
    Status init() override {
299
16.2k
        CHECK(!_parsed);
300
16.2k
        size_t unused;
301
16.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
16.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
16.2k
        if (_data.size !=
305
16.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
16.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
16.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
16.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
16.2k
        _parsed = true;
325
16.2k
        return Status::OK();
326
16.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
298
1.46k
    Status init() override {
299
1.46k
        CHECK(!_parsed);
300
1.46k
        size_t unused;
301
1.46k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.46k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.46k
        if (_data.size !=
305
1.46k
            _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.46k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.46k
                     _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.46k
        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.46k
        _parsed = true;
325
1.46k
        return Status::OK();
326
1.46k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
298
15.8k
    Status init() override {
299
15.8k
        CHECK(!_parsed);
300
15.8k
        size_t unused;
301
15.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
15.8k
                                                 _num_element_after_padding, _size_of_element));
303
304
15.8k
        if (_data.size !=
305
15.8k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
15.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
15.8k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
15.8k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
15.8k
        _parsed = true;
325
15.8k
        return Status::OK();
326
15.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
298
40.2k
    Status init() override {
299
40.2k
        CHECK(!_parsed);
300
40.2k
        size_t unused;
301
40.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
40.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
40.2k
        if (_data.size !=
305
40.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
40.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
40.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
40.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
40.2k
        _parsed = true;
325
40.2k
        return Status::OK();
326
40.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
298
30.8k
    Status init() override {
299
30.8k
        CHECK(!_parsed);
300
30.8k
        size_t unused;
301
30.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
30.8k
                                                 _num_element_after_padding, _size_of_element));
303
304
30.8k
        if (_data.size !=
305
30.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
30.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
30.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
30.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
30.8k
        _parsed = true;
325
30.8k
        return Status::OK();
326
30.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
298
1.75k
    Status init() override {
299
1.75k
        CHECK(!_parsed);
300
1.75k
        size_t unused;
301
1.75k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.75k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.75k
        if (_data.size !=
305
1.75k
            _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.75k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.75k
                     _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.75k
        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.75k
        _parsed = true;
325
1.75k
        return Status::OK();
326
1.75k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
298
945
    Status init() override {
299
945
        CHECK(!_parsed);
300
945
        size_t unused;
301
945
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
945
                                                 _num_element_after_padding, _size_of_element));
303
304
945
        if (_data.size !=
305
945
            _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
945
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
945
                     _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
945
        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
945
        _parsed = true;
325
945
        return Status::OK();
326
945
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
298
983
    Status init() override {
299
983
        CHECK(!_parsed);
300
983
        size_t unused;
301
983
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
983
                                                 _num_element_after_padding, _size_of_element));
303
304
983
        if (_data.size !=
305
983
            _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
983
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
983
                     _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
983
        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
983
        _parsed = true;
325
983
        return Status::OK();
326
983
    }
327
328
    // If the page only contains null, then _num_elements == 0, and the nullmap has
329
    // some value. But in _seek_columns --> seek_to_ordinal --> _seek_to_pos_in_page
330
    // in this call stack it will pass pos == 0 to this method. Although we can add some
331
    // code such as check if the count == 0, then skip seek, but there are other method such
332
    // as init will also call seek with pos == 0. And the seek is useless when _num_elements
333
    // == 0, because next batch will return empty in this method.
334
4.53M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
4.53M
        if (_num_elements == 0) [[unlikely]] {
337
4.87k
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
4.87k
        }
342
343
4.53M
        DCHECK_LE(pos, _num_elements);
344
4.53M
        _cur_index = pos;
345
4.53M
        return Status::OK();
346
4.53M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
2.05M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
2.05M
        if (_num_elements == 0) [[unlikely]] {
337
1.99k
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
1.99k
        }
342
343
2.05M
        DCHECK_LE(pos, _num_elements);
344
2.05M
        _cur_index = pos;
345
2.05M
        return Status::OK();
346
2.05M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
312k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
312k
        if (_num_elements == 0) [[unlikely]] {
337
531
            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
531
        }
342
343
312k
        DCHECK_LE(pos, _num_elements);
344
312k
        _cur_index = pos;
345
312k
        return Status::OK();
346
312k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
232k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
232k
        if (_num_elements == 0) [[unlikely]] {
337
1.35k
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
1.35k
        }
342
343
232k
        DCHECK_LE(pos, _num_elements);
344
232k
        _cur_index = pos;
345
232k
        return Status::OK();
346
232k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
175k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
175k
        if (_num_elements == 0) [[unlikely]] {
337
344
            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
344
        }
342
343
175k
        DCHECK_LE(pos, _num_elements);
344
175k
        _cur_index = pos;
345
175k
        return Status::OK();
346
175k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
334
125k
    Status seek_to_position_in_page(size_t pos) override {
335
125k
        DCHECK(_parsed) << "Must call init()";
336
125k
        if (_num_elements == 0) [[unlikely]] {
337
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
125k
        DCHECK_LE(pos, _num_elements);
344
125k
        _cur_index = pos;
345
125k
        return Status::OK();
346
125k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
334
18.3k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
18.3k
        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
18.3k
        DCHECK_LE(pos, _num_elements);
344
18.3k
        _cur_index = pos;
345
18.3k
        return Status::OK();
346
18.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
233k
    Status seek_to_position_in_page(size_t pos) override {
335
233k
        DCHECK(_parsed) << "Must call init()";
336
233k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
233k
        DCHECK_LE(pos, _num_elements);
344
233k
        _cur_index = pos;
345
233k
        return Status::OK();
346
233k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
334
207k
    Status seek_to_position_in_page(size_t pos) override {
335
207k
        DCHECK(_parsed) << "Must call init()";
336
207k
        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
207k
        DCHECK_LE(pos, _num_elements);
344
207k
        _cur_index = pos;
345
207k
        return Status::OK();
346
207k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
334
224k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
224k
        if (_num_elements == 0) [[unlikely]] {
337
4
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
4
        }
342
343
224k
        DCHECK_LE(pos, _num_elements);
344
224k
        _cur_index = pos;
345
224k
        return Status::OK();
346
224k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
334
514k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
514k
        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
514k
        DCHECK_LE(pos, _num_elements);
344
514k
        _cur_index = pos;
345
514k
        return Status::OK();
346
514k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
334
77.7k
    Status seek_to_position_in_page(size_t pos) override {
335
77.7k
        DCHECK(_parsed) << "Must call init()";
336
77.7k
        if (_num_elements == 0) [[unlikely]] {
337
18
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
18
        }
342
343
77.7k
        DCHECK_LE(pos, _num_elements);
344
77.7k
        _cur_index = pos;
345
77.7k
        return Status::OK();
346
77.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
205k
    Status seek_to_position_in_page(size_t pos) override {
335
205k
        DCHECK(_parsed) << "Must call init()";
336
205k
        if (_num_elements == 0) [[unlikely]] {
337
16
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
16
        }
342
343
205k
        DCHECK_LE(pos, _num_elements);
344
205k
        _cur_index = pos;
345
205k
        return Status::OK();
346
205k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
334
7.18k
    Status seek_to_position_in_page(size_t pos) override {
335
7.18k
        DCHECK(_parsed) << "Must call init()";
336
7.18k
        if (_num_elements == 0) [[unlikely]] {
337
351
            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
351
        }
342
343
7.18k
        DCHECK_LE(pos, _num_elements);
344
7.18k
        _cur_index = pos;
345
7.18k
        return Status::OK();
346
7.18k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
Line
Count
Source
334
124
    Status seek_to_position_in_page(size_t pos) override {
335
124
        DCHECK(_parsed) << "Must call init()";
336
124
        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
124
        DCHECK_LE(pos, _num_elements);
344
124
        _cur_index = pos;
345
124
        return Status::OK();
346
124
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Line
Count
Source
334
886
    Status seek_to_position_in_page(size_t pos) override {
335
886
        DCHECK(_parsed) << "Must call init()";
336
886
        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
886
        DCHECK_LE(pos, _num_elements);
344
886
        _cur_index = pos;
345
886
        return Status::OK();
346
886
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
334
15.8k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
15.8k
        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
15.8k
        DCHECK_LE(pos, _num_elements);
344
15.8k
        _cur_index = pos;
345
15.8k
        return Status::OK();
346
15.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Line
Count
Source
334
124k
    Status seek_to_position_in_page(size_t pos) override {
335
124k
        DCHECK(_parsed) << "Must call init()";
336
124k
        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
124k
        DCHECK_LE(pos, _num_elements);
344
124k
        _cur_index = pos;
345
124k
        return Status::OK();
346
124k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.95k
    Status seek_to_position_in_page(size_t pos) override {
335
1.95k
        DCHECK(_parsed) << "Must call init()";
336
1.95k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
1.95k
        DCHECK_LE(pos, _num_elements);
344
1.95k
        _cur_index = pos;
345
1.95k
        return Status::OK();
346
1.95k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE24seek_to_position_in_pageEm
Line
Count
Source
334
25
    Status seek_to_position_in_page(size_t pos) override {
335
25
        DCHECK(_parsed) << "Must call init()";
336
25
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
25
        DCHECK_LE(pos, _num_elements);
344
25
        _cur_index = pos;
345
25
        return Status::OK();
346
25
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE24seek_to_position_in_pageEm
Line
Count
Source
334
30
    Status seek_to_position_in_page(size_t pos) override {
335
30
        DCHECK(_parsed) << "Must call init()";
336
30
        if (_num_elements == 0) [[unlikely]] {
337
1
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
1
        }
342
343
30
        DCHECK_LE(pos, _num_elements);
344
30
        _cur_index = pos;
345
30
        return Status::OK();
346
30
    }
347
348
0
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
349
0
        DCHECK(_parsed) << "Must call init() firstly";
350
351
0
        if (_num_elements == 0) {
352
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
353
0
        }
354
355
0
        size_t left = 0;
356
0
        size_t right = _num_elements;
357
358
0
        void* mid_value = nullptr;
359
360
        // find the first value >= target. after loop,
361
        // - left == index of first value >= target when found
362
        // - left == _num_elements when not found (all values < target)
363
0
        while (left < right) {
364
0
            size_t mid = left + (right - left) / 2;
365
0
            mid_value = get_data(mid);
366
0
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
367
0
                left = mid + 1;
368
0
            } else {
369
0
                right = mid;
370
0
            }
371
0
        }
372
0
        if (left >= _num_elements) {
373
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
374
0
        }
375
0
        void* find_value = get_data(left);
376
0
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
377
0
            *exact_match = true;
378
0
        } else {
379
0
            *exact_match = false;
380
0
        }
381
382
0
        _cur_index = left;
383
0
        return Status::OK();
384
0
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE22seek_at_or_after_valueEPKvPb
385
386
    template <bool forward_index = true>
387
2.00M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
2.00M
        DCHECK(_parsed);
389
2.00M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
2.00M
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
2.00M
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
2.00M
        *n = max_fetch;
398
2.00M
        if constexpr (forward_index) {
399
1.80M
            _cur_index += max_fetch;
400
1.80M
        }
401
402
2.00M
        return Status::OK();
403
2.00M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
562k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
562k
        DCHECK(_parsed);
389
562k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
562k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
562k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
562k
        *n = max_fetch;
398
562k
        if constexpr (forward_index) {
399
562k
            _cur_index += max_fetch;
400
562k
        }
401
402
562k
        return Status::OK();
403
562k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
260k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
260k
        DCHECK(_parsed);
389
260k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
260k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
260k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
260k
        *n = max_fetch;
398
260k
        if constexpr (forward_index) {
399
260k
            _cur_index += max_fetch;
400
260k
        }
401
402
260k
        return Status::OK();
403
260k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
21.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
21.4k
        DCHECK(_parsed);
389
21.4k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
21.4k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
21.4k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
21.4k
        *n = max_fetch;
398
21.4k
        if constexpr (forward_index) {
399
21.4k
            _cur_index += max_fetch;
400
21.4k
        }
401
402
21.4k
        return Status::OK();
403
21.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
204k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
204k
        DCHECK(_parsed);
389
204k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
204k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
204k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
204k
        *n = max_fetch;
398
204k
        if constexpr (forward_index) {
399
204k
            _cur_index += max_fetch;
400
204k
        }
401
402
204k
        return Status::OK();
403
204k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
19.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
19.5k
        DCHECK(_parsed);
389
19.5k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
19.5k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
19.5k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
19.5k
        *n = max_fetch;
398
19.5k
        if constexpr (forward_index) {
399
19.5k
            _cur_index += max_fetch;
400
19.5k
        }
401
402
19.5k
        return Status::OK();
403
19.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
151k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
151k
        DCHECK(_parsed);
389
151k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
151k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
151k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
151k
        *n = max_fetch;
398
151k
        if constexpr (forward_index) {
399
151k
            _cur_index += max_fetch;
400
151k
        }
401
402
151k
        return Status::OK();
403
151k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
201k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
201k
        DCHECK(_parsed);
389
201k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
201k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
201k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
201k
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
201k
        return Status::OK();
403
201k
    }
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
15.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
15.0k
        DCHECK(_parsed);
389
15.0k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
15.0k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
15.0k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
15.0k
        *n = max_fetch;
398
15.0k
        if constexpr (forward_index) {
399
15.0k
            _cur_index += max_fetch;
400
15.0k
        }
401
402
15.0k
        return Status::OK();
403
15.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
22.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
22.2k
        DCHECK(_parsed);
389
22.2k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
22.2k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
22.2k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
22.2k
        *n = max_fetch;
398
22.2k
        if constexpr (forward_index) {
399
22.2k
            _cur_index += max_fetch;
400
22.2k
        }
401
402
22.2k
        return Status::OK();
403
22.2k
    }
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
9.29k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
9.29k
        DCHECK(_parsed);
389
9.29k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
9.29k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
9.29k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
9.29k
        *n = max_fetch;
398
9.29k
        if constexpr (forward_index) {
399
9.29k
            _cur_index += max_fetch;
400
9.29k
        }
401
402
9.29k
        return Status::OK();
403
9.29k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
385k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
385k
        DCHECK(_parsed);
389
385k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
385k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
385k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
385k
        *n = max_fetch;
398
385k
        if constexpr (forward_index) {
399
385k
            _cur_index += max_fetch;
400
385k
        }
401
402
385k
        return Status::OK();
403
385k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
70.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
70.1k
        DCHECK(_parsed);
389
70.1k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
70.1k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
70.1k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
70.1k
        *n = max_fetch;
398
70.1k
        if constexpr (forward_index) {
399
70.1k
            _cur_index += max_fetch;
400
70.1k
        }
401
402
70.1k
        return Status::OK();
403
70.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
1.46k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.46k
        DCHECK(_parsed);
389
1.46k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.46k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.46k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.46k
        *n = max_fetch;
398
1.46k
        if constexpr (forward_index) {
399
1.46k
            _cur_index += max_fetch;
400
1.46k
        }
401
402
1.46k
        return Status::OK();
403
1.46k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
8.27k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
8.27k
        DCHECK(_parsed);
389
8.27k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
8.27k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
8.27k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
8.27k
        *n = max_fetch;
398
8.27k
        if constexpr (forward_index) {
399
8.27k
            _cur_index += max_fetch;
400
8.27k
        }
401
402
8.27k
        return Status::OK();
403
8.27k
    }
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.36k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.36k
        DCHECK(_parsed);
389
1.36k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.36k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.36k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.36k
        *n = max_fetch;
398
1.36k
        if constexpr (forward_index) {
399
1.36k
            _cur_index += max_fetch;
400
1.36k
        }
401
402
1.36k
        return Status::OK();
403
1.36k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
9.76k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
9.76k
        DCHECK(_parsed);
389
9.77k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
9.76k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
9.76k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
9.76k
        *n = max_fetch;
398
9.76k
        if constexpr (forward_index) {
399
9.76k
            _cur_index += max_fetch;
400
9.76k
        }
401
402
9.76k
        return Status::OK();
403
9.76k
    }
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.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
31.9k
        DCHECK(_parsed);
389
31.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
31.9k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
31.9k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
31.9k
        *n = max_fetch;
398
31.9k
        if constexpr (forward_index) {
399
31.9k
            _cur_index += max_fetch;
400
31.9k
        }
401
402
31.9k
        return Status::OK();
403
31.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
22.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
22.1k
        DCHECK(_parsed);
389
22.1k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
22.1k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
22.1k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
22.1k
        *n = max_fetch;
398
22.1k
        if constexpr (forward_index) {
399
22.1k
            _cur_index += max_fetch;
400
22.1k
        }
401
402
22.1k
        return Status::OK();
403
22.1k
    }
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.16k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.16k
        DCHECK(_parsed);
389
3.16k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.16k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.16k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.16k
        *n = max_fetch;
398
3.16k
        if constexpr (forward_index) {
399
3.16k
            _cur_index += max_fetch;
400
3.16k
        }
401
402
3.16k
        return Status::OK();
403
3.16k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
662
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
662
        DCHECK(_parsed);
389
662
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
662
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
662
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
662
        *n = max_fetch;
398
662
        if constexpr (forward_index) {
399
662
            _cur_index += max_fetch;
400
662
        }
401
402
662
        return Status::OK();
403
662
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
681
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
681
        DCHECK(_parsed);
389
681
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
681
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
681
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
681
        *n = max_fetch;
398
681
        if constexpr (forward_index) {
399
681
            _cur_index += max_fetch;
400
681
        }
401
402
681
        return Status::OK();
403
681
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
404
405
1.80M
    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
561k
    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
260k
    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
21.4k
    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
204k
    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
19.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
151k
    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
15.0k
    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
22.2k
    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
9.29k
    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
385k
    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
70.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
1.46k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
8.27k
    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.37k
    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
9.77k
    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.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
22.1k
    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.16k
    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
662
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
682
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
406
407
    Status read_by_rowids(const rowid_t* rowids, ordinal_t page_first_ordinal, size_t* n,
408
435k
                          MutableColumnPtr& dst) override {
409
435k
        DCHECK(_parsed);
410
435k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
435k
        auto total = *n;
416
435k
        auto read_count = 0;
417
435k
        _buffer.resize(total);
418
140M
        for (size_t i = 0; i < total; ++i) {
419
139M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
139M
            if (UNLIKELY(ord >= _num_elements)) {
421
14.8k
                break;
422
14.8k
            }
423
424
139M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
139M
        }
426
427
435k
        if (LIKELY(read_count > 0)) {
428
435k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
435k
        }
430
431
435k
        *n = read_count;
432
435k
        return Status::OK();
433
435k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
108k
                          MutableColumnPtr& dst) override {
409
108k
        DCHECK(_parsed);
410
108k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
108k
        auto total = *n;
416
108k
        auto read_count = 0;
417
108k
        _buffer.resize(total);
418
52.0M
        for (size_t i = 0; i < total; ++i) {
419
51.9M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
51.9M
            if (UNLIKELY(ord >= _num_elements)) {
421
2.30k
                break;
422
2.30k
            }
423
424
51.9M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
51.9M
        }
426
427
108k
        if (LIKELY(read_count > 0)) {
428
108k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
108k
        }
430
431
108k
        *n = read_count;
432
108k
        return Status::OK();
433
108k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
62.5k
                          MutableColumnPtr& dst) override {
409
62.5k
        DCHECK(_parsed);
410
62.5k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
62.5k
        auto total = *n;
416
62.5k
        auto read_count = 0;
417
62.5k
        _buffer.resize(total);
418
1.74M
        for (size_t i = 0; i < total; ++i) {
419
1.68M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.68M
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
1.68M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.68M
        }
426
427
62.5k
        if (LIKELY(read_count > 0)) {
428
62.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
62.5k
        }
430
431
62.5k
        *n = read_count;
432
62.5k
        return Status::OK();
433
62.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
10.1k
                          MutableColumnPtr& dst) override {
409
10.1k
        DCHECK(_parsed);
410
10.1k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
10.1k
        auto total = *n;
416
10.1k
        auto read_count = 0;
417
10.1k
        _buffer.resize(total);
418
625k
        for (size_t i = 0; i < total; ++i) {
419
615k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
615k
            if (UNLIKELY(ord >= _num_elements)) {
421
14
                break;
422
14
            }
423
424
615k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
615k
        }
426
427
10.1k
        if (LIKELY(read_count > 0)) {
428
10.1k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
10.1k
        }
430
431
10.1k
        *n = read_count;
432
10.1k
        return Status::OK();
433
10.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
59.5k
                          MutableColumnPtr& dst) override {
409
59.5k
        DCHECK(_parsed);
410
59.5k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
59.5k
        auto total = *n;
416
59.5k
        auto read_count = 0;
417
59.5k
        _buffer.resize(total);
418
27.7M
        for (size_t i = 0; i < total; ++i) {
419
27.6M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
27.6M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.48k
                break;
422
1.48k
            }
423
424
27.6M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
27.6M
        }
426
427
59.5k
        if (LIKELY(read_count > 0)) {
428
59.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
59.5k
        }
430
431
59.5k
        *n = read_count;
432
59.5k
        return Status::OK();
433
59.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
9.28k
                          MutableColumnPtr& dst) override {
409
9.28k
        DCHECK(_parsed);
410
9.28k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
9.28k
        auto total = *n;
416
9.28k
        auto read_count = 0;
417
9.28k
        _buffer.resize(total);
418
1.18M
        for (size_t i = 0; i < total; ++i) {
419
1.17M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.17M
            if (UNLIKELY(ord >= _num_elements)) {
421
569
                break;
422
569
            }
423
424
1.17M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.17M
        }
426
427
9.28k
        if (LIKELY(read_count > 0)) {
428
9.28k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
9.28k
        }
430
431
9.28k
        *n = read_count;
432
9.28k
        return Status::OK();
433
9.28k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
34.9k
                          MutableColumnPtr& dst) override {
409
34.9k
        DCHECK(_parsed);
410
34.9k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
34.9k
        auto total = *n;
416
34.9k
        auto read_count = 0;
417
34.9k
        _buffer.resize(total);
418
6.69M
        for (size_t i = 0; i < total; ++i) {
419
6.66M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
6.66M
            if (UNLIKELY(ord >= _num_elements)) {
421
2.81k
                break;
422
2.81k
            }
423
424
6.65M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
6.65M
        }
426
427
34.9k
        if (LIKELY(read_count > 0)) {
428
34.9k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
34.9k
        }
430
431
34.9k
        *n = read_count;
432
34.9k
        return Status::OK();
433
34.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
9.77k
                          MutableColumnPtr& dst) override {
409
9.77k
        DCHECK(_parsed);
410
9.77k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
9.77k
        auto total = *n;
416
9.77k
        auto read_count = 0;
417
9.77k
        _buffer.resize(total);
418
1.16M
        for (size_t i = 0; i < total; ++i) {
419
1.15M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.15M
            if (UNLIKELY(ord >= _num_elements)) {
421
31
                break;
422
31
            }
423
424
1.15M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.15M
        }
426
427
9.77k
        if (LIKELY(read_count > 0)) {
428
9.76k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
9.76k
        }
430
431
9.77k
        *n = read_count;
432
9.77k
        return Status::OK();
433
9.77k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.3k
                          MutableColumnPtr& dst) override {
409
13.3k
        DCHECK(_parsed);
410
13.3k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.3k
        auto total = *n;
416
13.3k
        auto read_count = 0;
417
13.3k
        _buffer.resize(total);
418
1.94M
        for (size_t i = 0; i < total; ++i) {
419
1.93M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.93M
            if (UNLIKELY(ord >= _num_elements)) {
421
454
                break;
422
454
            }
423
424
1.93M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.93M
        }
426
427
13.3k
        if (LIKELY(read_count > 0)) {
428
13.3k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.3k
        }
430
431
13.3k
        *n = read_count;
432
13.3k
        return Status::OK();
433
13.3k
    }
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.41k
                          MutableColumnPtr& dst) override {
409
1.41k
        DCHECK(_parsed);
410
1.41k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.41k
        auto total = *n;
416
1.41k
        auto read_count = 0;
417
1.41k
        _buffer.resize(total);
418
448k
        for (size_t i = 0; i < total; ++i) {
419
447k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
447k
            if (UNLIKELY(ord >= _num_elements)) {
421
13
                break;
422
13
            }
423
424
447k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
447k
        }
426
427
1.41k
        if (LIKELY(read_count > 0)) {
428
1.41k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.41k
        }
430
431
1.41k
        *n = read_count;
432
1.41k
        return Status::OK();
433
1.41k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
30.0k
                          MutableColumnPtr& dst) override {
409
30.0k
        DCHECK(_parsed);
410
30.0k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
30.0k
        auto total = *n;
416
30.0k
        auto read_count = 0;
417
30.0k
        _buffer.resize(total);
418
6.48M
        for (size_t i = 0; i < total; ++i) {
419
6.45M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
6.45M
            if (UNLIKELY(ord >= _num_elements)) {
421
768
                break;
422
768
            }
423
424
6.45M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
6.45M
        }
426
427
30.0k
        if (LIKELY(read_count > 0)) {
428
30.0k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
30.0k
        }
430
431
30.0k
        *n = read_count;
432
30.0k
        return Status::OK();
433
30.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
34.8k
                          MutableColumnPtr& dst) override {
409
34.8k
        DCHECK(_parsed);
410
34.8k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
34.8k
        auto total = *n;
416
34.8k
        auto read_count = 0;
417
34.8k
        _buffer.resize(total);
418
10.0M
        for (size_t i = 0; i < total; ++i) {
419
10.0M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
10.0M
            if (UNLIKELY(ord >= _num_elements)) {
421
205
                break;
422
205
            }
423
424
10.0M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
10.0M
        }
426
427
34.8k
        if (LIKELY(read_count > 0)) {
428
34.8k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
34.8k
        }
430
431
34.8k
        *n = read_count;
432
34.8k
        return Status::OK();
433
34.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1.87k
                          MutableColumnPtr& dst) override {
409
1.87k
        DCHECK(_parsed);
410
1.87k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.87k
        auto total = *n;
416
1.87k
        auto read_count = 0;
417
1.87k
        _buffer.resize(total);
418
452k
        for (size_t i = 0; i < total; ++i) {
419
450k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
450k
            if (UNLIKELY(ord >= _num_elements)) {
421
247
                break;
422
247
            }
423
424
450k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
450k
        }
426
427
1.87k
        if (LIKELY(read_count > 0)) {
428
1.87k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.87k
        }
430
431
1.87k
        *n = read_count;
432
1.87k
        return Status::OK();
433
1.87k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
12.7k
                          MutableColumnPtr& dst) override {
409
12.7k
        DCHECK(_parsed);
410
12.7k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
12.7k
        auto total = *n;
416
12.7k
        auto read_count = 0;
417
12.7k
        _buffer.resize(total);
418
26.9k
        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
12.7k
        if (LIKELY(read_count > 0)) {
428
12.7k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
12.7k
        }
430
431
12.7k
        *n = read_count;
432
12.7k
        return Status::OK();
433
12.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
177
                          MutableColumnPtr& dst) override {
409
177
        DCHECK(_parsed);
410
177
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
177
        auto total = *n;
416
177
        auto read_count = 0;
417
177
        _buffer.resize(total);
418
359
        for (size_t i = 0; i < total; ++i) {
419
182
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
182
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
182
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
182
        }
426
427
177
        if (LIKELY(read_count > 0)) {
428
177
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
177
        }
430
431
177
        *n = read_count;
432
177
        return Status::OK();
433
177
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4.81k
                          MutableColumnPtr& dst) override {
409
4.81k
        DCHECK(_parsed);
410
4.81k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.81k
        auto total = *n;
416
4.81k
        auto read_count = 0;
417
4.81k
        _buffer.resize(total);
418
19.4k
        for (size_t i = 0; i < total; ++i) {
419
14.5k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.5k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
14.5k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.5k
        }
426
427
4.81k
        if (LIKELY(read_count > 0)) {
428
4.81k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.81k
        }
430
431
4.81k
        *n = read_count;
432
4.81k
        return Status::OK();
433
4.81k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
25.9k
                          MutableColumnPtr& dst) override {
409
25.9k
        DCHECK(_parsed);
410
25.9k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
25.9k
        auto total = *n;
416
25.9k
        auto read_count = 0;
417
25.9k
        _buffer.resize(total);
418
20.5M
        for (size_t i = 0; i < total; ++i) {
419
20.5M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
20.5M
            if (UNLIKELY(ord >= _num_elements)) {
421
5.19k
                break;
422
5.19k
            }
423
424
20.5M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
20.5M
        }
426
427
25.9k
        if (LIKELY(read_count > 0)) {
428
25.9k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
25.9k
        }
430
431
25.9k
        *n = read_count;
432
25.9k
        return Status::OK();
433
25.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
14.0k
                          MutableColumnPtr& dst) override {
409
14.0k
        DCHECK(_parsed);
410
14.0k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
14.0k
        auto total = *n;
416
14.0k
        auto read_count = 0;
417
14.0k
        _buffer.resize(total);
418
9.06M
        for (size_t i = 0; i < total; ++i) {
419
9.05M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.05M
            if (UNLIKELY(ord >= _num_elements)) {
421
717
                break;
422
717
            }
423
424
9.05M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.05M
        }
426
427
14.0k
        if (LIKELY(read_count > 0)) {
428
14.0k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
14.0k
        }
430
431
14.0k
        *n = read_count;
432
14.0k
        return Status::OK();
433
14.0k
    }
_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
290
                          MutableColumnPtr& dst) override {
409
290
        DCHECK(_parsed);
410
290
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
290
        auto total = *n;
416
290
        auto read_count = 0;
417
290
        _buffer.resize(total);
418
824
        for (size_t i = 0; i < total; ++i) {
419
534
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
534
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
534
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
534
        }
426
427
290
        if (LIKELY(read_count > 0)) {
428
289
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
289
        }
430
431
290
        *n = read_count;
432
290
        return Status::OK();
433
290
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
321
                          MutableColumnPtr& dst) override {
409
321
        DCHECK(_parsed);
410
321
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
321
        auto total = *n;
416
321
        auto read_count = 0;
417
321
        _buffer.resize(total);
418
1.13k
        for (size_t i = 0; i < total; ++i) {
419
815
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
815
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
815
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
815
        }
426
427
322
        if (LIKELY(read_count > 0)) {
428
322
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
322
        }
430
431
321
        *n = read_count;
432
321
        return Status::OK();
433
321
    }
434
435
201k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
201k
        return next_batch<false>(n, dst);
437
201k
    }
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
201k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
201k
        return next_batch<false>(n, dst);
437
201k
    }
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.94M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
980k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
441
227k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
441
225k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
125k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
441
119k
    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
232k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
205k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
441
217k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
441
233k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
441
48.6k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
441
204k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Line
Count
Source
441
1.08k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE13current_indexEv
Line
Count
Source
441
14
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE13current_indexEv
Line
Count
Source
441
3.65k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
441
1.05k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
441
119k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE13current_indexEv
Line
Count
Source
441
308
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE13current_indexEv
Line
Count
Source
441
39
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
Line
Count
Source
441
45
    size_t current_index() const override { return _cur_index; }
442
443
143M
    char* get_data(size_t index) const {
444
143M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
143M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
54.2M
    char* get_data(size_t index) const {
444
54.2M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
54.2M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
1.94M
    char* get_data(size_t index) const {
444
1.94M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.94M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
443
637k
    char* get_data(size_t index) const {
444
637k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
637k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
443
27.8M
    char* get_data(size_t index) const {
444
27.8M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
27.8M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
1.19M
    char* get_data(size_t index) const {
444
1.19M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.19M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
7.01M
    char* get_data(size_t index) const {
444
7.01M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
7.01M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
1.17M
    char* get_data(size_t index) const {
444
1.17M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.17M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
1.95M
    char* get_data(size_t index) const {
444
1.95M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.95M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
456k
    char* get_data(size_t index) const {
444
456k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
456k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
6.84M
    char* get_data(size_t index) const {
444
6.84M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
6.84M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
443
10.1M
    char* get_data(size_t index) const {
444
10.1M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
10.1M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
443
452k
    char* get_data(size_t index) const {
444
452k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
452k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
443
22.5k
    char* get_data(size_t index) const {
444
22.5k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
22.5k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
443
1.55k
    char* get_data(size_t index) const {
444
1.55k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.55k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
443
24.3k
    char* get_data(size_t index) const {
444
24.3k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
24.3k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
443
20.5M
    char* get_data(size_t index) const {
444
20.5M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20.5M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
9.07M
    char* get_data(size_t index) const {
444
9.07M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.07M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
443
4.98k
    char* get_data(size_t index) const {
444
4.98k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
4.98k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Line
Count
Source
443
1.19k
    char* get_data(size_t index) const {
444
1.19k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.19k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
Line
Count
Source
443
1.49k
    char* get_data(size_t index) const {
444
1.49k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.49k
    }
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