Coverage Report

Created: 2026-08-10 05:45

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
881k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
415k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
63.7k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
7.83k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
150k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
9.14k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
95
70.1k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
95
12.9k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
95
15.4k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
334
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
38.4k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
95
46.7k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
430
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
95
7.18k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
339
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
95
9.90k
    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.5k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
95
1.29k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
95
928
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
95
825
    Status init() override { return reset(); }
96
97
154M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
153M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
69.2k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
10.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
267k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
8.49k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
71.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12is_page_fullEv
Line
Count
Source
97
12.6k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
97
17.8k
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12is_page_fullEv
Line
Count
Source
97
353
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
105k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
88.9k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
97
497
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
Line
Count
Source
97
7.20k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
97
253
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
97
5.38k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
24.4k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
97
26.1k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Line
Count
Source
97
1.52k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Line
Count
Source
97
30.9k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
97
5.77k
    bool is_page_full() override { return _remain_element_capacity == 0; }
98
99
1.45M
    Status add(const uint8_t* vals, size_t* count) override {
100
1.45M
        return add_internal<false>(vals, count);
101
1.45M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
99
700k
    Status add(const uint8_t* vals, size_t* count) override {
100
700k
        return add_internal<false>(vals, count);
101
700k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
69.2k
    Status add(const uint8_t* vals, size_t* count) override {
100
69.2k
        return add_internal<false>(vals, count);
101
69.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
10.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
10.3k
        return add_internal<false>(vals, count);
101
10.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
267k
    Status add(const uint8_t* vals, size_t* count) override {
100
267k
        return add_internal<false>(vals, count);
101
267k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
8.49k
    Status add(const uint8_t* vals, size_t* count) override {
100
8.49k
        return add_internal<false>(vals, count);
101
8.49k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
71.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
71.3k
        return add_internal<false>(vals, count);
101
71.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
99
12.6k
    Status add(const uint8_t* vals, size_t* count) override {
100
12.6k
        return add_internal<false>(vals, count);
101
12.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
99
17.8k
    Status add(const uint8_t* vals, size_t* count) override {
100
17.8k
        return add_internal<false>(vals, count);
101
17.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
353
    Status add(const uint8_t* vals, size_t* count) override {
100
353
        return add_internal<false>(vals, count);
101
353
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
105k
    Status add(const uint8_t* vals, size_t* count) override {
100
105k
        return add_internal<false>(vals, count);
101
105k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
88.9k
    Status add(const uint8_t* vals, size_t* count) override {
100
88.9k
        return add_internal<false>(vals, count);
101
88.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
99
497
    Status add(const uint8_t* vals, size_t* count) override {
100
497
        return add_internal<false>(vals, count);
101
497
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
Line
Count
Source
99
7.20k
    Status add(const uint8_t* vals, size_t* count) override {
100
7.20k
        return add_internal<false>(vals, count);
101
7.20k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
253
    Status add(const uint8_t* vals, size_t* count) override {
100
253
        return add_internal<false>(vals, count);
101
253
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
99
5.39k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.39k
        return add_internal<false>(vals, count);
101
5.39k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
24.4k
    Status add(const uint8_t* vals, size_t* count) override {
100
24.4k
        return add_internal<false>(vals, count);
101
24.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
99
26.1k
    Status add(const uint8_t* vals, size_t* count) override {
100
26.1k
        return add_internal<false>(vals, count);
101
26.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Line
Count
Source
99
1.52k
    Status add(const uint8_t* vals, size_t* count) override {
100
1.52k
        return add_internal<false>(vals, count);
101
1.52k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Line
Count
Source
99
30.9k
    Status add(const uint8_t* vals, size_t* count) override {
100
30.9k
        return add_internal<false>(vals, count);
101
30.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
99
5.77k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.77k
        return add_internal<false>(vals, count);
101
5.77k
    }
102
103
154M
    Status single_add(const uint8_t* vals, size_t* count) {
104
154M
        return add_internal<true>(vals, count);
105
154M
    }
106
107
    template <bool single>
108
154M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
154M
        DCHECK(!_finished);
110
154M
        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
154M
        uint32_t to_add = cast_set<UInt32>(
126
154M
                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
154M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
154M
        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
154M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
154M
        _count += to_add;
134
154M
        _remain_element_capacity -= to_add;
135
154M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
154M
        *num_written = to_add;
138
154M
        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
152M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
152M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
152M
                        *reinterpret_cast<const uint32_t*>(vals);
149
152M
                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
152M
        }
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
154M
        return Status::OK();
159
154M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
700k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
700k
        DCHECK(!_finished);
110
700k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
700k
        uint32_t to_add = cast_set<UInt32>(
126
700k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
700k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
700k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
700k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
700k
        _count += to_add;
134
700k
        _remain_element_capacity -= to_add;
135
700k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
700k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
700k
        memcpy(&_data[orig_size], vals, to_add_size);
158
700k
        return Status::OK();
159
700k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
153M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
153M
        DCHECK(!_finished);
110
153M
        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
153M
        uint32_t to_add = cast_set<UInt32>(
126
153M
                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
153M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
153M
        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
153M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
152M
        _count += to_add;
134
152M
        _remain_element_capacity -= to_add;
135
152M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
152M
        *num_written = to_add;
138
152M
        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
152M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
152M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
152M
                        *reinterpret_cast<const uint32_t*>(vals);
149
152M
                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
152M
        }
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
152M
        return Status::OK();
159
153M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
69.2k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
69.2k
        DCHECK(!_finished);
110
69.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
69.2k
        uint32_t to_add = cast_set<UInt32>(
126
69.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
69.2k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
69.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
69.2k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
69.2k
        _count += to_add;
134
69.2k
        _remain_element_capacity -= to_add;
135
69.2k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
69.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
69.2k
        memcpy(&_data[orig_size], vals, to_add_size);
158
69.2k
        return Status::OK();
159
69.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
10.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
10.3k
        DCHECK(!_finished);
110
10.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
10.3k
        uint32_t to_add = cast_set<UInt32>(
126
10.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
10.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
10.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
10.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
10.3k
        _count += to_add;
134
10.3k
        _remain_element_capacity -= to_add;
135
10.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
10.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
10.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
10.3k
        return Status::OK();
159
10.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
267k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
267k
        DCHECK(!_finished);
110
267k
        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
267k
        uint32_t to_add = cast_set<UInt32>(
126
267k
                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
267k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
267k
        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
267k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
267k
        _count += to_add;
134
267k
        _remain_element_capacity -= to_add;
135
267k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
267k
        *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
267k
        memcpy(&_data[orig_size], vals, to_add_size);
158
267k
        return Status::OK();
159
267k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
8.49k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
8.49k
        DCHECK(!_finished);
110
8.49k
        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.49k
        uint32_t to_add = cast_set<UInt32>(
126
8.49k
                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.49k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
8.49k
        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.49k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
8.49k
        _count += to_add;
134
8.49k
        _remain_element_capacity -= to_add;
135
8.49k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
8.49k
        *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.49k
        memcpy(&_data[orig_size], vals, to_add_size);
158
8.49k
        return Status::OK();
159
8.49k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
71.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
71.3k
        DCHECK(!_finished);
110
71.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
71.3k
        uint32_t to_add = cast_set<UInt32>(
126
71.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
71.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
71.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
71.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
71.3k
        _count += to_add;
134
71.3k
        _remain_element_capacity -= to_add;
135
71.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
71.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
71.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
71.3k
        return Status::OK();
159
71.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
12.6k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
12.6k
        DCHECK(!_finished);
110
12.6k
        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.6k
        uint32_t to_add = cast_set<UInt32>(
126
12.6k
                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.6k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
12.6k
        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.6k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
12.6k
        _count += to_add;
134
12.6k
        _remain_element_capacity -= to_add;
135
12.6k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
12.6k
        *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.6k
        memcpy(&_data[orig_size], vals, to_add_size);
158
12.6k
        return Status::OK();
159
12.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
17.8k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
17.8k
        DCHECK(!_finished);
110
17.8k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
17.8k
        uint32_t to_add = cast_set<UInt32>(
126
17.8k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
17.8k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
17.8k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
17.8k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
17.8k
        _count += to_add;
134
17.8k
        _remain_element_capacity -= to_add;
135
17.8k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
17.8k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
17.8k
        memcpy(&_data[orig_size], vals, to_add_size);
158
17.8k
        return Status::OK();
159
17.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
353
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
353
        DCHECK(!_finished);
110
353
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
353
        uint32_t to_add = cast_set<UInt32>(
126
353
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
353
        int to_add_size = to_add * SIZE_OF_TYPE;
129
353
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
353
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
353
        _count += to_add;
134
353
        _remain_element_capacity -= to_add;
135
353
        _raw_data_size += to_add_size;
136
        // return added number through count
137
353
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
353
        memcpy(&_data[orig_size], vals, to_add_size);
158
353
        return Status::OK();
159
353
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
105k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
105k
        DCHECK(!_finished);
110
105k
        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
105k
        uint32_t to_add = cast_set<UInt32>(
126
105k
                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
105k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
105k
        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
105k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
105k
        _count += to_add;
134
105k
        _remain_element_capacity -= to_add;
135
105k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
105k
        *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
105k
        memcpy(&_data[orig_size], vals, to_add_size);
158
105k
        return Status::OK();
159
105k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
88.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
88.9k
        DCHECK(!_finished);
110
88.9k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
88.9k
        uint32_t to_add = cast_set<UInt32>(
126
88.9k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
88.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
88.9k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
88.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
88.9k
        _count += to_add;
134
88.9k
        _remain_element_capacity -= to_add;
135
88.9k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
88.9k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
88.9k
        memcpy(&_data[orig_size], vals, to_add_size);
158
88.9k
        return Status::OK();
159
88.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
497
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
497
        DCHECK(!_finished);
110
497
        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
497
        uint32_t to_add = cast_set<UInt32>(
126
497
                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
497
        int to_add_size = to_add * SIZE_OF_TYPE;
129
497
        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
497
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
497
        _count += to_add;
134
497
        _remain_element_capacity -= to_add;
135
497
        _raw_data_size += to_add_size;
136
        // return added number through count
137
497
        *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
497
        memcpy(&_data[orig_size], vals, to_add_size);
158
497
        return Status::OK();
159
497
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
7.20k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
7.20k
        DCHECK(!_finished);
110
7.20k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
7.20k
        uint32_t to_add = cast_set<UInt32>(
126
7.20k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
7.20k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
7.20k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
7.20k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
7.20k
        _count += to_add;
134
7.20k
        _remain_element_capacity -= to_add;
135
7.20k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
7.20k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
7.20k
        memcpy(&_data[orig_size], vals, to_add_size);
158
7.20k
        return Status::OK();
159
7.20k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
253
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
253
        DCHECK(!_finished);
110
253
        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
253
        uint32_t to_add = cast_set<UInt32>(
126
253
                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
253
        int to_add_size = to_add * SIZE_OF_TYPE;
129
253
        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
253
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
253
        _count += to_add;
134
253
        _remain_element_capacity -= to_add;
135
253
        _raw_data_size += to_add_size;
136
        // return added number through count
137
253
        *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
253
        memcpy(&_data[orig_size], vals, to_add_size);
158
253
        return Status::OK();
159
253
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
5.38k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.38k
        DCHECK(!_finished);
110
5.38k
        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.38k
        uint32_t to_add = cast_set<UInt32>(
126
5.38k
                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.38k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.38k
        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.38k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.38k
        _count += to_add;
134
5.38k
        _remain_element_capacity -= to_add;
135
5.38k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.38k
        *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.38k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.38k
        return Status::OK();
159
5.38k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
24.4k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
24.4k
        DCHECK(!_finished);
110
24.4k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
24.4k
        uint32_t to_add = cast_set<UInt32>(
126
24.4k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
24.4k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
24.4k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
24.4k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
24.4k
        _count += to_add;
134
24.4k
        _remain_element_capacity -= to_add;
135
24.4k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
24.4k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
24.4k
        memcpy(&_data[orig_size], vals, to_add_size);
158
24.4k
        return Status::OK();
159
24.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
26.1k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
26.1k
        DCHECK(!_finished);
110
26.1k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
26.1k
        uint32_t to_add = cast_set<UInt32>(
126
26.1k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
26.1k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
26.1k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
26.1k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
26.1k
        _count += to_add;
134
26.1k
        _remain_element_capacity -= to_add;
135
26.1k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
26.1k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
26.1k
        memcpy(&_data[orig_size], vals, to_add_size);
158
26.1k
        return Status::OK();
159
26.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
1.52k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
1.52k
        DCHECK(!_finished);
110
1.52k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
1.52k
        uint32_t to_add = cast_set<UInt32>(
126
1.52k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
1.52k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
1.52k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
1.52k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
1.52k
        _count += to_add;
134
1.52k
        _remain_element_capacity -= to_add;
135
1.52k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
1.52k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
1.52k
        memcpy(&_data[orig_size], vals, to_add_size);
158
1.52k
        return Status::OK();
159
1.52k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
30.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
30.9k
        DCHECK(!_finished);
110
30.9k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
30.9k
        uint32_t to_add = cast_set<UInt32>(
126
30.9k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
30.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
30.9k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
30.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
30.9k
        _count += to_add;
134
30.9k
        _remain_element_capacity -= to_add;
135
30.9k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
30.9k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
30.9k
        memcpy(&_data[orig_size], vals, to_add_size);
158
30.9k
        return Status::OK();
159
30.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
5.77k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.77k
        DCHECK(!_finished);
110
5.77k
        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.77k
        uint32_t to_add = cast_set<UInt32>(
126
5.77k
                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.77k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.77k
        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.77k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.77k
        _count += to_add;
134
5.77k
        _remain_element_capacity -= to_add;
135
5.77k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.77k
        *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.77k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.77k
        return Status::OK();
159
5.77k
    }
160
161
875k
    Status finish(OwnedSlice* slice) override {
162
875k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
875k
        return Status::OK();
164
875k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
404k
    Status finish(OwnedSlice* slice) override {
162
404k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
404k
        return Status::OK();
164
404k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
62.5k
    Status finish(OwnedSlice* slice) override {
162
62.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
62.5k
        return Status::OK();
164
62.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7.32k
    Status finish(OwnedSlice* slice) override {
162
7.32k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.32k
        return Status::OK();
164
7.32k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
151k
    Status finish(OwnedSlice* slice) override {
162
151k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
151k
        return Status::OK();
164
151k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
8.47k
    Status finish(OwnedSlice* slice) override {
162
8.47k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
8.47k
        return Status::OK();
164
8.47k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
70.4k
    Status finish(OwnedSlice* slice) override {
162
70.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
70.4k
        return Status::OK();
164
70.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
12.0k
    Status finish(OwnedSlice* slice) override {
162
12.0k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
12.0k
        return Status::OK();
164
12.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
15.5k
    Status finish(OwnedSlice* slice) override {
162
15.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
15.5k
        return Status::OK();
164
15.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
346
    Status finish(OwnedSlice* slice) override {
162
346
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
346
        return Status::OK();
164
346
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
39.0k
    Status finish(OwnedSlice* slice) override {
162
39.0k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
39.0k
        return Status::OK();
164
39.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
45.7k
    Status finish(OwnedSlice* slice) override {
162
45.7k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
45.7k
        return Status::OK();
164
45.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
585
    Status finish(OwnedSlice* slice) override {
162
585
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
585
        return Status::OK();
164
585
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7.27k
    Status finish(OwnedSlice* slice) override {
162
7.27k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.28k
        return Status::OK();
164
7.27k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
253
    Status finish(OwnedSlice* slice) override {
162
253
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
253
        return Status::OK();
164
253
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
9.90k
    Status finish(OwnedSlice* slice) override {
162
9.90k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
9.91k
        return Status::OK();
164
9.90k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
18.9k
    Status finish(OwnedSlice* slice) override {
162
18.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
18.9k
        return Status::OK();
164
18.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
17.7k
    Status finish(OwnedSlice* slice) override {
162
17.7k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
17.7k
        return Status::OK();
164
17.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
1.20k
    Status finish(OwnedSlice* slice) override {
162
1.20k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
1.20k
        return Status::OK();
164
1.20k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
847
    Status finish(OwnedSlice* slice) override {
162
847
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
847
        return Status::OK();
164
847
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
748
    Status finish(OwnedSlice* slice) override {
162
748
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
749
        return Status::OK();
164
748
    }
165
166
2.08M
    Status reset() override {
167
2.08M
        RETURN_IF_CATCH_EXCEPTION({
168
2.08M
            size_t block_size = _options.data_page_size;
169
2.08M
            _count = 0;
170
2.08M
            _raw_data_size = 0;
171
2.08M
            _data.clear();
172
2.08M
            _data.reserve(block_size);
173
2.08M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
2.08M
                    << "buffer must be naturally-aligned";
175
2.08M
            _buffer.clear();
176
2.08M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
2.08M
            _finished = false;
178
2.08M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
2.08M
        });
180
2.09M
        return Status::OK();
181
2.08M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
166
1.14M
    Status reset() override {
167
1.14M
        RETURN_IF_CATCH_EXCEPTION({
168
1.14M
            size_t block_size = _options.data_page_size;
169
1.14M
            _count = 0;
170
1.14M
            _raw_data_size = 0;
171
1.14M
            _data.clear();
172
1.14M
            _data.reserve(block_size);
173
1.14M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.14M
                    << "buffer must be naturally-aligned";
175
1.14M
            _buffer.clear();
176
1.14M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.14M
            _finished = false;
178
1.14M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.14M
        });
180
1.15M
        return Status::OK();
181
1.14M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
126k
    Status reset() override {
167
126k
        RETURN_IF_CATCH_EXCEPTION({
168
126k
            size_t block_size = _options.data_page_size;
169
126k
            _count = 0;
170
126k
            _raw_data_size = 0;
171
126k
            _data.clear();
172
126k
            _data.reserve(block_size);
173
126k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
126k
                    << "buffer must be naturally-aligned";
175
126k
            _buffer.clear();
176
126k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
126k
            _finished = false;
178
126k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
126k
        });
180
126k
        return Status::OK();
181
126k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
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.1k
        return Status::OK();
181
15.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
301k
    Status reset() override {
167
301k
        RETURN_IF_CATCH_EXCEPTION({
168
301k
            size_t block_size = _options.data_page_size;
169
301k
            _count = 0;
170
301k
            _raw_data_size = 0;
171
301k
            _data.clear();
172
301k
            _data.reserve(block_size);
173
301k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
301k
                    << "buffer must be naturally-aligned";
175
301k
            _buffer.clear();
176
301k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
301k
            _finished = false;
178
301k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
301k
        });
180
303k
        return Status::OK();
181
301k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
166
17.6k
    Status reset() override {
167
17.6k
        RETURN_IF_CATCH_EXCEPTION({
168
17.6k
            size_t block_size = _options.data_page_size;
169
17.6k
            _count = 0;
170
17.6k
            _raw_data_size = 0;
171
17.6k
            _data.clear();
172
17.6k
            _data.reserve(block_size);
173
17.6k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
17.6k
                    << "buffer must be naturally-aligned";
175
17.6k
            _buffer.clear();
176
17.6k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
17.6k
            _finished = false;
178
17.6k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
17.6k
        });
180
17.6k
        return Status::OK();
181
17.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
166
140k
    Status reset() override {
167
140k
        RETURN_IF_CATCH_EXCEPTION({
168
140k
            size_t block_size = _options.data_page_size;
169
140k
            _count = 0;
170
140k
            _raw_data_size = 0;
171
140k
            _data.clear();
172
140k
            _data.reserve(block_size);
173
140k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
140k
                    << "buffer must be naturally-aligned";
175
140k
            _buffer.clear();
176
140k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
140k
            _finished = false;
178
140k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
140k
        });
180
140k
        return Status::OK();
181
140k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
166
25.0k
    Status reset() override {
167
25.0k
        RETURN_IF_CATCH_EXCEPTION({
168
25.0k
            size_t block_size = _options.data_page_size;
169
25.0k
            _count = 0;
170
25.0k
            _raw_data_size = 0;
171
25.0k
            _data.clear();
172
25.0k
            _data.reserve(block_size);
173
25.0k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
25.0k
                    << "buffer must be naturally-aligned";
175
25.0k
            _buffer.clear();
176
25.0k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
25.0k
            _finished = false;
178
25.0k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
25.0k
        });
180
25.0k
        return Status::OK();
181
25.0k
    }
_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
680
    Status reset() override {
167
680
        RETURN_IF_CATCH_EXCEPTION({
168
680
            size_t block_size = _options.data_page_size;
169
680
            _count = 0;
170
680
            _raw_data_size = 0;
171
680
            _data.clear();
172
680
            _data.reserve(block_size);
173
680
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
680
                    << "buffer must be naturally-aligned";
175
680
            _buffer.clear();
176
680
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
680
            _finished = false;
178
680
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
680
        });
180
680
        return Status::OK();
181
680
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
166
77.5k
    Status reset() override {
167
77.5k
        RETURN_IF_CATCH_EXCEPTION({
168
77.5k
            size_t block_size = _options.data_page_size;
169
77.5k
            _count = 0;
170
77.5k
            _raw_data_size = 0;
171
77.5k
            _data.clear();
172
77.5k
            _data.reserve(block_size);
173
77.5k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
77.5k
                    << "buffer must be naturally-aligned";
175
77.5k
            _buffer.clear();
176
77.5k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
77.5k
            _finished = false;
178
77.5k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
77.5k
        });
180
77.6k
        return Status::OK();
181
77.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
166
92.4k
    Status reset() override {
167
92.4k
        RETURN_IF_CATCH_EXCEPTION({
168
92.4k
            size_t block_size = _options.data_page_size;
169
92.4k
            _count = 0;
170
92.4k
            _raw_data_size = 0;
171
92.4k
            _data.clear();
172
92.4k
            _data.reserve(block_size);
173
92.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
92.4k
                    << "buffer must be naturally-aligned";
175
92.4k
            _buffer.clear();
176
92.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
92.4k
            _finished = false;
178
92.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
92.4k
        });
180
92.5k
        return Status::OK();
181
92.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
166
1.01k
    Status reset() override {
167
1.01k
        RETURN_IF_CATCH_EXCEPTION({
168
1.01k
            size_t block_size = _options.data_page_size;
169
1.01k
            _count = 0;
170
1.01k
            _raw_data_size = 0;
171
1.01k
            _data.clear();
172
1.01k
            _data.reserve(block_size);
173
1.01k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.01k
                    << "buffer must be naturally-aligned";
175
1.01k
            _buffer.clear();
176
1.01k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.01k
            _finished = false;
178
1.01k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.01k
        });
180
1.01k
        return Status::OK();
181
1.01k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
Line
Count
Source
166
14.4k
    Status reset() override {
167
14.4k
        RETURN_IF_CATCH_EXCEPTION({
168
14.4k
            size_t block_size = _options.data_page_size;
169
14.4k
            _count = 0;
170
14.4k
            _raw_data_size = 0;
171
14.4k
            _data.clear();
172
14.4k
            _data.reserve(block_size);
173
14.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
14.4k
                    << "buffer must be naturally-aligned";
175
14.4k
            _buffer.clear();
176
14.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
14.4k
            _finished = false;
178
14.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
14.4k
        });
180
14.5k
        return Status::OK();
181
14.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
166
592
    Status reset() override {
167
592
        RETURN_IF_CATCH_EXCEPTION({
168
592
            size_t block_size = _options.data_page_size;
169
592
            _count = 0;
170
592
            _raw_data_size = 0;
171
592
            _data.clear();
172
592
            _data.reserve(block_size);
173
592
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
592
                    << "buffer must be naturally-aligned";
175
592
            _buffer.clear();
176
592
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
592
            _finished = false;
178
592
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
592
        });
180
592
        return Status::OK();
181
592
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
166
19.8k
    Status reset() override {
167
19.8k
        RETURN_IF_CATCH_EXCEPTION({
168
19.8k
            size_t block_size = _options.data_page_size;
169
19.8k
            _count = 0;
170
19.8k
            _raw_data_size = 0;
171
19.8k
            _data.clear();
172
19.8k
            _data.reserve(block_size);
173
19.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
19.8k
                    << "buffer must be naturally-aligned";
175
19.8k
            _buffer.clear();
176
19.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
19.8k
            _finished = false;
178
19.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
19.8k
        });
180
19.8k
        return Status::OK();
181
19.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
31.4k
    Status reset() override {
167
31.4k
        RETURN_IF_CATCH_EXCEPTION({
168
31.4k
            size_t block_size = _options.data_page_size;
169
31.4k
            _count = 0;
170
31.4k
            _raw_data_size = 0;
171
31.4k
            _data.clear();
172
31.4k
            _data.reserve(block_size);
173
31.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
31.4k
                    << "buffer must be naturally-aligned";
175
31.4k
            _buffer.clear();
176
31.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
31.4k
            _finished = false;
178
31.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
31.4k
        });
180
31.4k
        return Status::OK();
181
31.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
166
35.2k
    Status reset() override {
167
35.2k
        RETURN_IF_CATCH_EXCEPTION({
168
35.2k
            size_t block_size = _options.data_page_size;
169
35.2k
            _count = 0;
170
35.2k
            _raw_data_size = 0;
171
35.2k
            _data.clear();
172
35.2k
            _data.reserve(block_size);
173
35.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
35.2k
                    << "buffer must be naturally-aligned";
175
35.2k
            _buffer.clear();
176
35.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
35.2k
            _finished = false;
178
35.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
35.2k
        });
180
35.2k
        return Status::OK();
181
35.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Line
Count
Source
166
2.50k
    Status reset() override {
167
2.50k
        RETURN_IF_CATCH_EXCEPTION({
168
2.50k
            size_t block_size = _options.data_page_size;
169
2.50k
            _count = 0;
170
2.50k
            _raw_data_size = 0;
171
2.50k
            _data.clear();
172
2.50k
            _data.reserve(block_size);
173
2.50k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
2.50k
                    << "buffer must be naturally-aligned";
175
2.50k
            _buffer.clear();
176
2.50k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
2.50k
            _finished = false;
178
2.50k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
2.50k
        });
180
2.51k
        return Status::OK();
181
2.50k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Line
Count
Source
166
1.77k
    Status reset() override {
167
1.77k
        RETURN_IF_CATCH_EXCEPTION({
168
1.77k
            size_t block_size = _options.data_page_size;
169
1.77k
            _count = 0;
170
1.77k
            _raw_data_size = 0;
171
1.77k
            _data.clear();
172
1.77k
            _data.reserve(block_size);
173
1.77k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.77k
                    << "buffer must be naturally-aligned";
175
1.77k
            _buffer.clear();
176
1.77k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.77k
            _finished = false;
178
1.77k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.77k
        });
180
1.78k
        return Status::OK();
181
1.77k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
166
1.57k
    Status reset() override {
167
1.57k
        RETURN_IF_CATCH_EXCEPTION({
168
1.57k
            size_t block_size = _options.data_page_size;
169
1.57k
            _count = 0;
170
1.57k
            _raw_data_size = 0;
171
1.57k
            _data.clear();
172
1.57k
            _data.reserve(block_size);
173
1.57k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.57k
                    << "buffer must be naturally-aligned";
175
1.57k
            _buffer.clear();
176
1.57k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.57k
            _finished = false;
178
1.57k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.57k
        });
180
1.57k
        return Status::OK();
181
1.57k
    }
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
122k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
68.0k
    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
701
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
20.8k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
921
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
2.71k
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
745
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
185
795
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4sizeEv
Line
Count
Source
185
28
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4sizeEv
Line
Count
Source
185
1.84k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
2.89k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4sizeEv
Line
Count
Source
185
35
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4sizeEv
Line
Count
Source
185
28
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4sizeEv
Line
Count
Source
185
24
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4sizeEv
Line
Count
Source
185
169
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
185
359
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
185
1.21k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4sizeEv
Line
Count
Source
185
26
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4sizeEv
Line
Count
Source
185
48
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4sizeEv
Line
Count
Source
185
32
    uint64_t size() const override { return _buffer.size(); }
186
187
561k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
90.8k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
62.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
7.32k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
151k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
187
8.47k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
70.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
187
12.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
15.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE17get_raw_data_sizeEv
Line
Count
Source
187
346
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
187
39.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
187
45.7k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
187
585
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
Line
Count
Source
187
7.27k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
187
253
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
187
9.90k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
18.9k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
187
17.7k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE17get_raw_data_sizeEv
Line
Count
Source
187
1.20k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Line
Count
Source
187
847
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
187
748
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
881k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
415k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
63.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
7.83k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
150k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.14k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
70.1k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
12.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
15.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
334
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
38.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
46.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
431
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
7.18k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
339
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.90k
            : _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.5k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1.29k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
931
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
826
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
192
193
875k
    OwnedSlice _finish(int final_size_of_type) {
194
875k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
875k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
875k
        int padding_elems = num_elems_after_padding - _count;
199
875k
        int padding_bytes = padding_elems * final_size_of_type;
200
26.1M
        for (int i = 0; i < padding_bytes; i++) {
201
25.3M
            _data.push_back(0);
202
25.3M
        }
203
204
        // reserve enough place for compression
205
875k
        _buffer.resize(
206
875k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
875k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
875k
        int64_t bytes =
210
875k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
875k
                                         num_elems_after_padding, final_size_of_type, 0);
212
875k
        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
875k
        encode_fixed32_le(&_buffer[0], _count);
222
875k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
875k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
875k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
875k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
875k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
875k
        return _buffer.build();
229
875k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
404k
    OwnedSlice _finish(int final_size_of_type) {
194
404k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
404k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
404k
        int padding_elems = num_elems_after_padding - _count;
199
404k
        int padding_bytes = padding_elems * final_size_of_type;
200
8.07M
        for (int i = 0; i < padding_bytes; i++) {
201
7.67M
            _data.push_back(0);
202
7.67M
        }
203
204
        // reserve enough place for compression
205
404k
        _buffer.resize(
206
404k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
404k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
404k
        int64_t bytes =
210
404k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
404k
                                         num_elems_after_padding, final_size_of_type, 0);
212
404k
        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
404k
        encode_fixed32_le(&_buffer[0], _count);
222
404k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
404k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
404k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
404k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
404k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
404k
        return _buffer.build();
229
404k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
62.5k
    OwnedSlice _finish(int final_size_of_type) {
194
62.5k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
62.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
62.5k
        int padding_elems = num_elems_after_padding - _count;
199
62.5k
        int padding_bytes = padding_elems * final_size_of_type;
200
396k
        for (int i = 0; i < padding_bytes; i++) {
201
334k
            _data.push_back(0);
202
334k
        }
203
204
        // reserve enough place for compression
205
62.5k
        _buffer.resize(
206
62.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
62.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
62.5k
        int64_t bytes =
210
62.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
62.5k
                                         num_elems_after_padding, final_size_of_type, 0);
212
62.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
62.5k
        encode_fixed32_le(&_buffer[0], _count);
222
62.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
62.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
62.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
62.5k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
62.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
62.5k
        return _buffer.build();
229
62.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
7.32k
    OwnedSlice _finish(int final_size_of_type) {
194
7.32k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.32k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.32k
        int padding_elems = num_elems_after_padding - _count;
199
7.32k
        int padding_bytes = padding_elems * final_size_of_type;
200
77.2k
        for (int i = 0; i < padding_bytes; i++) {
201
69.8k
            _data.push_back(0);
202
69.8k
        }
203
204
        // reserve enough place for compression
205
7.32k
        _buffer.resize(
206
7.32k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.32k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.32k
        int64_t bytes =
210
7.32k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.32k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.32k
        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.32k
        encode_fixed32_le(&_buffer[0], _count);
222
7.32k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.32k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.32k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.32k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.32k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.32k
        return _buffer.build();
229
7.32k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
151k
    OwnedSlice _finish(int final_size_of_type) {
194
151k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
151k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
151k
        int padding_elems = num_elems_after_padding - _count;
199
151k
        int padding_bytes = padding_elems * final_size_of_type;
200
7.52M
        for (int i = 0; i < padding_bytes; i++) {
201
7.37M
            _data.push_back(0);
202
7.37M
        }
203
204
        // reserve enough place for compression
205
151k
        _buffer.resize(
206
151k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
151k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
151k
        int64_t bytes =
210
151k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
151k
                                         num_elems_after_padding, final_size_of_type, 0);
212
151k
        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
151k
        encode_fixed32_le(&_buffer[0], _count);
222
151k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
151k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
151k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
151k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
151k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
151k
        return _buffer.build();
229
151k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
8.47k
    OwnedSlice _finish(int final_size_of_type) {
194
8.47k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
8.47k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
8.47k
        int padding_elems = num_elems_after_padding - _count;
199
8.47k
        int padding_bytes = padding_elems * final_size_of_type;
200
610k
        for (int i = 0; i < padding_bytes; i++) {
201
602k
            _data.push_back(0);
202
602k
        }
203
204
        // reserve enough place for compression
205
8.47k
        _buffer.resize(
206
8.47k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
8.47k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
8.47k
        int64_t bytes =
210
8.47k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
8.47k
                                         num_elems_after_padding, final_size_of_type, 0);
212
8.47k
        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.47k
        encode_fixed32_le(&_buffer[0], _count);
222
8.47k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
8.47k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
8.47k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
8.47k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
8.47k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
8.47k
        return _buffer.build();
229
8.47k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
70.4k
    OwnedSlice _finish(int final_size_of_type) {
194
70.4k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
70.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
70.4k
        int padding_elems = num_elems_after_padding - _count;
199
70.4k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.33M
        for (int i = 0; i < padding_bytes; i++) {
201
3.26M
            _data.push_back(0);
202
3.26M
        }
203
204
        // reserve enough place for compression
205
70.4k
        _buffer.resize(
206
70.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
70.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
70.4k
        int64_t bytes =
210
70.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
70.4k
                                         num_elems_after_padding, final_size_of_type, 0);
212
70.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
70.4k
        encode_fixed32_le(&_buffer[0], _count);
222
70.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
70.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
70.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
70.4k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
70.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
70.4k
        return _buffer.build();
229
70.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
12.0k
    OwnedSlice _finish(int final_size_of_type) {
194
12.0k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
12.0k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
12.0k
        int padding_elems = num_elems_after_padding - _count;
199
12.0k
        int padding_bytes = padding_elems * final_size_of_type;
200
259k
        for (int i = 0; i < padding_bytes; i++) {
201
247k
            _data.push_back(0);
202
247k
        }
203
204
        // reserve enough place for compression
205
12.0k
        _buffer.resize(
206
12.0k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
12.0k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
12.0k
        int64_t bytes =
210
12.0k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
12.0k
                                         num_elems_after_padding, final_size_of_type, 0);
212
12.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
12.0k
        encode_fixed32_le(&_buffer[0], _count);
222
12.0k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
12.0k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
12.0k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
12.0k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
12.0k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
12.0k
        return _buffer.build();
229
12.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
15.5k
    OwnedSlice _finish(int final_size_of_type) {
194
15.5k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
15.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
15.5k
        int padding_elems = num_elems_after_padding - _count;
199
15.5k
        int padding_bytes = padding_elems * final_size_of_type;
200
628k
        for (int i = 0; i < padding_bytes; i++) {
201
612k
            _data.push_back(0);
202
612k
        }
203
204
        // reserve enough place for compression
205
15.5k
        _buffer.resize(
206
15.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
15.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
15.5k
        int64_t bytes =
210
15.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
15.5k
                                         num_elems_after_padding, final_size_of_type, 0);
212
15.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
15.5k
        encode_fixed32_le(&_buffer[0], _count);
222
15.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
15.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
15.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
15.5k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
15.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
15.5k
        return _buffer.build();
229
15.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
346
    OwnedSlice _finish(int final_size_of_type) {
194
346
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
346
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
346
        int padding_elems = num_elems_after_padding - _count;
199
346
        int padding_bytes = padding_elems * final_size_of_type;
200
5.18k
        for (int i = 0; i < padding_bytes; i++) {
201
4.83k
            _data.push_back(0);
202
4.83k
        }
203
204
        // reserve enough place for compression
205
346
        _buffer.resize(
206
346
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
346
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
346
        int64_t bytes =
210
346
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
346
                                         num_elems_after_padding, final_size_of_type, 0);
212
346
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
346
        encode_fixed32_le(&_buffer[0], _count);
222
346
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
346
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
346
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
346
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
346
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
346
        return _buffer.build();
229
346
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
193
39.0k
    OwnedSlice _finish(int final_size_of_type) {
194
39.0k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
39.0k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
39.0k
        int padding_elems = num_elems_after_padding - _count;
199
39.0k
        int padding_bytes = padding_elems * final_size_of_type;
200
832k
        for (int i = 0; i < padding_bytes; i++) {
201
793k
            _data.push_back(0);
202
793k
        }
203
204
        // reserve enough place for compression
205
39.0k
        _buffer.resize(
206
39.0k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
39.0k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
39.0k
        int64_t bytes =
210
39.0k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
39.0k
                                         num_elems_after_padding, final_size_of_type, 0);
212
39.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
39.0k
        encode_fixed32_le(&_buffer[0], _count);
222
39.0k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
39.0k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
39.0k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
39.0k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
39.0k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
39.0k
        return _buffer.build();
229
39.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
193
45.7k
    OwnedSlice _finish(int final_size_of_type) {
194
45.7k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
45.7k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
45.7k
        int padding_elems = num_elems_after_padding - _count;
199
45.7k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.92M
        for (int i = 0; i < padding_bytes; i++) {
201
1.87M
            _data.push_back(0);
202
1.87M
        }
203
204
        // reserve enough place for compression
205
45.7k
        _buffer.resize(
206
45.7k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
45.7k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
45.7k
        int64_t bytes =
210
45.7k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
45.7k
                                         num_elems_after_padding, final_size_of_type, 0);
212
45.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
45.7k
        encode_fixed32_le(&_buffer[0], _count);
222
45.7k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
45.7k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
45.7k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
45.7k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
45.7k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
45.7k
        return _buffer.build();
229
45.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
193
585
    OwnedSlice _finish(int final_size_of_type) {
194
585
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
585
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
585
        int padding_elems = num_elems_after_padding - _count;
199
585
        int padding_bytes = padding_elems * final_size_of_type;
200
13.3k
        for (int i = 0; i < padding_bytes; i++) {
201
12.7k
            _data.push_back(0);
202
12.7k
        }
203
204
        // reserve enough place for compression
205
585
        _buffer.resize(
206
585
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
585
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
585
        int64_t bytes =
210
585
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
585
                                         num_elems_after_padding, final_size_of_type, 0);
212
585
        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
585
        encode_fixed32_le(&_buffer[0], _count);
222
585
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
585
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
585
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
585
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
585
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
585
        return _buffer.build();
229
585
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
Line
Count
Source
193
7.27k
    OwnedSlice _finish(int final_size_of_type) {
194
7.27k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.27k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.27k
        int padding_elems = num_elems_after_padding - _count;
199
7.27k
        int padding_bytes = padding_elems * final_size_of_type;
200
379k
        for (int i = 0; i < padding_bytes; i++) {
201
372k
            _data.push_back(0);
202
372k
        }
203
204
        // reserve enough place for compression
205
7.27k
        _buffer.resize(
206
7.27k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.27k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.27k
        int64_t bytes =
210
7.27k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.27k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.27k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
7.27k
        encode_fixed32_le(&_buffer[0], _count);
222
7.27k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.27k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.27k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.27k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.27k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.27k
        return _buffer.build();
229
7.27k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
193
253
    OwnedSlice _finish(int final_size_of_type) {
194
253
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
253
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
253
        int padding_elems = num_elems_after_padding - _count;
199
253
        int padding_bytes = padding_elems * final_size_of_type;
200
15.7k
        for (int i = 0; i < padding_bytes; i++) {
201
15.4k
            _data.push_back(0);
202
15.4k
        }
203
204
        // reserve enough place for compression
205
253
        _buffer.resize(
206
253
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
253
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
253
        int64_t bytes =
210
253
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
253
                                         num_elems_after_padding, final_size_of_type, 0);
212
253
        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
253
        encode_fixed32_le(&_buffer[0], _count);
222
253
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
253
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
253
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
253
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
253
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
253
        return _buffer.build();
229
253
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
193
9.90k
    OwnedSlice _finish(int final_size_of_type) {
194
9.90k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
9.90k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
9.90k
        int padding_elems = num_elems_after_padding - _count;
199
9.90k
        int padding_bytes = padding_elems * final_size_of_type;
200
122k
        for (int i = 0; i < padding_bytes; i++) {
201
112k
            _data.push_back(0);
202
112k
        }
203
204
        // reserve enough place for compression
205
9.90k
        _buffer.resize(
206
9.90k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
9.90k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
9.90k
        int64_t bytes =
210
9.90k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
9.90k
                                         num_elems_after_padding, final_size_of_type, 0);
212
9.90k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
9.90k
        encode_fixed32_le(&_buffer[0], _count);
222
9.90k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
9.90k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
9.90k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
9.90k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
9.90k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
9.90k
        return _buffer.build();
229
9.90k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
18.9k
    OwnedSlice _finish(int final_size_of_type) {
194
18.9k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
18.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
18.9k
        int padding_elems = num_elems_after_padding - _count;
199
18.9k
        int padding_bytes = padding_elems * final_size_of_type;
200
504k
        for (int i = 0; i < padding_bytes; i++) {
201
485k
            _data.push_back(0);
202
485k
        }
203
204
        // reserve enough place for compression
205
18.9k
        _buffer.resize(
206
18.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
18.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
18.9k
        int64_t bytes =
210
18.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
18.9k
                                         num_elems_after_padding, final_size_of_type, 0);
212
18.9k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
18.9k
        encode_fixed32_le(&_buffer[0], _count);
222
18.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
18.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
18.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
18.9k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
18.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
18.9k
        return _buffer.build();
229
18.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
193
17.7k
    OwnedSlice _finish(int final_size_of_type) {
194
17.7k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
17.7k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
17.7k
        int padding_elems = num_elems_after_padding - _count;
199
17.7k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.20M
        for (int i = 0; i < padding_bytes; i++) {
201
1.18M
            _data.push_back(0);
202
1.18M
        }
203
204
        // reserve enough place for compression
205
17.7k
        _buffer.resize(
206
17.7k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
17.7k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
17.7k
        int64_t bytes =
210
17.7k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
17.7k
                                         num_elems_after_padding, final_size_of_type, 0);
212
17.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
17.7k
        encode_fixed32_le(&_buffer[0], _count);
222
17.7k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
17.7k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
17.7k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
17.7k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
17.7k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
17.7k
        return _buffer.build();
229
17.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE7_finishEi
Line
Count
Source
193
1.20k
    OwnedSlice _finish(int final_size_of_type) {
194
1.20k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
1.20k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
1.20k
        int padding_elems = num_elems_after_padding - _count;
199
1.20k
        int padding_bytes = padding_elems * final_size_of_type;
200
186k
        for (int i = 0; i < padding_bytes; i++) {
201
185k
            _data.push_back(0);
202
185k
        }
203
204
        // reserve enough place for compression
205
1.20k
        _buffer.resize(
206
1.20k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
1.20k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
1.20k
        int64_t bytes =
210
1.20k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
1.20k
                                         num_elems_after_padding, final_size_of_type, 0);
212
1.20k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
1.20k
        encode_fixed32_le(&_buffer[0], _count);
222
1.20k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
1.20k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
1.20k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
1.20k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
1.20k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
1.20k
        return _buffer.build();
229
1.20k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Line
Count
Source
193
847
    OwnedSlice _finish(int final_size_of_type) {
194
847
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
847
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
847
        int padding_elems = num_elems_after_padding - _count;
199
847
        int padding_bytes = padding_elems * final_size_of_type;
200
17.9k
        for (int i = 0; i < padding_bytes; i++) {
201
17.1k
            _data.push_back(0);
202
17.1k
        }
203
204
        // reserve enough place for compression
205
847
        _buffer.resize(
206
847
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
847
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
847
        int64_t bytes =
210
847
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
847
                                         num_elems_after_padding, final_size_of_type, 0);
212
847
        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
847
        encode_fixed32_le(&_buffer[0], _count);
222
847
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
847
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
847
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
847
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
847
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
847
        return _buffer.build();
229
847
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
193
748
    OwnedSlice _finish(int final_size_of_type) {
194
748
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
748
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
748
        int padding_elems = num_elems_after_padding - _count;
199
748
        int padding_bytes = padding_elems * final_size_of_type;
200
59.8k
        for (int i = 0; i < padding_bytes; i++) {
201
59.1k
            _data.push_back(0);
202
59.1k
        }
203
204
        // reserve enough place for compression
205
748
        _buffer.resize(
206
748
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
748
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
748
        int64_t bytes =
210
748
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
748
                                         num_elems_after_padding, final_size_of_type, 0);
212
748
        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
748
        encode_fixed32_le(&_buffer[0], _count);
222
748
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
748
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
748
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
748
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
748
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
748
        return _buffer.build();
229
748
    }
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.46M
                                       int& size_of_element) {
253
2.46M
    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.46M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
2.46M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
2.46M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
2.46M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
2.46M
    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.46M
    switch (size_of_element) {
271
286k
    case 1:
272
308k
    case 2:
273
311k
    case 3:
274
1.69M
    case 4:
275
2.36M
    case 8:
276
2.36M
    case 12:
277
2.45M
    case 16:
278
2.46M
    case 32:
279
2.46M
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
2.46M
    }
283
2.46M
    return Status::OK();
284
2.46M
}
285
286
template <FieldType Type>
287
class BitShufflePageDecoder : public PageDecoder {
288
public:
289
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
290
1.25M
            : _data(data),
291
1.25M
              _options(options),
292
1.25M
              _parsed(false),
293
1.25M
              _num_elements(0),
294
1.25M
              _num_element_after_padding(0),
295
1.25M
              _size_of_element(0),
296
1.25M
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
597k
            : _data(data),
291
597k
              _options(options),
292
597k
              _parsed(false),
293
597k
              _num_elements(0),
294
597k
              _num_element_after_padding(0),
295
597k
              _size_of_element(0),
296
597k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
160k
            : _data(data),
291
160k
              _options(options),
292
160k
              _parsed(false),
293
160k
              _num_elements(0),
294
160k
              _num_element_after_padding(0),
295
160k
              _size_of_element(0),
296
160k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
11.0k
            : _data(data),
291
11.0k
              _options(options),
292
11.0k
              _parsed(false),
293
11.0k
              _num_elements(0),
294
11.0k
              _num_element_after_padding(0),
295
11.0k
              _size_of_element(0),
296
11.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
87.0k
            : _data(data),
291
87.0k
              _options(options),
292
87.0k
              _parsed(false),
293
87.0k
              _num_elements(0),
294
87.0k
              _num_element_after_padding(0),
295
87.0k
              _size_of_element(0),
296
87.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
13.4k
            : _data(data),
291
13.4k
              _options(options),
292
13.4k
              _parsed(false),
293
13.4k
              _num_elements(0),
294
13.4k
              _num_element_after_padding(0),
295
13.4k
              _size_of_element(0),
296
13.4k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
89.3k
            : _data(data),
291
89.3k
              _options(options),
292
89.3k
              _parsed(false),
293
89.3k
              _num_elements(0),
294
89.3k
              _num_element_after_padding(0),
295
89.3k
              _size_of_element(0),
296
89.3k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
20.1k
            : _data(data),
291
20.1k
              _options(options),
292
20.1k
              _parsed(false),
293
20.1k
              _num_elements(0),
294
20.1k
              _num_element_after_padding(0),
295
20.1k
              _size_of_element(0),
296
20.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
31.0k
            : _data(data),
291
31.0k
              _options(options),
292
31.0k
              _parsed(false),
293
31.0k
              _num_elements(0),
294
31.0k
              _num_element_after_padding(0),
295
31.0k
              _size_of_element(0),
296
31.0k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.70k
            : _data(data),
291
1.70k
              _options(options),
292
1.70k
              _parsed(false),
293
1.70k
              _num_elements(0),
294
1.70k
              _num_element_after_padding(0),
295
1.70k
              _size_of_element(0),
296
1.70k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
59.5k
            : _data(data),
291
59.5k
              _options(options),
292
59.5k
              _parsed(false),
293
59.5k
              _num_elements(0),
294
59.5k
              _num_element_after_padding(0),
295
59.5k
              _size_of_element(0),
296
59.5k
              _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.37k
            : _data(data),
291
2.37k
              _options(options),
292
2.37k
              _parsed(false),
293
2.37k
              _num_elements(0),
294
2.37k
              _num_element_after_padding(0),
295
2.37k
              _size_of_element(0),
296
2.37k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
14.7k
            : _data(data),
291
14.7k
              _options(options),
292
14.7k
              _parsed(false),
293
14.7k
              _num_elements(0),
294
14.7k
              _num_element_after_padding(0),
295
14.7k
              _size_of_element(0),
296
14.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.48k
            : _data(data),
291
1.48k
              _options(options),
292
1.48k
              _parsed(false),
293
1.48k
              _num_elements(0),
294
1.48k
              _num_element_after_padding(0),
295
1.48k
              _size_of_element(0),
296
1.48k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
15.7k
            : _data(data),
291
15.7k
              _options(options),
292
15.7k
              _parsed(false),
293
15.7k
              _num_elements(0),
294
15.7k
              _num_element_after_padding(0),
295
15.7k
              _size_of_element(0),
296
15.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
41.5k
            : _data(data),
291
41.5k
              _options(options),
292
41.5k
              _parsed(false),
293
41.5k
              _num_elements(0),
294
41.5k
              _num_element_after_padding(0),
295
41.5k
              _size_of_element(0),
296
41.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
31.0k
            : _data(data),
291
31.0k
              _options(options),
292
31.0k
              _parsed(false),
293
31.0k
              _num_elements(0),
294
31.0k
              _num_element_after_padding(0),
295
31.0k
              _size_of_element(0),
296
31.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.79k
            : _data(data),
291
1.79k
              _options(options),
292
1.79k
              _parsed(false),
293
1.79k
              _num_elements(0),
294
1.79k
              _num_element_after_padding(0),
295
1.79k
              _size_of_element(0),
296
1.79k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.22k
            : _data(data),
291
1.22k
              _options(options),
292
1.22k
              _parsed(false),
293
1.22k
              _num_elements(0),
294
1.22k
              _num_element_after_padding(0),
295
1.22k
              _size_of_element(0),
296
1.22k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.13k
            : _data(data),
291
1.13k
              _options(options),
292
1.13k
              _parsed(false),
293
1.13k
              _num_elements(0),
294
1.13k
              _num_element_after_padding(0),
295
1.13k
              _size_of_element(0),
296
1.13k
              _cur_index(0) {}
297
298
1.25M
    Status init() override {
299
1.25M
        CHECK(!_parsed);
300
1.25M
        size_t unused;
301
1.25M
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.25M
                                                 _num_element_after_padding, _size_of_element));
303
304
1.25M
        if (_data.size !=
305
1.25M
            _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.25M
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.25M
                     _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.25M
        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.25M
        _parsed = true;
325
1.25M
        return Status::OK();
326
1.25M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
298
597k
    Status init() override {
299
597k
        CHECK(!_parsed);
300
597k
        size_t unused;
301
597k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
597k
                                                 _num_element_after_padding, _size_of_element));
303
304
597k
        if (_data.size !=
305
597k
            _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
597k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
597k
                     _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
597k
        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
597k
        _parsed = true;
325
597k
        return Status::OK();
326
597k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
160k
    Status init() override {
299
160k
        CHECK(!_parsed);
300
160k
        size_t unused;
301
160k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
160k
                                                 _num_element_after_padding, _size_of_element));
303
304
160k
        if (_data.size !=
305
160k
            _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
160k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
160k
                     _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
160k
        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
160k
        _parsed = true;
325
160k
        return Status::OK();
326
160k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
11.0k
    Status init() override {
299
11.0k
        CHECK(!_parsed);
300
11.0k
        size_t unused;
301
11.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
11.0k
                                                 _num_element_after_padding, _size_of_element));
303
304
11.0k
        if (_data.size !=
305
11.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
11.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
11.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
11.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
11.0k
        _parsed = true;
325
11.0k
        return Status::OK();
326
11.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
87.0k
    Status init() override {
299
87.0k
        CHECK(!_parsed);
300
87.0k
        size_t unused;
301
87.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
87.0k
                                                 _num_element_after_padding, _size_of_element));
303
304
87.0k
        if (_data.size !=
305
87.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
87.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
87.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
87.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
87.0k
        _parsed = true;
325
87.0k
        return Status::OK();
326
87.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
298
13.4k
    Status init() override {
299
13.4k
        CHECK(!_parsed);
300
13.4k
        size_t unused;
301
13.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
13.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
13.4k
        if (_data.size !=
305
13.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
13.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
13.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
13.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
13.4k
        _parsed = true;
325
13.4k
        return Status::OK();
326
13.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
298
89.2k
    Status init() override {
299
89.2k
        CHECK(!_parsed);
300
89.2k
        size_t unused;
301
89.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
89.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
89.2k
        if (_data.size !=
305
89.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
89.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
89.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
89.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
89.2k
        _parsed = true;
325
89.2k
        return Status::OK();
326
89.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
298
20.1k
    Status init() override {
299
20.1k
        CHECK(!_parsed);
300
20.1k
        size_t unused;
301
20.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
20.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
20.1k
        if (_data.size !=
305
20.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
20.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
20.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
20.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
20.1k
        _parsed = true;
325
20.1k
        return Status::OK();
326
20.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
298
31.0k
    Status init() override {
299
31.0k
        CHECK(!_parsed);
300
31.0k
        size_t unused;
301
31.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
31.0k
                                                 _num_element_after_padding, _size_of_element));
303
304
31.0k
        if (_data.size !=
305
31.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
31.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
31.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
31.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
31.0k
        _parsed = true;
325
31.0k
        return Status::OK();
326
31.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
1.70k
    Status init() override {
299
1.70k
        CHECK(!_parsed);
300
1.70k
        size_t unused;
301
1.70k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.70k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.70k
        if (_data.size !=
305
1.70k
            _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.70k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.70k
                     _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.70k
        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.70k
        _parsed = true;
325
1.70k
        return Status::OK();
326
1.70k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
59.5k
    Status init() override {
299
59.5k
        CHECK(!_parsed);
300
59.5k
        size_t unused;
301
59.5k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
59.5k
                                                 _num_element_after_padding, _size_of_element));
303
304
59.5k
        if (_data.size !=
305
59.5k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
59.5k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
59.5k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
59.5k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
59.5k
        _parsed = true;
325
59.5k
        return Status::OK();
326
59.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
298
70.5k
    Status init() override {
299
70.5k
        CHECK(!_parsed);
300
70.5k
        size_t unused;
301
70.5k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
70.5k
                                                 _num_element_after_padding, _size_of_element));
303
304
70.5k
        if (_data.size !=
305
70.5k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
70.5k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
70.5k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
70.5k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
70.5k
        _parsed = true;
325
70.5k
        return Status::OK();
326
70.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
298
2.37k
    Status init() override {
299
2.37k
        CHECK(!_parsed);
300
2.37k
        size_t unused;
301
2.37k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
2.37k
                                                 _num_element_after_padding, _size_of_element));
303
304
2.37k
        if (_data.size !=
305
2.37k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
2.37k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
2.37k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
2.37k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
2.37k
        _parsed = true;
325
2.37k
        return Status::OK();
326
2.37k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
298
14.7k
    Status init() override {
299
14.7k
        CHECK(!_parsed);
300
14.7k
        size_t unused;
301
14.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
14.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
14.7k
        if (_data.size !=
305
14.7k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
14.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
14.7k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
14.7k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
14.7k
        _parsed = true;
325
14.7k
        return Status::OK();
326
14.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
298
1.47k
    Status init() override {
299
1.47k
        CHECK(!_parsed);
300
1.47k
        size_t unused;
301
1.47k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.47k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.47k
        if (_data.size !=
305
1.47k
            _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.47k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.47k
                     _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.47k
        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.47k
        _parsed = true;
325
1.47k
        return Status::OK();
326
1.47k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
298
15.6k
    Status init() override {
299
15.6k
        CHECK(!_parsed);
300
15.6k
        size_t unused;
301
15.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
15.6k
                                                 _num_element_after_padding, _size_of_element));
303
304
15.6k
        if (_data.size !=
305
15.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
15.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
15.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
15.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
15.6k
        _parsed = true;
325
15.6k
        return Status::OK();
326
15.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
298
41.5k
    Status init() override {
299
41.5k
        CHECK(!_parsed);
300
41.5k
        size_t unused;
301
41.5k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
41.5k
                                                 _num_element_after_padding, _size_of_element));
303
304
41.5k
        if (_data.size !=
305
41.5k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
41.5k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
41.5k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
41.5k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
41.5k
        _parsed = true;
325
41.5k
        return Status::OK();
326
41.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
298
31.0k
    Status init() override {
299
31.0k
        CHECK(!_parsed);
300
31.0k
        size_t unused;
301
31.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
31.0k
                                                 _num_element_after_padding, _size_of_element));
303
304
31.0k
        if (_data.size !=
305
31.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
31.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
31.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
31.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
31.0k
        _parsed = true;
325
31.0k
        return Status::OK();
326
31.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
298
1.79k
    Status init() override {
299
1.79k
        CHECK(!_parsed);
300
1.79k
        size_t unused;
301
1.79k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.79k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.79k
        if (_data.size !=
305
1.79k
            _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.79k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.79k
                     _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.79k
        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.79k
        _parsed = true;
325
1.79k
        return Status::OK();
326
1.79k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
298
1.21k
    Status init() override {
299
1.21k
        CHECK(!_parsed);
300
1.21k
        size_t unused;
301
1.21k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.21k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.21k
        if (_data.size !=
305
1.21k
            _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.21k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.21k
                     _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.21k
        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.21k
        _parsed = true;
325
1.21k
        return Status::OK();
326
1.21k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
298
1.13k
    Status init() override {
299
1.13k
        CHECK(!_parsed);
300
1.13k
        size_t unused;
301
1.13k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.13k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.13k
        if (_data.size !=
305
1.13k
            _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.13k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.13k
                     _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.13k
        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.13k
        _parsed = true;
325
1.13k
        return Status::OK();
326
1.13k
    }
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
2.74M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
2.74M
        if (_num_elements == 0) [[unlikely]] {
337
10.4k
            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.4k
        }
342
343
2.74M
        DCHECK_LE(pos, _num_elements);
344
2.74M
        _cur_index = pos;
345
2.74M
        return Status::OK();
346
2.74M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.01M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
1.01M
        if (_num_elements == 0) [[unlikely]] {
337
4.90k
            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.90k
        }
342
343
1.01M
        DCHECK_LE(pos, _num_elements);
344
1.01M
        _cur_index = pos;
345
1.01M
        return Status::OK();
346
1.01M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
96.6k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
96.6k
        if (_num_elements == 0) [[unlikely]] {
337
528
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
528
        }
342
343
96.6k
        DCHECK_LE(pos, _num_elements);
344
96.6k
        _cur_index = pos;
345
96.6k
        return Status::OK();
346
96.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
6.41k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
6.41k
        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
6.41k
        DCHECK_LE(pos, _num_elements);
344
6.41k
        _cur_index = pos;
345
6.41k
        return Status::OK();
346
6.41k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
42.4k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
42.4k
        if (_num_elements == 0) [[unlikely]] {
337
820
            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
820
        }
342
343
42.4k
        DCHECK_LE(pos, _num_elements);
344
42.4k
        _cur_index = pos;
345
42.4k
        return Status::OK();
346
42.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
334
5.43k
    Status seek_to_position_in_page(size_t pos) override {
335
5.43k
        DCHECK(_parsed) << "Must call init()";
336
5.43k
        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
5.43k
        DCHECK_LE(pos, _num_elements);
344
5.43k
        _cur_index = pos;
345
5.43k
        return Status::OK();
346
5.43k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
334
11.0k
    Status seek_to_position_in_page(size_t pos) override {
335
11.0k
        DCHECK(_parsed) << "Must call init()";
336
11.0k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
11.0k
        DCHECK_LE(pos, _num_elements);
344
11.0k
        _cur_index = pos;
345
11.0k
        return Status::OK();
346
11.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
224k
    Status seek_to_position_in_page(size_t pos) override {
335
224k
        DCHECK(_parsed) << "Must call init()";
336
224k
        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
224k
        DCHECK_LE(pos, _num_elements);
344
224k
        _cur_index = pos;
345
224k
        return Status::OK();
346
224k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
334
202k
    Status seek_to_position_in_page(size_t pos) override {
335
202k
        DCHECK(_parsed) << "Must call init()";
336
202k
        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
202k
        DCHECK_LE(pos, _num_elements);
344
202k
        _cur_index = pos;
345
202k
        return Status::OK();
346
202k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
334
217k
    Status seek_to_position_in_page(size_t pos) override {
335
217k
        DCHECK(_parsed) << "Must call init()";
336
217k
        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
217k
        DCHECK_LE(pos, _num_elements);
344
217k
        _cur_index = pos;
345
217k
        return Status::OK();
346
217k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
334
505k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
505k
        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
505k
        DCHECK_LE(pos, _num_elements);
344
505k
        _cur_index = pos;
345
505k
        return Status::OK();
346
505k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
334
68.3k
    Status seek_to_position_in_page(size_t pos) override {
335
68.3k
        DCHECK(_parsed) << "Must call init()";
336
68.3k
        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
68.3k
        DCHECK_LE(pos, _num_elements);
344
68.3k
        _cur_index = pos;
345
68.3k
        return Status::OK();
346
68.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
198k
    Status seek_to_position_in_page(size_t pos) override {
335
198k
        DCHECK(_parsed) << "Must call init()";
336
198k
        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
198k
        DCHECK_LE(pos, _num_elements);
344
198k
        _cur_index = pos;
345
198k
        return Status::OK();
346
198k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
334
6.55k
    Status seek_to_position_in_page(size_t pos) override {
335
6.55k
        DCHECK(_parsed) << "Must call init()";
336
6.55k
        if (_num_elements == 0) [[unlikely]] {
337
353
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
353
        }
342
343
6.55k
        DCHECK_LE(pos, _num_elements);
344
6.55k
        _cur_index = pos;
345
6.55k
        return Status::OK();
346
6.55k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
Line
Count
Source
334
140
    Status seek_to_position_in_page(size_t pos) override {
335
140
        DCHECK(_parsed) << "Must call init()";
336
140
        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
140
        DCHECK_LE(pos, _num_elements);
344
140
        _cur_index = pos;
345
140
        return Status::OK();
346
140
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Line
Count
Source
334
864
    Status seek_to_position_in_page(size_t pos) override {
335
864
        DCHECK(_parsed) << "Must call init()";
336
864
        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
864
        DCHECK_LE(pos, _num_elements);
344
864
        _cur_index = pos;
345
864
        return Status::OK();
346
864
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
334
18.3k
    Status seek_to_position_in_page(size_t pos) override {
335
18.3k
        DCHECK(_parsed) << "Must call init()";
336
18.3k
        if (_num_elements == 0) [[unlikely]] {
337
1.64k
            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.64k
        }
342
343
18.3k
        DCHECK_LE(pos, _num_elements);
344
18.3k
        _cur_index = pos;
345
18.3k
        return Status::OK();
346
18.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Line
Count
Source
334
121k
    Status seek_to_position_in_page(size_t pos) override {
335
121k
        DCHECK(_parsed) << "Must call init()";
336
121k
        if (_num_elements == 0) [[unlikely]] {
337
528
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
528
        }
342
343
121k
        DCHECK_LE(pos, _num_elements);
344
121k
        _cur_index = pos;
345
121k
        return Status::OK();
346
121k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.98k
    Status seek_to_position_in_page(size_t pos) override {
335
1.98k
        DCHECK(_parsed) << "Must call init()";
336
1.98k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
1.98k
        DCHECK_LE(pos, _num_elements);
344
1.98k
        _cur_index = pos;
345
1.98k
        return Status::OK();
346
1.98k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE24seek_to_position_in_pageEm
Line
Count
Source
334
46
    Status seek_to_position_in_page(size_t pos) override {
335
46
        DCHECK(_parsed) << "Must call init()";
336
46
        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
46
        DCHECK_LE(pos, _num_elements);
344
46
        _cur_index = pos;
345
46
        return Status::OK();
346
46
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE24seek_to_position_in_pageEm
Line
Count
Source
334
89
    Status seek_to_position_in_page(size_t pos) override {
335
89
        DCHECK(_parsed) << "Must call init()";
336
89
        if (_num_elements == 0) [[unlikely]] {
337
1
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
1
        }
342
343
89
        DCHECK_LE(pos, _num_elements);
344
89
        _cur_index = pos;
345
89
        return Status::OK();
346
89
    }
347
348
0
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
349
0
        DCHECK(_parsed) << "Must call init() firstly";
350
351
0
        if (_num_elements == 0) {
352
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
353
0
        }
354
355
0
        size_t left = 0;
356
0
        size_t right = _num_elements;
357
358
0
        void* mid_value = nullptr;
359
360
        // find the first value >= target. after loop,
361
        // - left == index of first value >= target when found
362
        // - left == _num_elements when not found (all values < target)
363
0
        while (left < right) {
364
0
            size_t mid = left + (right - left) / 2;
365
0
            mid_value = get_data(mid);
366
0
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
367
0
                left = mid + 1;
368
0
            } else {
369
0
                right = mid;
370
0
            }
371
0
        }
372
0
        if (left >= _num_elements) {
373
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
374
0
        }
375
0
        void* find_value = get_data(left);
376
0
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
377
0
            *exact_match = true;
378
0
        } else {
379
0
            *exact_match = false;
380
0
        }
381
382
0
        _cur_index = left;
383
0
        return Status::OK();
384
0
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE22seek_at_or_after_valueEPKvPb
385
386
    template <bool forward_index = true>
387
1.89M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.89M
        DCHECK(_parsed);
389
1.89M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.89M
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.89M
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.89M
        *n = max_fetch;
398
1.89M
        if constexpr (forward_index) {
399
1.64M
            _cur_index += max_fetch;
400
1.64M
        }
401
402
1.89M
        return Status::OK();
403
1.89M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
409k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
409k
        DCHECK(_parsed);
389
410k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
409k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
409k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
409k
        *n = max_fetch;
398
409k
        if constexpr (forward_index) {
399
409k
            _cur_index += max_fetch;
400
409k
        }
401
402
409k
        return Status::OK();
403
409k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
299k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
299k
        DCHECK(_parsed);
389
299k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
299k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
299k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
299k
        *n = max_fetch;
398
299k
        if constexpr (forward_index) {
399
299k
            _cur_index += max_fetch;
400
299k
        }
401
402
299k
        return Status::OK();
403
299k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
17.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
17.0k
        DCHECK(_parsed);
389
17.0k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
17.0k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
17.0k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
17.0k
        *n = max_fetch;
398
17.0k
        if constexpr (forward_index) {
399
17.0k
            _cur_index += max_fetch;
400
17.0k
        }
401
402
17.0k
        return Status::OK();
403
17.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
85.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
85.2k
        DCHECK(_parsed);
389
85.2k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
85.2k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
85.2k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
85.2k
        *n = max_fetch;
398
85.2k
        if constexpr (forward_index) {
399
85.2k
            _cur_index += max_fetch;
400
85.2k
        }
401
402
85.2k
        return Status::OK();
403
85.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
16.3k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
16.3k
        DCHECK(_parsed);
389
16.3k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
16.3k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
16.3k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
16.3k
        *n = max_fetch;
398
16.3k
        if constexpr (forward_index) {
399
16.3k
            _cur_index += max_fetch;
400
16.3k
        }
401
402
16.3k
        return Status::OK();
403
16.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
174k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
174k
        DCHECK(_parsed);
389
174k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
174k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
174k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
174k
        *n = max_fetch;
398
174k
        if constexpr (forward_index) {
399
174k
            _cur_index += max_fetch;
400
174k
        }
401
402
174k
        return Status::OK();
403
174k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
249k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
249k
        DCHECK(_parsed);
389
250k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
249k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
249k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
249k
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
249k
        return Status::OK();
403
249k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
14.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
14.5k
        DCHECK(_parsed);
389
14.5k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
14.5k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
14.5k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
14.5k
        *n = max_fetch;
398
14.5k
        if constexpr (forward_index) {
399
14.5k
            _cur_index += max_fetch;
400
14.5k
        }
401
402
14.5k
        return Status::OK();
403
14.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
28.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
28.9k
        DCHECK(_parsed);
389
28.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
28.9k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
28.9k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
28.9k
        *n = max_fetch;
398
28.9k
        if constexpr (forward_index) {
399
28.9k
            _cur_index += max_fetch;
400
28.9k
        }
401
402
28.9k
        return Status::OK();
403
28.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_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
11.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
11.7k
        DCHECK(_parsed);
389
11.7k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
11.7k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
11.7k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
11.7k
        *n = max_fetch;
398
11.7k
        if constexpr (forward_index) {
399
11.7k
            _cur_index += max_fetch;
400
11.7k
        }
401
402
11.7k
        return Status::OK();
403
11.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
396k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
396k
        DCHECK(_parsed);
389
396k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
396k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
396k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
396k
        *n = max_fetch;
398
396k
        if constexpr (forward_index) {
399
396k
            _cur_index += max_fetch;
400
396k
        }
401
402
396k
        return Status::OK();
403
396k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
91.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
91.4k
        DCHECK(_parsed);
389
91.4k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
91.4k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
91.4k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
91.4k
        *n = max_fetch;
398
91.4k
        if constexpr (forward_index) {
399
91.4k
            _cur_index += max_fetch;
400
91.4k
        }
401
402
91.4k
        return Status::OK();
403
91.4k
    }
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.47k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.47k
        DCHECK(_parsed);
389
1.47k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.47k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.47k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.47k
        *n = max_fetch;
398
1.47k
        if constexpr (forward_index) {
399
1.47k
            _cur_index += max_fetch;
400
1.47k
        }
401
402
1.47k
        return Status::OK();
403
1.47k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
7.49k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
7.49k
        DCHECK(_parsed);
389
7.49k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
7.49k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
7.49k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
7.49k
        *n = max_fetch;
398
7.49k
        if constexpr (forward_index) {
399
7.49k
            _cur_index += max_fetch;
400
7.49k
        }
401
402
7.49k
        return Status::OK();
403
7.49k
    }
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.38k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.38k
        DCHECK(_parsed);
389
1.38k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.38k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.38k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.38k
        *n = max_fetch;
398
1.38k
        if constexpr (forward_index) {
399
1.38k
            _cur_index += max_fetch;
400
1.38k
        }
401
402
1.38k
        return Status::OK();
403
1.38k
    }
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
29.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
29.9k
        DCHECK(_parsed);
389
29.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
29.9k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
29.9k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
29.9k
        *n = max_fetch;
398
29.9k
        if constexpr (forward_index) {
399
29.9k
            _cur_index += max_fetch;
400
29.9k
        }
401
402
29.9k
        return Status::OK();
403
29.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
29.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
29.1k
        DCHECK(_parsed);
389
29.1k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
29.1k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
29.1k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
29.1k
        *n = max_fetch;
398
29.1k
        if constexpr (forward_index) {
399
29.1k
            _cur_index += max_fetch;
400
29.1k
        }
401
402
29.1k
        return Status::OK();
403
29.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.23k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.23k
        DCHECK(_parsed);
389
3.23k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.23k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.23k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.23k
        *n = max_fetch;
398
3.23k
        if constexpr (forward_index) {
399
3.23k
            _cur_index += max_fetch;
400
3.23k
        }
401
402
3.23k
        return Status::OK();
403
3.23k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
8.30k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
8.30k
        DCHECK(_parsed);
389
8.30k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
8.30k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
8.30k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
8.30k
        *n = max_fetch;
398
8.30k
        if constexpr (forward_index) {
399
8.30k
            _cur_index += max_fetch;
400
8.30k
        }
401
402
8.30k
        return Status::OK();
403
8.30k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
5.82k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
5.82k
        DCHECK(_parsed);
389
5.82k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
5.82k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
5.82k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
5.82k
        *n = max_fetch;
398
5.82k
        if constexpr (forward_index) {
399
5.82k
            _cur_index += max_fetch;
400
5.82k
        }
401
402
5.82k
        return Status::OK();
403
5.82k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
404
405
1.64M
    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
410k
    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
299k
    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
17.0k
    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
85.2k
    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
16.3k
    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
174k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
14.5k
    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
28.9k
    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
11.7k
    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
396k
    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
91.4k
    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.47k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
7.49k
    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.38k
    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
29.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
29.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
3.23k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
8.30k
    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
5.82k
    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
376k
                          MutableColumnPtr& dst) override {
409
376k
        DCHECK(_parsed);
410
376k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
376k
        auto total = *n;
416
376k
        auto read_count = 0;
417
376k
        _buffer.resize(total);
418
75.3M
        for (size_t i = 0; i < total; ++i) {
419
74.9M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
74.9M
            if (UNLIKELY(ord >= _num_elements)) {
421
9.82k
                break;
422
9.82k
            }
423
424
74.9M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
74.9M
        }
426
427
377k
        if (LIKELY(read_count > 0)) {
428
377k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
377k
        }
430
431
376k
        *n = read_count;
432
376k
        return Status::OK();
433
376k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
91.5k
                          MutableColumnPtr& dst) override {
409
91.5k
        DCHECK(_parsed);
410
91.5k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
91.5k
        auto total = *n;
416
91.5k
        auto read_count = 0;
417
91.5k
        _buffer.resize(total);
418
12.9M
        for (size_t i = 0; i < total; ++i) {
419
12.9M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
12.9M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.32k
                break;
422
1.32k
            }
423
424
12.9M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
12.9M
        }
426
427
91.5k
        if (LIKELY(read_count > 0)) {
428
91.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
91.5k
        }
430
431
91.5k
        *n = read_count;
432
91.5k
        return Status::OK();
433
91.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
54.4k
                          MutableColumnPtr& dst) override {
409
54.4k
        DCHECK(_parsed);
410
54.4k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
54.4k
        auto total = *n;
416
54.4k
        auto read_count = 0;
417
54.4k
        _buffer.resize(total);
418
823k
        for (size_t i = 0; i < total; ++i) {
419
768k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
768k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
768k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
768k
        }
426
427
54.4k
        if (LIKELY(read_count > 0)) {
428
54.4k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
54.4k
        }
430
431
54.4k
        *n = read_count;
432
54.4k
        return Status::OK();
433
54.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4.40k
                          MutableColumnPtr& dst) override {
409
4.40k
        DCHECK(_parsed);
410
4.40k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.40k
        auto total = *n;
416
4.40k
        auto read_count = 0;
417
4.40k
        _buffer.resize(total);
418
48.3k
        for (size_t i = 0; i < total; ++i) {
419
43.9k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
43.9k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
43.9k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
43.9k
        }
426
427
4.40k
        if (LIKELY(read_count > 0)) {
428
4.40k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.40k
        }
430
431
4.40k
        *n = read_count;
432
4.40k
        return Status::OK();
433
4.40k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
40.2k
                          MutableColumnPtr& dst) override {
409
40.2k
        DCHECK(_parsed);
410
40.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
40.2k
        auto total = *n;
416
40.2k
        auto read_count = 0;
417
40.2k
        _buffer.resize(total);
418
2.31M
        for (size_t i = 0; i < total; ++i) {
419
2.27M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
2.27M
            if (UNLIKELY(ord >= _num_elements)) {
421
88
                break;
422
88
            }
423
424
2.27M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
2.27M
        }
426
427
40.2k
        if (LIKELY(read_count > 0)) {
428
40.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
40.2k
        }
430
431
40.2k
        *n = read_count;
432
40.2k
        return Status::OK();
433
40.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
6.05k
                          MutableColumnPtr& dst) override {
409
6.05k
        DCHECK(_parsed);
410
6.05k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
6.05k
        auto total = *n;
416
6.05k
        auto read_count = 0;
417
6.05k
        _buffer.resize(total);
418
14.4k
        for (size_t i = 0; i < total; ++i) {
419
8.37k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
8.37k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
8.37k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
8.37k
        }
426
427
6.05k
        if (LIKELY(read_count > 0)) {
428
6.05k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
6.05k
        }
430
431
6.05k
        *n = read_count;
432
6.05k
        return Status::OK();
433
6.05k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
26.9k
                          MutableColumnPtr& dst) override {
409
26.9k
        DCHECK(_parsed);
410
26.9k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
26.9k
        auto total = *n;
416
26.9k
        auto read_count = 0;
417
26.9k
        _buffer.resize(total);
418
514k
        for (size_t i = 0; i < total; ++i) {
419
487k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
487k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
487k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
487k
        }
426
427
26.9k
        if (LIKELY(read_count > 0)) {
428
26.9k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
26.9k
        }
430
431
26.9k
        *n = read_count;
432
26.9k
        return Status::OK();
433
26.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
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
1.23M
        for (size_t i = 0; i < total; ++i) {
419
1.21M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.21M
            if (UNLIKELY(ord >= _num_elements)) {
421
30
                break;
422
30
            }
423
424
1.21M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.21M
        }
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_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
17.2k
                          MutableColumnPtr& dst) override {
409
17.2k
        DCHECK(_parsed);
410
17.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
17.2k
        auto total = *n;
416
17.2k
        auto read_count = 0;
417
17.2k
        _buffer.resize(total);
418
6.28M
        for (size_t i = 0; i < total; ++i) {
419
6.27M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
6.27M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.52k
                break;
422
1.52k
            }
423
424
6.27M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
6.27M
        }
426
427
17.2k
        if (LIKELY(read_count > 0)) {
428
17.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
17.2k
        }
430
431
17.2k
        *n = read_count;
432
17.2k
        return Status::OK();
433
17.2k
    }
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.47k
                          MutableColumnPtr& dst) override {
409
1.47k
        DCHECK(_parsed);
410
1.47k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.47k
        auto total = *n;
416
1.47k
        auto read_count = 0;
417
1.47k
        _buffer.resize(total);
418
497k
        for (size_t i = 0; i < total; ++i) {
419
496k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
496k
            if (UNLIKELY(ord >= _num_elements)) {
421
14
                break;
422
14
            }
423
424
496k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
496k
        }
426
427
1.47k
        if (LIKELY(read_count > 0)) {
428
1.47k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.47k
        }
430
431
1.47k
        *n = read_count;
432
1.47k
        return Status::OK();
433
1.47k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
29.2k
                          MutableColumnPtr& dst) override {
409
29.2k
        DCHECK(_parsed);
410
29.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
29.2k
        auto total = *n;
416
29.2k
        auto read_count = 0;
417
29.2k
        _buffer.resize(total);
418
9.56M
        for (size_t i = 0; i < total; ++i) {
419
9.53M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.53M
            if (UNLIKELY(ord >= _num_elements)) {
421
420
                break;
422
420
            }
423
424
9.53M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.53M
        }
426
427
29.2k
        if (LIKELY(read_count > 0)) {
428
29.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
29.2k
        }
430
431
29.2k
        *n = read_count;
432
29.2k
        return Status::OK();
433
29.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
34.2k
                          MutableColumnPtr& dst) override {
409
34.2k
        DCHECK(_parsed);
410
34.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
34.2k
        auto total = *n;
416
34.2k
        auto read_count = 0;
417
34.2k
        _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
197
                break;
422
197
            }
423
424
10.0M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
10.0M
        }
426
427
34.3k
        if (LIKELY(read_count > 0)) {
428
34.3k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
34.3k
        }
430
431
34.2k
        *n = read_count;
432
34.2k
        return Status::OK();
433
34.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1.72k
                          MutableColumnPtr& dst) override {
409
1.72k
        DCHECK(_parsed);
410
1.72k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.72k
        auto total = *n;
416
1.72k
        auto read_count = 0;
417
1.72k
        _buffer.resize(total);
418
500k
        for (size_t i = 0; i < total; ++i) {
419
499k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
499k
            if (UNLIKELY(ord >= _num_elements)) {
421
247
                break;
422
247
            }
423
424
498k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
498k
        }
426
427
1.72k
        if (LIKELY(read_count > 0)) {
428
1.72k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.72k
        }
430
431
1.72k
        *n = read_count;
432
1.72k
        return Status::OK();
433
1.72k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
11.6k
                          MutableColumnPtr& dst) override {
409
11.6k
        DCHECK(_parsed);
410
11.6k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
11.6k
        auto total = *n;
416
11.6k
        auto read_count = 0;
417
11.6k
        _buffer.resize(total);
418
24.7k
        for (size_t i = 0; i < total; ++i) {
419
13.1k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
13.1k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
13.1k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
13.1k
        }
426
427
11.6k
        if (LIKELY(read_count > 0)) {
428
11.6k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
11.6k
        }
430
431
11.6k
        *n = read_count;
432
11.6k
        return Status::OK();
433
11.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
190
                          MutableColumnPtr& dst) override {
409
190
        DCHECK(_parsed);
410
190
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
190
        auto total = *n;
416
190
        auto read_count = 0;
417
190
        _buffer.resize(total);
418
385
        for (size_t i = 0; i < total; ++i) {
419
195
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
195
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
195
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
195
        }
426
427
190
        if (LIKELY(read_count > 0)) {
428
190
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
190
        }
430
431
190
        *n = read_count;
432
190
        return Status::OK();
433
190
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4.74k
                          MutableColumnPtr& dst) override {
409
4.74k
        DCHECK(_parsed);
410
4.74k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.74k
        auto total = *n;
416
4.74k
        auto read_count = 0;
417
4.74k
        _buffer.resize(total);
418
18.8k
        for (size_t i = 0; i < total; ++i) {
419
14.1k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.1k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
14.1k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.1k
        }
426
427
4.74k
        if (LIKELY(read_count > 0)) {
428
4.74k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.74k
        }
430
431
4.74k
        *n = read_count;
432
4.74k
        return Status::OK();
433
4.74k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
26.8k
                          MutableColumnPtr& dst) override {
409
26.8k
        DCHECK(_parsed);
410
26.8k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
26.8k
        auto total = *n;
416
26.8k
        auto read_count = 0;
417
26.8k
        _buffer.resize(total);
418
21.3M
        for (size_t i = 0; i < total; ++i) {
419
21.3M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
21.3M
            if (UNLIKELY(ord >= _num_elements)) {
421
5.25k
                break;
422
5.25k
            }
423
424
21.3M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
21.3M
        }
426
427
26.8k
        if (LIKELY(read_count > 0)) {
428
26.8k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
26.8k
        }
430
431
26.8k
        *n = read_count;
432
26.8k
        return Status::OK();
433
26.8k
    }
_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.07M
        for (size_t i = 0; i < total; ++i) {
419
9.06M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.06M
            if (UNLIKELY(ord >= _num_elements)) {
421
722
                break;
422
722
            }
423
424
9.06M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.06M
        }
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
446
                          MutableColumnPtr& dst) override {
409
446
        DCHECK(_parsed);
410
446
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
446
        auto total = *n;
416
446
        auto read_count = 0;
417
446
        _buffer.resize(total);
418
1.14k
        for (size_t i = 0; i < total; ++i) {
419
703
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
703
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
703
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
703
        }
426
427
446
        if (LIKELY(read_count > 0)) {
428
446
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
446
        }
430
431
446
        *n = read_count;
432
446
        return Status::OK();
433
446
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
353
                          MutableColumnPtr& dst) override {
409
353
        DCHECK(_parsed);
410
353
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
353
        auto total = *n;
416
353
        auto read_count = 0;
417
353
        _buffer.resize(total);
418
1.22k
        for (size_t i = 0; i < total; ++i) {
419
868
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
868
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
868
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
868
        }
426
427
354
        if (LIKELY(read_count > 0)) {
428
354
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
354
        }
430
431
353
        *n = read_count;
432
353
        return Status::OK();
433
353
    }
434
435
250k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
250k
        return next_batch<false>(n, dst);
437
250k
    }
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
250k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
250k
        return next_batch<false>(n, dst);
437
250k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
438
439
4
    size_t count() const override { return _num_elements; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
439
4
    size_t count() const override { return _num_elements; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE5countEv
440
441
1.91M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
700k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
441
445
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
441
260
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
4.68k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
441
285
    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
222k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
198k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
441
207k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
441
224k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
441
38.3k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
441
196k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Line
Count
Source
441
999
    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
2.61k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
441
117k
    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
42
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
Line
Count
Source
441
98
    size_t current_index() const override { return _cur_index; }
442
443
77.4M
    char* get_data(size_t index) const {
444
77.4M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
77.4M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
13.9M
    char* get_data(size_t index) const {
444
13.9M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
13.9M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
1.06M
    char* get_data(size_t index) const {
444
1.06M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.06M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
443
61.0k
    char* get_data(size_t index) const {
444
61.0k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
61.0k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
443
2.35M
    char* get_data(size_t index) const {
444
2.35M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
2.35M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
24.7k
    char* get_data(size_t index) const {
444
24.7k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
24.7k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
911k
    char* get_data(size_t index) const {
444
911k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
911k
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
1.23M
    char* get_data(size_t index) const {
444
1.23M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.23M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
6.29M
    char* get_data(size_t index) const {
444
6.29M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
6.29M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
507k
    char* get_data(size_t index) const {
444
507k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
507k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
9.93M
    char* get_data(size_t index) const {
444
9.93M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.93M
    }
_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
500k
    char* get_data(size_t index) const {
444
500k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
500k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
443
20.6k
    char* get_data(size_t index) const {
444
20.6k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20.6k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
443
1.58k
    char* get_data(size_t index) const {
444
1.58k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.58k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
443
23.9k
    char* get_data(size_t index) const {
444
23.9k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
23.9k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
443
21.3M
    char* get_data(size_t index) const {
444
21.3M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
21.3M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
9.08M
    char* get_data(size_t index) const {
444
9.08M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.08M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
443
5.05k
    char* get_data(size_t index) const {
444
5.05k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
5.05k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Line
Count
Source
443
9.00k
    char* get_data(size_t index) const {
444
9.00k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.00k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
Line
Count
Source
443
6.69k
    char* get_data(size_t index) const {
444
6.69k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
6.69k
    }
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