Coverage Report

Created: 2026-06-02 08:03

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
678k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
343k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
39.6k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
9.67k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
58.3k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
12.0k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
95
65.4k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
95
11.6k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
95
14.1k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
201
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
36.0k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
95
41.3k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
283
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
95
7.01k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
195
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
95
9.48k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
95
11.7k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
95
15.8k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
95
1.15k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
95
791
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
95
702
    Status init() override { return reset(); }
96
97
130M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
129M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
46.4k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
12.4k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
172k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
11.9k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
65.7k
    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
11.4k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
97
16.1k
    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
217
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
77.2k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
78.5k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
97
337
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
Line
Count
Source
97
7.03k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
97
98
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
97
5.01k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
22.7k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
97
21.9k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Line
Count
Source
97
1.37k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Line
Count
Source
97
25.7k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
97
5.63k
    bool is_page_full() override { return _remain_element_capacity == 0; }
98
99
1.20M
    Status add(const uint8_t* vals, size_t* count) override {
100
1.20M
        return add_internal<false>(vals, count);
101
1.20M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
99
619k
    Status add(const uint8_t* vals, size_t* count) override {
100
619k
        return add_internal<false>(vals, count);
101
619k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
46.4k
    Status add(const uint8_t* vals, size_t* count) override {
100
46.4k
        return add_internal<false>(vals, count);
101
46.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
12.4k
    Status add(const uint8_t* vals, size_t* count) override {
100
12.4k
        return add_internal<false>(vals, count);
101
12.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
172k
    Status add(const uint8_t* vals, size_t* count) override {
100
172k
        return add_internal<false>(vals, count);
101
172k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
11.9k
    Status add(const uint8_t* vals, size_t* count) override {
100
11.9k
        return add_internal<false>(vals, count);
101
11.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
65.7k
    Status add(const uint8_t* vals, size_t* count) override {
100
65.7k
        return add_internal<false>(vals, count);
101
65.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
99
11.4k
    Status add(const uint8_t* vals, size_t* count) override {
100
11.4k
        return add_internal<false>(vals, count);
101
11.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
99
16.1k
    Status add(const uint8_t* vals, size_t* count) override {
100
16.1k
        return add_internal<false>(vals, count);
101
16.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
217
    Status add(const uint8_t* vals, size_t* count) override {
100
217
        return add_internal<false>(vals, count);
101
217
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
77.2k
    Status add(const uint8_t* vals, size_t* count) override {
100
77.2k
        return add_internal<false>(vals, count);
101
77.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
78.5k
    Status add(const uint8_t* vals, size_t* count) override {
100
78.5k
        return add_internal<false>(vals, count);
101
78.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
99
337
    Status add(const uint8_t* vals, size_t* count) override {
100
337
        return add_internal<false>(vals, count);
101
337
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
Line
Count
Source
99
7.03k
    Status add(const uint8_t* vals, size_t* count) override {
100
7.03k
        return add_internal<false>(vals, count);
101
7.03k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
98
    Status add(const uint8_t* vals, size_t* count) override {
100
98
        return add_internal<false>(vals, count);
101
98
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
99
5.01k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.01k
        return add_internal<false>(vals, count);
101
5.01k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
22.7k
    Status add(const uint8_t* vals, size_t* count) override {
100
22.7k
        return add_internal<false>(vals, count);
101
22.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
99
21.9k
    Status add(const uint8_t* vals, size_t* count) override {
100
21.9k
        return add_internal<false>(vals, count);
101
21.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Line
Count
Source
99
1.37k
    Status add(const uint8_t* vals, size_t* count) override {
100
1.37k
        return add_internal<false>(vals, count);
101
1.37k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Line
Count
Source
99
25.7k
    Status add(const uint8_t* vals, size_t* count) override {
100
25.7k
        return add_internal<false>(vals, count);
101
25.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
99
5.63k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.63k
        return add_internal<false>(vals, count);
101
5.63k
    }
102
103
129M
    Status single_add(const uint8_t* vals, size_t* count) {
104
129M
        return add_internal<true>(vals, count);
105
129M
    }
106
107
    template <bool single>
108
131M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
131M
        DCHECK(!_finished);
110
131M
        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
131M
        uint32_t to_add = cast_set<UInt32>(
126
131M
                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
131M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
131M
        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
131M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
129M
        _count += to_add;
134
129M
        _remain_element_capacity -= to_add;
135
129M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
129M
        *num_written = to_add;
138
129M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
128M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
128M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
128M
                        *reinterpret_cast<const uint32_t*>(vals);
149
128M
                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
128M
        }
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
129M
        return Status::OK();
159
131M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
619k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
619k
        DCHECK(!_finished);
110
619k
        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
619k
        uint32_t to_add = cast_set<UInt32>(
126
619k
                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
619k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
619k
        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
619k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
619k
        _count += to_add;
134
619k
        _remain_element_capacity -= to_add;
135
619k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
619k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
619k
        memcpy(&_data[orig_size], vals, to_add_size);
158
619k
        return Status::OK();
159
619k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
129M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
129M
        DCHECK(!_finished);
110
129M
        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
129M
        uint32_t to_add = cast_set<UInt32>(
126
129M
                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
129M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
129M
        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
129M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
128M
        _count += to_add;
134
128M
        _remain_element_capacity -= to_add;
135
128M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
128M
        *num_written = to_add;
138
128M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
128M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
128M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
128M
                        *reinterpret_cast<const uint32_t*>(vals);
149
128M
                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
128M
        }
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
128M
        return Status::OK();
159
129M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
46.4k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
46.4k
        DCHECK(!_finished);
110
46.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
46.4k
        uint32_t to_add = cast_set<UInt32>(
126
46.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
46.4k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
46.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
46.4k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
46.4k
        _count += to_add;
134
46.4k
        _remain_element_capacity -= to_add;
135
46.4k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
46.4k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
46.4k
        memcpy(&_data[orig_size], vals, to_add_size);
158
46.4k
        return Status::OK();
159
46.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
12.4k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
12.4k
        DCHECK(!_finished);
110
12.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
12.4k
        uint32_t to_add = cast_set<UInt32>(
126
12.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
12.4k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
12.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
12.4k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
12.4k
        _count += to_add;
134
12.4k
        _remain_element_capacity -= to_add;
135
12.4k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
12.4k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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.4k
        memcpy(&_data[orig_size], vals, to_add_size);
158
12.4k
        return Status::OK();
159
12.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
172k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
172k
        DCHECK(!_finished);
110
172k
        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
172k
        uint32_t to_add = cast_set<UInt32>(
126
172k
                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
172k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
172k
        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
172k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
172k
        _count += to_add;
134
172k
        _remain_element_capacity -= to_add;
135
172k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
172k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
172k
        memcpy(&_data[orig_size], vals, to_add_size);
158
172k
        return Status::OK();
159
172k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
11.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
11.9k
        DCHECK(!_finished);
110
11.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
11.9k
        uint32_t to_add = cast_set<UInt32>(
126
11.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
11.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
11.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
11.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
11.9k
        _count += to_add;
134
11.9k
        _remain_element_capacity -= to_add;
135
11.9k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
11.9k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
11.9k
        memcpy(&_data[orig_size], vals, to_add_size);
158
11.9k
        return Status::OK();
159
11.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
65.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
65.7k
        DCHECK(!_finished);
110
65.7k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
65.7k
        uint32_t to_add = cast_set<UInt32>(
126
65.7k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
65.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
65.7k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
65.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
65.7k
        _count += to_add;
134
65.7k
        _remain_element_capacity -= to_add;
135
65.7k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
65.7k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
65.7k
        memcpy(&_data[orig_size], vals, to_add_size);
158
65.7k
        return Status::OK();
159
65.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
11.4k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
11.4k
        DCHECK(!_finished);
110
11.4k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
11.4k
        uint32_t to_add = cast_set<UInt32>(
126
11.4k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
11.4k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
11.4k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
11.4k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
11.4k
        _count += to_add;
134
11.4k
        _remain_element_capacity -= to_add;
135
11.4k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
11.4k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
11.4k
        memcpy(&_data[orig_size], vals, to_add_size);
158
11.4k
        return Status::OK();
159
11.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
16.1k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
16.1k
        DCHECK(!_finished);
110
16.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
16.1k
        uint32_t to_add = cast_set<UInt32>(
126
16.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
16.1k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
16.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
16.1k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
16.1k
        _count += to_add;
134
16.1k
        _remain_element_capacity -= to_add;
135
16.1k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
16.1k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
16.1k
        memcpy(&_data[orig_size], vals, to_add_size);
158
16.1k
        return Status::OK();
159
16.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
217
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
217
        DCHECK(!_finished);
110
217
        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
217
        uint32_t to_add = cast_set<UInt32>(
126
217
                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
217
        int to_add_size = to_add * SIZE_OF_TYPE;
129
217
        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
217
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
217
        _count += to_add;
134
217
        _remain_element_capacity -= to_add;
135
217
        _raw_data_size += to_add_size;
136
        // return added number through count
137
217
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
217
        memcpy(&_data[orig_size], vals, to_add_size);
158
217
        return Status::OK();
159
217
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
77.2k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
77.2k
        DCHECK(!_finished);
110
77.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
77.2k
        uint32_t to_add = cast_set<UInt32>(
126
77.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
77.2k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
77.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
77.2k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
77.2k
        _count += to_add;
134
77.2k
        _remain_element_capacity -= to_add;
135
77.2k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
77.2k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
77.2k
        memcpy(&_data[orig_size], vals, to_add_size);
158
77.2k
        return Status::OK();
159
77.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
78.5k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
78.5k
        DCHECK(!_finished);
110
78.5k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
78.5k
        uint32_t to_add = cast_set<UInt32>(
126
78.5k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
78.5k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
78.5k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
78.5k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
78.5k
        _count += to_add;
134
78.5k
        _remain_element_capacity -= to_add;
135
78.5k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
78.5k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
78.5k
        memcpy(&_data[orig_size], vals, to_add_size);
158
78.5k
        return Status::OK();
159
78.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
337
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
337
        DCHECK(!_finished);
110
337
        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
337
        uint32_t to_add = cast_set<UInt32>(
126
337
                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
337
        int to_add_size = to_add * SIZE_OF_TYPE;
129
337
        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
337
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
337
        _count += to_add;
134
337
        _remain_element_capacity -= to_add;
135
337
        _raw_data_size += to_add_size;
136
        // return added number through count
137
337
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
337
        memcpy(&_data[orig_size], vals, to_add_size);
158
337
        return Status::OK();
159
337
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
7.03k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
7.03k
        DCHECK(!_finished);
110
7.03k
        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.03k
        uint32_t to_add = cast_set<UInt32>(
126
7.03k
                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.03k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
7.03k
        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.03k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
7.03k
        _count += to_add;
134
7.03k
        _remain_element_capacity -= to_add;
135
7.03k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
7.03k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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.03k
        memcpy(&_data[orig_size], vals, to_add_size);
158
7.03k
        return Status::OK();
159
7.03k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
98
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
98
        DCHECK(!_finished);
110
98
        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
98
        uint32_t to_add = cast_set<UInt32>(
126
98
                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
98
        int to_add_size = to_add * SIZE_OF_TYPE;
129
98
        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
98
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
98
        _count += to_add;
134
98
        _remain_element_capacity -= to_add;
135
98
        _raw_data_size += to_add_size;
136
        // return added number through count
137
98
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
98
        memcpy(&_data[orig_size], vals, to_add_size);
158
98
        return Status::OK();
159
98
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
5.01k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.01k
        DCHECK(!_finished);
110
5.01k
        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.01k
        uint32_t to_add = cast_set<UInt32>(
126
5.01k
                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.01k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.01k
        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.01k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.01k
        _count += to_add;
134
5.01k
        _remain_element_capacity -= to_add;
135
5.01k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.01k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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.01k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.01k
        return Status::OK();
159
5.01k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
22.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
22.7k
        DCHECK(!_finished);
110
22.7k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
22.7k
        uint32_t to_add = cast_set<UInt32>(
126
22.7k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
22.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
22.7k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
22.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
22.7k
        _count += to_add;
134
22.7k
        _remain_element_capacity -= to_add;
135
22.7k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
22.7k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
22.7k
        memcpy(&_data[orig_size], vals, to_add_size);
158
22.7k
        return Status::OK();
159
22.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
21.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
21.9k
        DCHECK(!_finished);
110
21.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
21.9k
        uint32_t to_add = cast_set<UInt32>(
126
21.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
21.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
21.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
21.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
21.9k
        _count += to_add;
134
21.9k
        _remain_element_capacity -= to_add;
135
21.9k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
21.9k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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
21.9k
        memcpy(&_data[orig_size], vals, to_add_size);
158
21.9k
        return Status::OK();
159
21.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
1.37k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
1.37k
        DCHECK(!_finished);
110
1.37k
        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.37k
        uint32_t to_add = cast_set<UInt32>(
126
1.37k
                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.37k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
1.37k
        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.37k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
1.37k
        _count += to_add;
134
1.37k
        _remain_element_capacity -= to_add;
135
1.37k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
1.37k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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.37k
        memcpy(&_data[orig_size], vals, to_add_size);
158
1.37k
        return Status::OK();
159
1.37k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
25.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
25.7k
        DCHECK(!_finished);
110
25.7k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
25.7k
        uint32_t to_add = cast_set<UInt32>(
126
25.7k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
25.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
25.7k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
25.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
25.7k
        _count += to_add;
134
25.7k
        _remain_element_capacity -= to_add;
135
25.7k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
25.7k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
25.7k
        memcpy(&_data[orig_size], vals, to_add_size);
158
25.7k
        return Status::OK();
159
25.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
5.63k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.63k
        DCHECK(!_finished);
110
5.63k
        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.63k
        uint32_t to_add = cast_set<UInt32>(
126
5.63k
                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.63k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.63k
        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.63k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.63k
        _count += to_add;
134
5.63k
        _remain_element_capacity -= to_add;
135
5.63k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.63k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_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.63k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.63k
        return Status::OK();
159
5.63k
    }
160
161
671k
    Status finish(OwnedSlice* slice) override {
162
671k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
671k
        return Status::OK();
164
671k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
329k
    Status finish(OwnedSlice* slice) override {
162
329k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
329k
        return Status::OK();
164
329k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
38.5k
    Status finish(OwnedSlice* slice) override {
162
38.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
38.5k
        return Status::OK();
164
38.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
9.18k
    Status finish(OwnedSlice* slice) override {
162
9.18k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
9.18k
        return Status::OK();
164
9.18k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
61.1k
    Status finish(OwnedSlice* slice) override {
162
61.1k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
61.1k
        return Status::OK();
164
61.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
11.9k
    Status finish(OwnedSlice* slice) override {
162
11.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
11.9k
        return Status::OK();
164
11.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
65.3k
    Status finish(OwnedSlice* slice) override {
162
65.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
65.3k
        return Status::OK();
164
65.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
10.8k
    Status finish(OwnedSlice* slice) override {
162
10.8k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
10.8k
        return Status::OK();
164
10.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
14.1k
    Status finish(OwnedSlice* slice) override {
162
14.1k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
14.1k
        return Status::OK();
164
14.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
215
    Status finish(OwnedSlice* slice) override {
162
215
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
217
        return Status::OK();
164
215
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
36.5k
    Status finish(OwnedSlice* slice) override {
162
36.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
36.5k
        return Status::OK();
164
36.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
40.3k
    Status finish(OwnedSlice* slice) override {
162
40.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
40.4k
        return Status::OK();
164
40.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
437
    Status finish(OwnedSlice* slice) override {
162
437
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
437
        return Status::OK();
164
437
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7.12k
    Status finish(OwnedSlice* slice) override {
162
7.12k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.13k
        return Status::OK();
164
7.12k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
106
    Status finish(OwnedSlice* slice) override {
162
106
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
106
        return Status::OK();
164
106
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
9.48k
    Status finish(OwnedSlice* slice) override {
162
9.48k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
9.48k
        return Status::OK();
164
9.48k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
18.0k
    Status finish(OwnedSlice* slice) override {
162
18.0k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
18.0k
        return Status::OK();
164
18.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
16.0k
    Status finish(OwnedSlice* slice) override {
162
16.0k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
16.0k
        return Status::OK();
164
16.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
1.06k
    Status finish(OwnedSlice* slice) override {
162
1.06k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
1.06k
        return Status::OK();
164
1.06k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
702
    Status finish(OwnedSlice* slice) override {
162
702
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
702
        return Status::OK();
164
702
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
619
    Status finish(OwnedSlice* slice) override {
162
619
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
619
        return Status::OK();
164
619
    }
165
166
1.63M
    Status reset() override {
167
1.63M
        RETURN_IF_CATCH_EXCEPTION({
168
1.63M
            size_t block_size = _options.data_page_size;
169
1.63M
            _count = 0;
170
1.63M
            _raw_data_size = 0;
171
1.63M
            _data.clear();
172
1.63M
            _data.reserve(block_size);
173
1.63M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.63M
                    << "buffer must be naturally-aligned";
175
1.63M
            _buffer.clear();
176
1.63M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.63M
            _finished = false;
178
1.63M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.63M
        });
180
1.63M
        return Status::OK();
181
1.63M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
166
954k
    Status reset() override {
167
954k
        RETURN_IF_CATCH_EXCEPTION({
168
954k
            size_t block_size = _options.data_page_size;
169
954k
            _count = 0;
170
954k
            _raw_data_size = 0;
171
954k
            _data.clear();
172
954k
            _data.reserve(block_size);
173
954k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
954k
                    << "buffer must be naturally-aligned";
175
954k
            _buffer.clear();
176
954k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
954k
            _finished = false;
178
954k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
954k
        });
180
956k
        return Status::OK();
181
954k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
78.1k
    Status reset() override {
167
78.1k
        RETURN_IF_CATCH_EXCEPTION({
168
78.1k
            size_t block_size = _options.data_page_size;
169
78.1k
            _count = 0;
170
78.1k
            _raw_data_size = 0;
171
78.1k
            _data.clear();
172
78.1k
            _data.reserve(block_size);
173
78.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
78.1k
                    << "buffer must be naturally-aligned";
175
78.1k
            _buffer.clear();
176
78.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
78.1k
            _finished = false;
178
78.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
78.1k
        });
180
78.2k
        return Status::OK();
181
78.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
166
18.8k
    Status reset() override {
167
18.8k
        RETURN_IF_CATCH_EXCEPTION({
168
18.8k
            size_t block_size = _options.data_page_size;
169
18.8k
            _count = 0;
170
18.8k
            _raw_data_size = 0;
171
18.8k
            _data.clear();
172
18.8k
            _data.reserve(block_size);
173
18.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
18.8k
                    << "buffer must be naturally-aligned";
175
18.8k
            _buffer.clear();
176
18.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
18.8k
            _finished = false;
178
18.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
18.8k
        });
180
18.8k
        return Status::OK();
181
18.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
119k
    Status reset() override {
167
119k
        RETURN_IF_CATCH_EXCEPTION({
168
119k
            size_t block_size = _options.data_page_size;
169
119k
            _count = 0;
170
119k
            _raw_data_size = 0;
171
119k
            _data.clear();
172
119k
            _data.reserve(block_size);
173
119k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
119k
                    << "buffer must be naturally-aligned";
175
119k
            _buffer.clear();
176
119k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
119k
            _finished = false;
178
119k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
119k
        });
180
119k
        return Status::OK();
181
119k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
166
23.9k
    Status reset() override {
167
23.9k
        RETURN_IF_CATCH_EXCEPTION({
168
23.9k
            size_t block_size = _options.data_page_size;
169
23.9k
            _count = 0;
170
23.9k
            _raw_data_size = 0;
171
23.9k
            _data.clear();
172
23.9k
            _data.reserve(block_size);
173
23.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
23.9k
                    << "buffer must be naturally-aligned";
175
23.9k
            _buffer.clear();
176
23.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
23.9k
            _finished = false;
178
23.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
23.9k
        });
180
24.0k
        return Status::OK();
181
23.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
166
130k
    Status reset() override {
167
130k
        RETURN_IF_CATCH_EXCEPTION({
168
130k
            size_t block_size = _options.data_page_size;
169
130k
            _count = 0;
170
130k
            _raw_data_size = 0;
171
130k
            _data.clear();
172
130k
            _data.reserve(block_size);
173
130k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
130k
                    << "buffer must be naturally-aligned";
175
130k
            _buffer.clear();
176
130k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
130k
            _finished = false;
178
130k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
130k
        });
180
130k
        return Status::OK();
181
130k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
166
22.5k
    Status reset() override {
167
22.5k
        RETURN_IF_CATCH_EXCEPTION({
168
22.5k
            size_t block_size = _options.data_page_size;
169
22.5k
            _count = 0;
170
22.5k
            _raw_data_size = 0;
171
22.5k
            _data.clear();
172
22.5k
            _data.reserve(block_size);
173
22.5k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
22.5k
                    << "buffer must be naturally-aligned";
175
22.5k
            _buffer.clear();
176
22.5k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
22.5k
            _finished = false;
178
22.5k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
22.5k
        });
180
22.5k
        return Status::OK();
181
22.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
166
28.3k
    Status reset() override {
167
28.3k
        RETURN_IF_CATCH_EXCEPTION({
168
28.3k
            size_t block_size = _options.data_page_size;
169
28.3k
            _count = 0;
170
28.3k
            _raw_data_size = 0;
171
28.3k
            _data.clear();
172
28.3k
            _data.reserve(block_size);
173
28.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
28.3k
                    << "buffer must be naturally-aligned";
175
28.3k
            _buffer.clear();
176
28.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
28.3k
            _finished = false;
178
28.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
28.3k
        });
180
28.3k
        return Status::OK();
181
28.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
166
418
    Status reset() override {
167
418
        RETURN_IF_CATCH_EXCEPTION({
168
418
            size_t block_size = _options.data_page_size;
169
418
            _count = 0;
170
418
            _raw_data_size = 0;
171
418
            _data.clear();
172
418
            _data.reserve(block_size);
173
418
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
418
                    << "buffer must be naturally-aligned";
175
418
            _buffer.clear();
176
418
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
418
            _finished = false;
178
418
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
418
        });
180
422
        return Status::OK();
181
418
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
166
72.6k
    Status reset() override {
167
72.6k
        RETURN_IF_CATCH_EXCEPTION({
168
72.6k
            size_t block_size = _options.data_page_size;
169
72.6k
            _count = 0;
170
72.6k
            _raw_data_size = 0;
171
72.6k
            _data.clear();
172
72.6k
            _data.reserve(block_size);
173
72.6k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
72.6k
                    << "buffer must be naturally-aligned";
175
72.6k
            _buffer.clear();
176
72.6k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
72.6k
            _finished = false;
178
72.6k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
72.6k
        });
180
72.7k
        return Status::OK();
181
72.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
166
81.7k
    Status reset() override {
167
81.7k
        RETURN_IF_CATCH_EXCEPTION({
168
81.7k
            size_t block_size = _options.data_page_size;
169
81.7k
            _count = 0;
170
81.7k
            _raw_data_size = 0;
171
81.7k
            _data.clear();
172
81.7k
            _data.reserve(block_size);
173
81.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
81.7k
                    << "buffer must be naturally-aligned";
175
81.7k
            _buffer.clear();
176
81.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
81.7k
            _finished = false;
178
81.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
81.7k
        });
180
81.8k
        return Status::OK();
181
81.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
166
720
    Status reset() override {
167
720
        RETURN_IF_CATCH_EXCEPTION({
168
720
            size_t block_size = _options.data_page_size;
169
720
            _count = 0;
170
720
            _raw_data_size = 0;
171
720
            _data.clear();
172
720
            _data.reserve(block_size);
173
720
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
720
                    << "buffer must be naturally-aligned";
175
720
            _buffer.clear();
176
720
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
720
            _finished = false;
178
720
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
720
        });
180
720
        return Status::OK();
181
720
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
Line
Count
Source
166
14.0k
    Status reset() override {
167
14.0k
        RETURN_IF_CATCH_EXCEPTION({
168
14.0k
            size_t block_size = _options.data_page_size;
169
14.0k
            _count = 0;
170
14.0k
            _raw_data_size = 0;
171
14.0k
            _data.clear();
172
14.0k
            _data.reserve(block_size);
173
14.0k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
14.0k
                    << "buffer must be naturally-aligned";
175
14.0k
            _buffer.clear();
176
14.0k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
14.0k
            _finished = false;
178
14.0k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
14.0k
        });
180
14.2k
        return Status::OK();
181
14.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
166
301
    Status reset() override {
167
301
        RETURN_IF_CATCH_EXCEPTION({
168
301
            size_t block_size = _options.data_page_size;
169
301
            _count = 0;
170
301
            _raw_data_size = 0;
171
301
            _data.clear();
172
301
            _data.reserve(block_size);
173
301
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
301
                    << "buffer must be naturally-aligned";
175
301
            _buffer.clear();
176
301
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
301
            _finished = false;
178
301
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
301
        });
180
301
        return Status::OK();
181
301
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
166
18.9k
    Status reset() override {
167
18.9k
        RETURN_IF_CATCH_EXCEPTION({
168
18.9k
            size_t block_size = _options.data_page_size;
169
18.9k
            _count = 0;
170
18.9k
            _raw_data_size = 0;
171
18.9k
            _data.clear();
172
18.9k
            _data.reserve(block_size);
173
18.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
18.9k
                    << "buffer must be naturally-aligned";
175
18.9k
            _buffer.clear();
176
18.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
18.9k
            _finished = false;
178
18.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
18.9k
        });
180
18.9k
        return Status::OK();
181
18.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
29.7k
    Status reset() override {
167
29.7k
        RETURN_IF_CATCH_EXCEPTION({
168
29.7k
            size_t block_size = _options.data_page_size;
169
29.7k
            _count = 0;
170
29.7k
            _raw_data_size = 0;
171
29.7k
            _data.clear();
172
29.7k
            _data.reserve(block_size);
173
29.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
29.7k
                    << "buffer must be naturally-aligned";
175
29.7k
            _buffer.clear();
176
29.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
29.7k
            _finished = false;
178
29.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
29.7k
        });
180
29.8k
        return Status::OK();
181
29.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
166
31.8k
    Status reset() override {
167
31.8k
        RETURN_IF_CATCH_EXCEPTION({
168
31.8k
            size_t block_size = _options.data_page_size;
169
31.8k
            _count = 0;
170
31.8k
            _raw_data_size = 0;
171
31.8k
            _data.clear();
172
31.8k
            _data.reserve(block_size);
173
31.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
31.8k
                    << "buffer must be naturally-aligned";
175
31.8k
            _buffer.clear();
176
31.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
31.8k
            _finished = false;
178
31.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
31.8k
        });
180
31.8k
        return Status::OK();
181
31.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Line
Count
Source
166
2.21k
    Status reset() override {
167
2.21k
        RETURN_IF_CATCH_EXCEPTION({
168
2.21k
            size_t block_size = _options.data_page_size;
169
2.21k
            _count = 0;
170
2.21k
            _raw_data_size = 0;
171
2.21k
            _data.clear();
172
2.21k
            _data.reserve(block_size);
173
2.21k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
2.21k
                    << "buffer must be naturally-aligned";
175
2.21k
            _buffer.clear();
176
2.21k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
2.21k
            _finished = false;
178
2.21k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
2.21k
        });
180
2.22k
        return Status::OK();
181
2.21k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Line
Count
Source
166
1.49k
    Status reset() override {
167
1.49k
        RETURN_IF_CATCH_EXCEPTION({
168
1.49k
            size_t block_size = _options.data_page_size;
169
1.49k
            _count = 0;
170
1.49k
            _raw_data_size = 0;
171
1.49k
            _data.clear();
172
1.49k
            _data.reserve(block_size);
173
1.49k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.49k
                    << "buffer must be naturally-aligned";
175
1.49k
            _buffer.clear();
176
1.49k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.49k
            _finished = false;
178
1.49k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.49k
        });
180
1.49k
        return Status::OK();
181
1.49k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
166
1.32k
    Status reset() override {
167
1.32k
        RETURN_IF_CATCH_EXCEPTION({
168
1.32k
            size_t block_size = _options.data_page_size;
169
1.32k
            _count = 0;
170
1.32k
            _raw_data_size = 0;
171
1.32k
            _data.clear();
172
1.32k
            _data.reserve(block_size);
173
1.32k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.32k
                    << "buffer must be naturally-aligned";
175
1.32k
            _buffer.clear();
176
1.32k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.32k
            _finished = false;
178
1.32k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.32k
        });
180
1.32k
        return Status::OK();
181
1.32k
    }
182
183
3
    size_t count() const override { return _count; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
183
3
    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
30.9k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
16.3k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
185
2.29k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
185
897
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
2.67k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
1.27k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
748
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
682
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
185
765
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4sizeEv
Line
Count
Source
185
6
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4sizeEv
Line
Count
Source
185
1.55k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
2.11k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4sizeEv
Line
Count
Source
185
13
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4sizeEv
Line
Count
Source
185
6
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4sizeEv
Line
Count
Source
185
2
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4sizeEv
Line
Count
Source
185
126
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
185
291
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
185
1.14k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4sizeEv
Line
Count
Source
185
4
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4sizeEv
Line
Count
Source
185
26
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4sizeEv
Line
Count
Source
185
10
    uint64_t size() const override { return _buffer.size(); }
186
187
403k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
61.7k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
38.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
9.18k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
61.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
187
11.9k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
65.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
10.8k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
14.1k
    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
215
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
187
36.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
187
40.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
187
437
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
Line
Count
Source
187
7.12k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
187
106
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
187
9.48k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
18.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
187
16.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE17get_raw_data_sizeEv
Line
Count
Source
187
1.06k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Line
Count
Source
187
702
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
187
619
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
678k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
342k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
39.6k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.67k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
58.3k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
12.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
65.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
11.6k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
14.1k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
201
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
36.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
41.3k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
283
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
6.98k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
195
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.48k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
11.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
15.8k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1.15k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
790
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
703
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
192
193
671k
    OwnedSlice _finish(int final_size_of_type) {
194
671k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
671k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
671k
        int padding_elems = num_elems_after_padding - _count;
199
671k
        int padding_bytes = padding_elems * final_size_of_type;
200
18.9M
        for (int i = 0; i < padding_bytes; i++) {
201
18.2M
            _data.push_back(0);
202
18.2M
        }
203
204
        // reserve enough place for compression
205
671k
        _buffer.resize(
206
671k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
671k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
671k
        int64_t bytes =
210
671k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
671k
                                         num_elems_after_padding, final_size_of_type, 0);
212
671k
        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
671k
        encode_fixed32_le(&_buffer[0], _count);
222
671k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
671k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
671k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
671k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
671k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
671k
        return _buffer.build();
229
671k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
329k
    OwnedSlice _finish(int final_size_of_type) {
194
329k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
329k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
329k
        int padding_elems = num_elems_after_padding - _count;
199
329k
        int padding_bytes = padding_elems * final_size_of_type;
200
6.36M
        for (int i = 0; i < padding_bytes; i++) {
201
6.03M
            _data.push_back(0);
202
6.03M
        }
203
204
        // reserve enough place for compression
205
329k
        _buffer.resize(
206
329k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
329k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
329k
        int64_t bytes =
210
329k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
329k
                                         num_elems_after_padding, final_size_of_type, 0);
212
329k
        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
329k
        encode_fixed32_le(&_buffer[0], _count);
222
329k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
329k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
329k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
329k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
329k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
329k
        return _buffer.build();
229
329k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
38.5k
    OwnedSlice _finish(int final_size_of_type) {
194
38.5k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
38.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
38.5k
        int padding_elems = num_elems_after_padding - _count;
199
38.5k
        int padding_bytes = padding_elems * final_size_of_type;
200
238k
        for (int i = 0; i < padding_bytes; i++) {
201
200k
            _data.push_back(0);
202
200k
        }
203
204
        // reserve enough place for compression
205
38.5k
        _buffer.resize(
206
38.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
38.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
38.5k
        int64_t bytes =
210
38.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
38.5k
                                         num_elems_after_padding, final_size_of_type, 0);
212
38.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
38.5k
        encode_fixed32_le(&_buffer[0], _count);
222
38.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
38.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
38.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
38.5k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
38.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
38.5k
        return _buffer.build();
229
38.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
9.18k
    OwnedSlice _finish(int final_size_of_type) {
194
9.18k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
9.18k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
9.18k
        int padding_elems = num_elems_after_padding - _count;
199
9.18k
        int padding_bytes = padding_elems * final_size_of_type;
200
100k
        for (int i = 0; i < padding_bytes; i++) {
201
91.0k
            _data.push_back(0);
202
91.0k
        }
203
204
        // reserve enough place for compression
205
9.18k
        _buffer.resize(
206
9.18k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
9.18k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
9.18k
        int64_t bytes =
210
9.18k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
9.18k
                                         num_elems_after_padding, final_size_of_type, 0);
212
9.18k
        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.18k
        encode_fixed32_le(&_buffer[0], _count);
222
9.18k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
9.18k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
9.18k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
9.18k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
9.18k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
9.18k
        return _buffer.build();
229
9.18k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
61.1k
    OwnedSlice _finish(int final_size_of_type) {
194
61.1k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
61.1k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
61.1k
        int padding_elems = num_elems_after_padding - _count;
199
61.1k
        int padding_bytes = padding_elems * final_size_of_type;
200
2.64M
        for (int i = 0; i < padding_bytes; i++) {
201
2.58M
            _data.push_back(0);
202
2.58M
        }
203
204
        // reserve enough place for compression
205
61.1k
        _buffer.resize(
206
61.1k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
61.1k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
61.1k
        int64_t bytes =
210
61.1k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
61.1k
                                         num_elems_after_padding, final_size_of_type, 0);
212
61.1k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
61.1k
        encode_fixed32_le(&_buffer[0], _count);
222
61.1k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
61.1k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
61.1k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
61.1k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
61.1k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
61.1k
        return _buffer.build();
229
61.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
11.9k
    OwnedSlice _finish(int final_size_of_type) {
194
11.9k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
11.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
11.9k
        int padding_elems = num_elems_after_padding - _count;
199
11.9k
        int padding_bytes = padding_elems * final_size_of_type;
200
842k
        for (int i = 0; i < padding_bytes; i++) {
201
830k
            _data.push_back(0);
202
830k
        }
203
204
        // reserve enough place for compression
205
11.9k
        _buffer.resize(
206
11.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
11.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
11.9k
        int64_t bytes =
210
11.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
11.9k
                                         num_elems_after_padding, final_size_of_type, 0);
212
11.9k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
11.9k
        encode_fixed32_le(&_buffer[0], _count);
222
11.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
11.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
11.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
11.9k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
11.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
11.9k
        return _buffer.build();
229
11.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
65.3k
    OwnedSlice _finish(int final_size_of_type) {
194
65.3k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
65.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
65.3k
        int padding_elems = num_elems_after_padding - _count;
199
65.3k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.13M
        for (int i = 0; i < padding_bytes; i++) {
201
3.07M
            _data.push_back(0);
202
3.07M
        }
203
204
        // reserve enough place for compression
205
65.3k
        _buffer.resize(
206
65.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
65.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
65.3k
        int64_t bytes =
210
65.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
65.3k
                                         num_elems_after_padding, final_size_of_type, 0);
212
65.3k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
65.3k
        encode_fixed32_le(&_buffer[0], _count);
222
65.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
65.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
65.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
65.3k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
65.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
65.3k
        return _buffer.build();
229
65.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
10.8k
    OwnedSlice _finish(int final_size_of_type) {
194
10.8k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
10.8k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
10.8k
        int padding_elems = num_elems_after_padding - _count;
199
10.8k
        int padding_bytes = padding_elems * final_size_of_type;
200
238k
        for (int i = 0; i < padding_bytes; i++) {
201
227k
            _data.push_back(0);
202
227k
        }
203
204
        // reserve enough place for compression
205
10.8k
        _buffer.resize(
206
10.8k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
10.8k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
10.8k
        int64_t bytes =
210
10.8k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
10.8k
                                         num_elems_after_padding, final_size_of_type, 0);
212
10.8k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
10.8k
        encode_fixed32_le(&_buffer[0], _count);
222
10.8k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
10.8k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
10.8k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
10.8k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
10.8k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
10.8k
        return _buffer.build();
229
10.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
14.1k
    OwnedSlice _finish(int final_size_of_type) {
194
14.1k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
14.1k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
14.1k
        int padding_elems = num_elems_after_padding - _count;
199
14.1k
        int padding_bytes = padding_elems * final_size_of_type;
200
590k
        for (int i = 0; i < padding_bytes; i++) {
201
576k
            _data.push_back(0);
202
576k
        }
203
204
        // reserve enough place for compression
205
14.1k
        _buffer.resize(
206
14.1k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
14.1k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
14.1k
        int64_t bytes =
210
14.1k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
14.1k
                                         num_elems_after_padding, final_size_of_type, 0);
212
14.1k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
14.1k
        encode_fixed32_le(&_buffer[0], _count);
222
14.1k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
14.1k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
14.1k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
14.1k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
14.1k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
14.1k
        return _buffer.build();
229
14.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
215
    OwnedSlice _finish(int final_size_of_type) {
194
215
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
215
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
215
        int padding_elems = num_elems_after_padding - _count;
199
215
        int padding_bytes = padding_elems * final_size_of_type;
200
2.99k
        for (int i = 0; i < padding_bytes; i++) {
201
2.78k
            _data.push_back(0);
202
2.78k
        }
203
204
        // reserve enough place for compression
205
215
        _buffer.resize(
206
215
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
215
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
215
        int64_t bytes =
210
215
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
215
                                         num_elems_after_padding, final_size_of_type, 0);
212
215
        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
215
        encode_fixed32_le(&_buffer[0], _count);
222
215
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
215
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
215
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
215
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
215
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
215
        return _buffer.build();
229
215
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
193
36.5k
    OwnedSlice _finish(int final_size_of_type) {
194
36.5k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
36.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
36.5k
        int padding_elems = num_elems_after_padding - _count;
199
36.5k
        int padding_bytes = padding_elems * final_size_of_type;
200
785k
        for (int i = 0; i < padding_bytes; i++) {
201
749k
            _data.push_back(0);
202
749k
        }
203
204
        // reserve enough place for compression
205
36.5k
        _buffer.resize(
206
36.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
36.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
36.5k
        int64_t bytes =
210
36.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
36.5k
                                         num_elems_after_padding, final_size_of_type, 0);
212
36.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
36.5k
        encode_fixed32_le(&_buffer[0], _count);
222
36.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
36.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
36.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
36.5k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
36.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
36.5k
        return _buffer.build();
229
36.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
193
40.3k
    OwnedSlice _finish(int final_size_of_type) {
194
40.3k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
40.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
40.3k
        int padding_elems = num_elems_after_padding - _count;
199
40.3k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.70M
        for (int i = 0; i < padding_bytes; i++) {
201
1.66M
            _data.push_back(0);
202
1.66M
        }
203
204
        // reserve enough place for compression
205
40.3k
        _buffer.resize(
206
40.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
40.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
40.3k
        int64_t bytes =
210
40.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
40.3k
                                         num_elems_after_padding, final_size_of_type, 0);
212
40.3k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
40.3k
        encode_fixed32_le(&_buffer[0], _count);
222
40.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
40.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
40.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
40.3k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
40.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
40.3k
        return _buffer.build();
229
40.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
193
437
    OwnedSlice _finish(int final_size_of_type) {
194
437
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
437
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
437
        int padding_elems = num_elems_after_padding - _count;
199
437
        int padding_bytes = padding_elems * final_size_of_type;
200
6.98k
        for (int i = 0; i < padding_bytes; i++) {
201
6.54k
            _data.push_back(0);
202
6.54k
        }
203
204
        // reserve enough place for compression
205
437
        _buffer.resize(
206
437
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
437
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
437
        int64_t bytes =
210
437
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
437
                                         num_elems_after_padding, final_size_of_type, 0);
212
437
        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
437
        encode_fixed32_le(&_buffer[0], _count);
222
437
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
437
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
437
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
437
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
437
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
437
        return _buffer.build();
229
437
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
Line
Count
Source
193
7.12k
    OwnedSlice _finish(int final_size_of_type) {
194
7.12k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.12k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.12k
        int padding_elems = num_elems_after_padding - _count;
199
7.12k
        int padding_bytes = padding_elems * final_size_of_type;
200
373k
        for (int i = 0; i < padding_bytes; i++) {
201
366k
            _data.push_back(0);
202
366k
        }
203
204
        // reserve enough place for compression
205
7.12k
        _buffer.resize(
206
7.12k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.12k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.12k
        int64_t bytes =
210
7.12k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.12k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.12k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
7.12k
        encode_fixed32_le(&_buffer[0], _count);
222
7.12k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.12k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.12k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.12k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.12k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.12k
        return _buffer.build();
229
7.12k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
193
106
    OwnedSlice _finish(int final_size_of_type) {
194
106
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
106
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
106
        int padding_elems = num_elems_after_padding - _count;
199
106
        int padding_bytes = padding_elems * final_size_of_type;
200
6.57k
        for (int i = 0; i < padding_bytes; i++) {
201
6.46k
            _data.push_back(0);
202
6.46k
        }
203
204
        // reserve enough place for compression
205
106
        _buffer.resize(
206
106
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
106
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
106
        int64_t bytes =
210
106
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
106
                                         num_elems_after_padding, final_size_of_type, 0);
212
106
        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
106
        encode_fixed32_le(&_buffer[0], _count);
222
106
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
106
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
106
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
106
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
106
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
106
        return _buffer.build();
229
106
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
193
9.48k
    OwnedSlice _finish(int final_size_of_type) {
194
9.48k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
9.48k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
9.48k
        int padding_elems = num_elems_after_padding - _count;
199
9.48k
        int padding_bytes = padding_elems * final_size_of_type;
200
113k
        for (int i = 0; i < padding_bytes; i++) {
201
104k
            _data.push_back(0);
202
104k
        }
203
204
        // reserve enough place for compression
205
9.48k
        _buffer.resize(
206
9.48k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
9.48k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
9.48k
        int64_t bytes =
210
9.48k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
9.48k
                                         num_elems_after_padding, final_size_of_type, 0);
212
9.48k
        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.48k
        encode_fixed32_le(&_buffer[0], _count);
222
9.48k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
9.48k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
9.48k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
9.48k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
9.48k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
9.48k
        return _buffer.build();
229
9.48k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
18.0k
    OwnedSlice _finish(int final_size_of_type) {
194
18.0k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
18.0k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
18.0k
        int padding_elems = num_elems_after_padding - _count;
199
18.0k
        int padding_bytes = padding_elems * final_size_of_type;
200
475k
        for (int i = 0; i < padding_bytes; i++) {
201
457k
            _data.push_back(0);
202
457k
        }
203
204
        // reserve enough place for compression
205
18.0k
        _buffer.resize(
206
18.0k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
18.0k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
18.0k
        int64_t bytes =
210
18.0k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
18.0k
                                         num_elems_after_padding, final_size_of_type, 0);
212
18.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
18.0k
        encode_fixed32_le(&_buffer[0], _count);
222
18.0k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
18.0k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
18.0k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
18.0k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
18.0k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
18.0k
        return _buffer.build();
229
18.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
193
16.0k
    OwnedSlice _finish(int final_size_of_type) {
194
16.0k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
16.0k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
16.0k
        int padding_elems = num_elems_after_padding - _count;
199
16.0k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.08M
        for (int i = 0; i < padding_bytes; i++) {
201
1.07M
            _data.push_back(0);
202
1.07M
        }
203
204
        // reserve enough place for compression
205
16.0k
        _buffer.resize(
206
16.0k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
16.0k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
16.0k
        int64_t bytes =
210
16.0k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
16.0k
                                         num_elems_after_padding, final_size_of_type, 0);
212
16.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
16.0k
        encode_fixed32_le(&_buffer[0], _count);
222
16.0k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
16.0k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
16.0k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
16.0k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
16.0k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
16.0k
        return _buffer.build();
229
16.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE7_finishEi
Line
Count
Source
193
1.06k
    OwnedSlice _finish(int final_size_of_type) {
194
1.06k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
1.06k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
1.06k
        int padding_elems = num_elems_after_padding - _count;
199
1.06k
        int padding_bytes = padding_elems * final_size_of_type;
200
162k
        for (int i = 0; i < padding_bytes; i++) {
201
160k
            _data.push_back(0);
202
160k
        }
203
204
        // reserve enough place for compression
205
1.06k
        _buffer.resize(
206
1.06k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
1.06k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
1.06k
        int64_t bytes =
210
1.06k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
1.06k
                                         num_elems_after_padding, final_size_of_type, 0);
212
1.06k
        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.06k
        encode_fixed32_le(&_buffer[0], _count);
222
1.06k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
1.06k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
1.06k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
1.06k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
1.06k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
1.06k
        return _buffer.build();
229
1.06k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Line
Count
Source
193
702
    OwnedSlice _finish(int final_size_of_type) {
194
702
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
702
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
702
        int padding_elems = num_elems_after_padding - _count;
199
702
        int padding_bytes = padding_elems * final_size_of_type;
200
14.7k
        for (int i = 0; i < padding_bytes; i++) {
201
14.0k
            _data.push_back(0);
202
14.0k
        }
203
204
        // reserve enough place for compression
205
702
        _buffer.resize(
206
702
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
702
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
702
        int64_t bytes =
210
702
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
702
                                         num_elems_after_padding, final_size_of_type, 0);
212
702
        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
702
        encode_fixed32_le(&_buffer[0], _count);
222
702
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
702
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
702
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
702
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
702
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
702
        return _buffer.build();
229
702
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
193
619
    OwnedSlice _finish(int final_size_of_type) {
194
619
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
619
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
619
        int padding_elems = num_elems_after_padding - _count;
199
619
        int padding_bytes = padding_elems * final_size_of_type;
200
50.0k
        for (int i = 0; i < padding_bytes; i++) {
201
49.3k
            _data.push_back(0);
202
49.3k
        }
203
204
        // reserve enough place for compression
205
619
        _buffer.resize(
206
619
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
619
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
619
        int64_t bytes =
210
619
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
619
                                         num_elems_after_padding, final_size_of_type, 0);
212
619
        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
619
        encode_fixed32_le(&_buffer[0], _count);
222
619
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
619
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
619
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
619
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
619
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
619
        return _buffer.build();
229
619
    }
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.14M
                                       int& size_of_element) {
253
2.14M
    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.14M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
2.14M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
2.14M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
2.14M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
2.14M
    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.14M
    switch (size_of_element) {
271
168k
    case 1:
272
205k
    case 2:
273
208k
    case 3:
274
1.42M
    case 4:
275
2.04M
    case 8:
276
2.04M
    case 12:
277
2.13M
    case 16:
278
2.14M
    case 32:
279
2.14M
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
2.14M
    }
283
2.14M
    return Status::OK();
284
2.14M
}
285
286
template <FieldType Type>
287
class BitShufflePageDecoder : public PageDecoder {
288
public:
289
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
290
1.07M
            : _data(data),
291
1.07M
              _options(options),
292
1.07M
              _parsed(false),
293
1.07M
              _num_elements(0),
294
1.07M
              _num_element_after_padding(0),
295
1.07M
              _size_of_element(0),
296
1.07M
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
517k
            : _data(data),
291
517k
              _options(options),
292
517k
              _parsed(false),
293
517k
              _num_elements(0),
294
517k
              _num_element_after_padding(0),
295
517k
              _size_of_element(0),
296
517k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
84.3k
            : _data(data),
291
84.3k
              _options(options),
292
84.3k
              _parsed(false),
293
84.3k
              _num_elements(0),
294
84.3k
              _num_element_after_padding(0),
295
84.3k
              _size_of_element(0),
296
84.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
18.3k
            : _data(data),
291
18.3k
              _options(options),
292
18.3k
              _parsed(false),
293
18.3k
              _num_elements(0),
294
18.3k
              _num_element_after_padding(0),
295
18.3k
              _size_of_element(0),
296
18.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
69.0k
            : _data(data),
291
69.0k
              _options(options),
292
69.0k
              _parsed(false),
293
69.0k
              _num_elements(0),
294
69.0k
              _num_element_after_padding(0),
295
69.0k
              _size_of_element(0),
296
69.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
16.0k
            : _data(data),
291
16.0k
              _options(options),
292
16.0k
              _parsed(false),
293
16.0k
              _num_elements(0),
294
16.0k
              _num_element_after_padding(0),
295
16.0k
              _size_of_element(0),
296
16.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
89.4k
            : _data(data),
291
89.4k
              _options(options),
292
89.4k
              _parsed(false),
293
89.4k
              _num_elements(0),
294
89.4k
              _num_element_after_padding(0),
295
89.4k
              _size_of_element(0),
296
89.4k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
18.8k
            : _data(data),
291
18.8k
              _options(options),
292
18.8k
              _parsed(false),
293
18.8k
              _num_elements(0),
294
18.8k
              _num_element_after_padding(0),
295
18.8k
              _size_of_element(0),
296
18.8k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
29.0k
            : _data(data),
291
29.0k
              _options(options),
292
29.0k
              _parsed(false),
293
29.0k
              _num_elements(0),
294
29.0k
              _num_element_after_padding(0),
295
29.0k
              _size_of_element(0),
296
29.0k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.72k
            : _data(data),
291
1.72k
              _options(options),
292
1.72k
              _parsed(false),
293
1.72k
              _num_elements(0),
294
1.72k
              _num_element_after_padding(0),
295
1.72k
              _size_of_element(0),
296
1.72k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
57.0k
            : _data(data),
291
57.0k
              _options(options),
292
57.0k
              _parsed(false),
293
57.0k
              _num_elements(0),
294
57.0k
              _num_element_after_padding(0),
295
57.0k
              _size_of_element(0),
296
57.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
63.5k
            : _data(data),
291
63.5k
              _options(options),
292
63.5k
              _parsed(false),
293
63.5k
              _num_elements(0),
294
63.5k
              _num_element_after_padding(0),
295
63.5k
              _size_of_element(0),
296
63.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
2.36k
            : _data(data),
291
2.36k
              _options(options),
292
2.36k
              _parsed(false),
293
2.36k
              _num_elements(0),
294
2.36k
              _num_element_after_padding(0),
295
2.36k
              _size_of_element(0),
296
2.36k
              _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.44k
            : _data(data),
291
1.44k
              _options(options),
292
1.44k
              _parsed(false),
293
1.44k
              _num_elements(0),
294
1.44k
              _num_element_after_padding(0),
295
1.44k
              _size_of_element(0),
296
1.44k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
14.7k
            : _data(data),
291
14.7k
              _options(options),
292
14.7k
              _parsed(false),
293
14.7k
              _num_elements(0),
294
14.7k
              _num_element_after_padding(0),
295
14.7k
              _size_of_element(0),
296
14.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
38.7k
            : _data(data),
291
38.7k
              _options(options),
292
38.7k
              _parsed(false),
293
38.7k
              _num_elements(0),
294
38.7k
              _num_element_after_padding(0),
295
38.7k
              _size_of_element(0),
296
38.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
28.8k
            : _data(data),
291
28.8k
              _options(options),
292
28.8k
              _parsed(false),
293
28.8k
              _num_elements(0),
294
28.8k
              _num_element_after_padding(0),
295
28.8k
              _size_of_element(0),
296
28.8k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.74k
            : _data(data),
291
1.74k
              _options(options),
292
1.74k
              _parsed(false),
293
1.74k
              _num_elements(0),
294
1.74k
              _num_element_after_padding(0),
295
1.74k
              _size_of_element(0),
296
1.74k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.20k
            : _data(data),
291
1.20k
              _options(options),
292
1.20k
              _parsed(false),
293
1.20k
              _num_elements(0),
294
1.20k
              _num_element_after_padding(0),
295
1.20k
              _size_of_element(0),
296
1.20k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.15k
            : _data(data),
291
1.15k
              _options(options),
292
1.15k
              _parsed(false),
293
1.15k
              _num_elements(0),
294
1.15k
              _num_element_after_padding(0),
295
1.15k
              _size_of_element(0),
296
1.15k
              _cur_index(0) {}
297
298
1.06M
    Status init() override {
299
1.06M
        CHECK(!_parsed);
300
1.06M
        size_t unused;
301
1.06M
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.06M
                                                 _num_element_after_padding, _size_of_element));
303
304
1.06M
        if (_data.size !=
305
1.06M
            _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.06M
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.06M
                     _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.06M
        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.06M
        _parsed = true;
325
1.06M
        return Status::OK();
326
1.06M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
298
517k
    Status init() override {
299
517k
        CHECK(!_parsed);
300
517k
        size_t unused;
301
517k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
517k
                                                 _num_element_after_padding, _size_of_element));
303
304
517k
        if (_data.size !=
305
517k
            _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
517k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
517k
                     _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
517k
        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
517k
        _parsed = true;
325
517k
        return Status::OK();
326
517k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
84.2k
    Status init() override {
299
84.2k
        CHECK(!_parsed);
300
84.2k
        size_t unused;
301
84.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
84.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
84.2k
        if (_data.size !=
305
84.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
84.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
84.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
84.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
84.2k
        _parsed = true;
325
84.2k
        return Status::OK();
326
84.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
18.2k
    Status init() override {
299
18.2k
        CHECK(!_parsed);
300
18.2k
        size_t unused;
301
18.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
18.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
18.2k
        if (_data.size !=
305
18.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
18.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
18.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
18.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
18.2k
        _parsed = true;
325
18.2k
        return Status::OK();
326
18.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
68.8k
    Status init() override {
299
68.8k
        CHECK(!_parsed);
300
68.8k
        size_t unused;
301
68.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
68.8k
                                                 _num_element_after_padding, _size_of_element));
303
304
68.8k
        if (_data.size !=
305
68.8k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
68.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
68.8k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
68.8k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
68.8k
        _parsed = true;
325
68.8k
        return Status::OK();
326
68.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
298
16.0k
    Status init() override {
299
16.0k
        CHECK(!_parsed);
300
16.0k
        size_t unused;
301
16.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
16.0k
                                                 _num_element_after_padding, _size_of_element));
303
304
16.0k
        if (_data.size !=
305
16.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
16.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
16.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
16.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
16.0k
        _parsed = true;
325
16.0k
        return Status::OK();
326
16.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
298
89.4k
    Status init() override {
299
89.4k
        CHECK(!_parsed);
300
89.4k
        size_t unused;
301
89.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
89.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
89.4k
        if (_data.size !=
305
89.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
89.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
89.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
89.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
89.4k
        _parsed = true;
325
89.4k
        return Status::OK();
326
89.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
298
18.8k
    Status init() override {
299
18.8k
        CHECK(!_parsed);
300
18.8k
        size_t unused;
301
18.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
18.8k
                                                 _num_element_after_padding, _size_of_element));
303
304
18.8k
        if (_data.size !=
305
18.8k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
18.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
18.8k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
18.8k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
18.8k
        _parsed = true;
325
18.8k
        return Status::OK();
326
18.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
298
29.0k
    Status init() override {
299
29.0k
        CHECK(!_parsed);
300
29.0k
        size_t unused;
301
29.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
29.0k
                                                 _num_element_after_padding, _size_of_element));
303
304
29.0k
        if (_data.size !=
305
29.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
29.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
29.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
29.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
29.0k
        _parsed = true;
325
29.0k
        return Status::OK();
326
29.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
1.72k
    Status init() override {
299
1.72k
        CHECK(!_parsed);
300
1.72k
        size_t unused;
301
1.72k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.72k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.72k
        if (_data.size !=
305
1.72k
            _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.72k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.72k
                     _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.72k
        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.72k
        _parsed = true;
325
1.72k
        return Status::OK();
326
1.72k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
56.9k
    Status init() override {
299
56.9k
        CHECK(!_parsed);
300
56.9k
        size_t unused;
301
56.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
56.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
56.9k
        if (_data.size !=
305
56.9k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
56.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
56.9k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
56.9k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
56.9k
        _parsed = true;
325
56.9k
        return Status::OK();
326
56.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
298
63.4k
    Status init() override {
299
63.4k
        CHECK(!_parsed);
300
63.4k
        size_t unused;
301
63.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
63.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
63.4k
        if (_data.size !=
305
63.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
63.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
63.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
63.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
63.4k
        _parsed = true;
325
63.4k
        return Status::OK();
326
63.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
298
2.36k
    Status init() override {
299
2.36k
        CHECK(!_parsed);
300
2.36k
        size_t unused;
301
2.36k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
2.36k
                                                 _num_element_after_padding, _size_of_element));
303
304
2.36k
        if (_data.size !=
305
2.36k
            _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.36k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
2.36k
                     _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.36k
        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.36k
        _parsed = true;
325
2.36k
        return Status::OK();
326
2.36k
    }
_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.43k
    Status init() override {
299
1.43k
        CHECK(!_parsed);
300
1.43k
        size_t unused;
301
1.43k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.43k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.43k
        if (_data.size !=
305
1.43k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.43k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.43k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.43k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.43k
        _parsed = true;
325
1.43k
        return Status::OK();
326
1.43k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
298
14.7k
    Status init() override {
299
14.7k
        CHECK(!_parsed);
300
14.7k
        size_t unused;
301
14.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
14.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
14.7k
        if (_data.size !=
305
14.7k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
14.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
14.7k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
14.7k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
14.7k
        _parsed = true;
325
14.7k
        return Status::OK();
326
14.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
298
38.7k
    Status init() override {
299
38.7k
        CHECK(!_parsed);
300
38.7k
        size_t unused;
301
38.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
38.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
38.7k
        if (_data.size !=
305
38.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
38.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
38.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
38.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
38.7k
        _parsed = true;
325
38.7k
        return Status::OK();
326
38.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
298
28.8k
    Status init() override {
299
28.8k
        CHECK(!_parsed);
300
28.8k
        size_t unused;
301
28.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
28.8k
                                                 _num_element_after_padding, _size_of_element));
303
304
28.8k
        if (_data.size !=
305
28.8k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
28.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
28.8k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
28.8k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
28.8k
        _parsed = true;
325
28.8k
        return Status::OK();
326
28.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
298
1.74k
    Status init() override {
299
1.74k
        CHECK(!_parsed);
300
1.74k
        size_t unused;
301
1.74k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.74k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.74k
        if (_data.size !=
305
1.74k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.74k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.74k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.74k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.74k
        _parsed = true;
325
1.74k
        return Status::OK();
326
1.74k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
298
1.19k
    Status init() override {
299
1.19k
        CHECK(!_parsed);
300
1.19k
        size_t unused;
301
1.19k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.19k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.19k
        if (_data.size !=
305
1.19k
            _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.19k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.19k
                     _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.19k
        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.19k
        _parsed = true;
325
1.19k
        return Status::OK();
326
1.19k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
298
1.15k
    Status init() override {
299
1.15k
        CHECK(!_parsed);
300
1.15k
        size_t unused;
301
1.15k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.15k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.15k
        if (_data.size !=
305
1.15k
            _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.15k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.15k
                     _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.15k
        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.15k
        _parsed = true;
325
1.15k
        return Status::OK();
326
1.15k
    }
327
328
    // If the page only contains null, then _num_elements == 0, and the nullmap has
329
    // some value. But in _seek_columns --> seek_to_ordinal --> _seek_to_pos_in_page
330
    // in this call stack it will pass pos == 0 to this method. Although we can add some
331
    // code such as check if the count == 0, then skip seek, but there are other method such
332
    // as init will also call seek with pos == 0. And the seek is useless when _num_elements
333
    // == 0, because next batch will return empty in this method.
334
3.61M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
3.61M
        if (_num_elements == 0) [[unlikely]] {
337
4.44k
            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.44k
        }
342
343
3.61M
        DCHECK_LE(pos, _num_elements);
344
3.61M
        _cur_index = pos;
345
3.61M
        return Status::OK();
346
3.61M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.82M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
1.82M
        if (_num_elements == 0) [[unlikely]] {
337
1.69k
            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.69k
        }
342
343
1.82M
        DCHECK_LE(pos, _num_elements);
344
1.82M
        _cur_index = pos;
345
1.82M
        return Status::OK();
346
1.82M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
86.9k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
86.9k
        if (_num_elements == 0) [[unlikely]] {
337
355
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
355
        }
342
343
86.9k
        DCHECK_LE(pos, _num_elements);
344
86.9k
        _cur_index = pos;
345
86.9k
        return Status::OK();
346
86.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
2.07k
    Status seek_to_position_in_page(size_t pos) override {
335
2.07k
        DCHECK(_parsed) << "Must call init()";
336
2.07k
        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
2.07k
        DCHECK_LE(pos, _num_elements);
344
2.07k
        _cur_index = pos;
345
2.07k
        return Status::OK();
346
2.07k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
129k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
129k
        if (_num_elements == 0) [[unlikely]] {
337
668
            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
668
        }
342
343
129k
        DCHECK_LE(pos, _num_elements);
344
129k
        _cur_index = pos;
345
129k
        return Status::OK();
346
129k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
334
3.89k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
3.89k
        if (_num_elements == 0) [[unlikely]] {
337
6
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
6
        }
342
343
3.89k
        DCHECK_LE(pos, _num_elements);
344
3.89k
        _cur_index = pos;
345
3.89k
        return Status::OK();
346
3.89k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
334
9.33k
    Status seek_to_position_in_page(size_t pos) override {
335
9.33k
        DCHECK(_parsed) << "Must call init()";
336
9.33k
        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
9.33k
        DCHECK_LE(pos, _num_elements);
344
9.33k
        _cur_index = pos;
345
9.33k
        return Status::OK();
346
9.33k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
228k
    Status seek_to_position_in_page(size_t pos) override {
335
228k
        DCHECK(_parsed) << "Must call init()";
336
228k
        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
228k
        DCHECK_LE(pos, _num_elements);
344
228k
        _cur_index = pos;
345
228k
        return Status::OK();
346
228k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
334
204k
    Status seek_to_position_in_page(size_t pos) override {
335
204k
        DCHECK(_parsed) << "Must call init()";
336
204k
        if (_num_elements == 0) [[unlikely]] {
337
5
            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
5
        }
342
343
204k
        DCHECK_LE(pos, _num_elements);
344
204k
        _cur_index = pos;
345
204k
        return Status::OK();
346
204k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
334
216k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
216k
        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
216k
        DCHECK_LE(pos, _num_elements);
344
216k
        _cur_index = pos;
345
216k
        return Status::OK();
346
216k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
334
512k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
512k
        if (_num_elements == 0) [[unlikely]] {
337
1.26k
            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.26k
        }
342
343
512k
        DCHECK_LE(pos, _num_elements);
344
512k
        _cur_index = pos;
345
512k
        return Status::OK();
346
512k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
334
52.7k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
52.7k
        if (_num_elements == 0) [[unlikely]] {
337
14
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
14
        }
342
343
52.7k
        DCHECK_LE(pos, _num_elements);
344
52.7k
        _cur_index = pos;
345
52.7k
        return Status::OK();
346
52.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
201k
    Status seek_to_position_in_page(size_t pos) override {
335
201k
        DCHECK(_parsed) << "Must call init()";
336
201k
        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
201k
        DCHECK_LE(pos, _num_elements);
344
201k
        _cur_index = pos;
345
201k
        return Status::OK();
346
201k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
334
6.60k
    Status seek_to_position_in_page(size_t pos) override {
335
6.60k
        DCHECK(_parsed) << "Must call init()";
336
6.60k
        if (_num_elements == 0) [[unlikely]] {
337
352
            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
352
        }
342
343
6.60k
        DCHECK_LE(pos, _num_elements);
344
6.60k
        _cur_index = pos;
345
6.60k
        return Status::OK();
346
6.60k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
Line
Count
Source
334
128
    Status seek_to_position_in_page(size_t pos) override {
335
128
        DCHECK(_parsed) << "Must call init()";
336
128
        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
128
        DCHECK_LE(pos, _num_elements);
344
128
        _cur_index = pos;
345
128
        return Status::OK();
346
128
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Line
Count
Source
334
869
    Status seek_to_position_in_page(size_t pos) override {
335
869
        DCHECK(_parsed) << "Must call init()";
336
869
        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
869
        DCHECK_LE(pos, _num_elements);
344
869
        _cur_index = pos;
345
869
        return Status::OK();
346
869
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
334
17.4k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
17.4k
        if (_num_elements == 0) [[unlikely]] {
337
12
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
12
        }
342
343
17.4k
        DCHECK_LE(pos, _num_elements);
344
17.4k
        _cur_index = pos;
345
17.4k
        return Status::OK();
346
17.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Line
Count
Source
334
115k
    Status seek_to_position_in_page(size_t pos) override {
335
115k
        DCHECK(_parsed) << "Must call init()";
336
115k
        if (_num_elements == 0) [[unlikely]] {
337
10
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
10
        }
342
343
115k
        DCHECK_LE(pos, _num_elements);
344
115k
        _cur_index = pos;
345
115k
        return Status::OK();
346
115k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.94k
    Status seek_to_position_in_page(size_t pos) override {
335
1.94k
        DCHECK(_parsed) << "Must call init()";
336
1.94k
        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.94k
        DCHECK_LE(pos, _num_elements);
344
1.94k
        _cur_index = pos;
345
1.94k
        return Status::OK();
346
1.94k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE24seek_to_position_in_pageEm
Line
Count
Source
334
54
    Status seek_to_position_in_page(size_t pos) override {
335
54
        DCHECK(_parsed) << "Must call init()";
336
54
        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
54
        DCHECK_LE(pos, _num_elements);
344
54
        _cur_index = pos;
345
54
        return Status::OK();
346
54
    }
_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.75M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.75M
        DCHECK(_parsed);
389
1.75M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.75M
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
1.75M
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.75M
        *n = max_fetch;
398
1.75M
        if constexpr (forward_index) {
399
1.56M
            _cur_index += max_fetch;
400
1.56M
        }
401
402
1.75M
        return Status::OK();
403
1.75M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
474k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
474k
        DCHECK(_parsed);
389
474k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
474k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
474k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
474k
        *n = max_fetch;
398
474k
        if constexpr (forward_index) {
399
474k
            _cur_index += max_fetch;
400
474k
        }
401
402
474k
        return Status::OK();
403
474k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
222k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
222k
        DCHECK(_parsed);
389
222k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
222k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
222k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
222k
        *n = max_fetch;
398
222k
        if constexpr (forward_index) {
399
222k
            _cur_index += max_fetch;
400
222k
        }
401
402
222k
        return Status::OK();
403
222k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
16.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
16.8k
        DCHECK(_parsed);
389
16.8k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
16.8k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
16.8k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
16.8k
        *n = max_fetch;
398
16.8k
        if constexpr (forward_index) {
399
16.8k
            _cur_index += max_fetch;
400
16.8k
        }
401
402
16.8k
        return Status::OK();
403
16.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
87.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
87.1k
        DCHECK(_parsed);
389
87.1k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
87.1k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
87.1k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
87.1k
        *n = max_fetch;
398
87.1k
        if constexpr (forward_index) {
399
87.1k
            _cur_index += max_fetch;
400
87.1k
        }
401
402
87.1k
        return Status::OK();
403
87.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
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, static_cast<size_t>(_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
147k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
147k
        DCHECK(_parsed);
389
147k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
147k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
147k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
147k
        *n = max_fetch;
398
147k
        if constexpr (forward_index) {
399
147k
            _cur_index += max_fetch;
400
147k
        }
401
402
147k
        return Status::OK();
403
147k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
193k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
193k
        DCHECK(_parsed);
389
193k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
193k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
193k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
193k
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
193k
        return Status::OK();
403
193k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
13.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
13.4k
        DCHECK(_parsed);
389
13.4k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
13.4k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
13.4k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
13.4k
        *n = max_fetch;
398
13.4k
        if constexpr (forward_index) {
399
13.4k
            _cur_index += max_fetch;
400
13.4k
        }
401
402
13.4k
        return Status::OK();
403
13.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
19.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
19.9k
        DCHECK(_parsed);
389
19.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
19.9k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
19.9k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
19.9k
        *n = max_fetch;
398
19.9k
        if constexpr (forward_index) {
399
19.9k
            _cur_index += max_fetch;
400
19.9k
        }
401
402
19.9k
        return Status::OK();
403
19.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
5.57k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
5.57k
        DCHECK(_parsed);
389
5.57k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
5.57k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
5.57k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
5.57k
        *n = max_fetch;
398
5.57k
        if constexpr (forward_index) {
399
5.57k
            _cur_index += max_fetch;
400
5.57k
        }
401
402
5.57k
        return Status::OK();
403
5.57k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
391k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
391k
        DCHECK(_parsed);
389
391k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
391k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
391k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
391k
        *n = max_fetch;
398
391k
        if constexpr (forward_index) {
399
391k
            _cur_index += max_fetch;
400
391k
        }
401
402
391k
        return Status::OK();
403
391k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
78.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
78.0k
        DCHECK(_parsed);
389
78.0k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
78.0k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
78.0k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
78.0k
        *n = max_fetch;
398
78.0k
        if constexpr (forward_index) {
399
78.0k
            _cur_index += max_fetch;
400
78.0k
        }
401
402
78.0k
        return Status::OK();
403
78.0k
    }
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.32k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.32k
        DCHECK(_parsed);
389
1.32k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.32k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
1.32k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.32k
        *n = max_fetch;
398
1.32k
        if constexpr (forward_index) {
399
1.32k
            _cur_index += max_fetch;
400
1.32k
        }
401
402
1.32k
        return Status::OK();
403
1.32k
    }
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.47k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
7.47k
        DCHECK(_parsed);
389
7.47k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
7.47k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
7.47k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
7.47k
        *n = max_fetch;
398
7.47k
        if constexpr (forward_index) {
399
7.47k
            _cur_index += max_fetch;
400
7.47k
        }
401
402
7.47k
        return Status::OK();
403
7.47k
    }
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.33k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.33k
        DCHECK(_parsed);
389
1.33k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.33k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
1.33k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.33k
        *n = max_fetch;
398
1.33k
        if constexpr (forward_index) {
399
1.33k
            _cur_index += max_fetch;
400
1.33k
        }
401
402
1.33k
        return Status::OK();
403
1.33k
    }
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.28k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
9.28k
        DCHECK(_parsed);
389
9.28k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
9.28k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
9.28k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
9.28k
        *n = max_fetch;
398
9.28k
        if constexpr (forward_index) {
399
9.28k
            _cur_index += max_fetch;
400
9.28k
        }
401
402
9.28k
        return Status::OK();
403
9.28k
    }
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.3k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
29.3k
        DCHECK(_parsed);
389
29.3k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
29.3k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
29.3k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
29.3k
        *n = max_fetch;
398
29.3k
        if constexpr (forward_index) {
399
29.3k
            _cur_index += max_fetch;
400
29.3k
        }
401
402
29.3k
        return Status::OK();
403
29.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
25.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
25.9k
        DCHECK(_parsed);
389
25.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
25.9k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
25.9k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
25.9k
        *n = max_fetch;
398
25.9k
        if constexpr (forward_index) {
399
25.9k
            _cur_index += max_fetch;
400
25.9k
        }
401
402
25.9k
        return Status::OK();
403
25.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.14k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.14k
        DCHECK(_parsed);
389
3.14k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.14k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
3.14k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.14k
        *n = max_fetch;
398
3.14k
        if constexpr (forward_index) {
399
3.14k
            _cur_index += max_fetch;
400
3.14k
        }
401
402
3.14k
        return Status::OK();
403
3.14k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.25k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.25k
        DCHECK(_parsed);
389
3.25k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.25k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
3.25k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.25k
        *n = max_fetch;
398
3.25k
        if constexpr (forward_index) {
399
3.25k
            _cur_index += max_fetch;
400
3.25k
        }
401
402
3.25k
        return Status::OK();
403
3.25k
    }
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.76k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
5.76k
        DCHECK(_parsed);
389
5.76k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
5.76k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
5.76k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
5.76k
        *n = max_fetch;
398
5.76k
        if constexpr (forward_index) {
399
5.76k
            _cur_index += max_fetch;
400
5.76k
        }
401
402
5.76k
        return Status::OK();
403
5.76k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
404
405
1.56M
    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
474k
    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
223k
    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
16.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
87.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
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
147k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
13.4k
    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
19.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
5.57k
    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
391k
    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
78.0k
    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.32k
    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.47k
    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.33k
    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.29k
    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.3k
    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
25.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
3.15k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
3.25k
    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.76k
    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
408k
                          MutableColumnPtr& dst) override {
409
408k
        DCHECK(_parsed);
410
408k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
408k
        auto total = *n;
416
408k
        auto read_count = 0;
417
408k
        _buffer.resize(total);
418
114M
        for (size_t i = 0; i < total; ++i) {
419
114M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
114M
            if (UNLIKELY(ord >= _num_elements)) {
421
11.8k
                break;
422
11.8k
            }
423
424
114M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
114M
        }
426
427
408k
        if (LIKELY(read_count > 0)) {
428
408k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
408k
        }
430
431
408k
        *n = read_count;
432
408k
        return Status::OK();
433
408k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
84.0k
                          MutableColumnPtr& dst) override {
409
84.0k
        DCHECK(_parsed);
410
84.0k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
84.0k
        auto total = *n;
416
84.0k
        auto read_count = 0;
417
84.0k
        _buffer.resize(total);
418
47.0M
        for (size_t i = 0; i < total; ++i) {
419
46.9M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
46.9M
            if (UNLIKELY(ord >= _num_elements)) {
421
2.02k
                break;
422
2.02k
            }
423
424
46.9M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
46.9M
        }
426
427
84.0k
        if (LIKELY(read_count > 0)) {
428
84.0k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
84.0k
        }
430
431
84.0k
        *n = read_count;
432
84.0k
        return Status::OK();
433
84.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
24.5k
                          MutableColumnPtr& dst) override {
409
24.5k
        DCHECK(_parsed);
410
24.5k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
24.5k
        auto total = *n;
416
24.5k
        auto read_count = 0;
417
24.5k
        _buffer.resize(total);
418
746k
        for (size_t i = 0; i < total; ++i) {
419
721k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
721k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
721k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
721k
        }
426
427
24.5k
        if (LIKELY(read_count > 0)) {
428
24.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
24.5k
        }
430
431
24.5k
        *n = read_count;
432
24.5k
        return Status::OK();
433
24.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
7.93k
                          MutableColumnPtr& dst) override {
409
7.93k
        DCHECK(_parsed);
410
7.93k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
7.93k
        auto total = *n;
416
7.93k
        auto read_count = 0;
417
7.93k
        _buffer.resize(total);
418
58.3k
        for (size_t i = 0; i < total; ++i) {
419
50.3k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
50.3k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
50.3k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
50.3k
        }
426
427
7.93k
        if (LIKELY(read_count > 0)) {
428
7.93k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
7.93k
        }
430
431
7.93k
        *n = read_count;
432
7.93k
        return Status::OK();
433
7.93k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
107k
                          MutableColumnPtr& dst) override {
409
107k
        DCHECK(_parsed);
410
107k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
107k
        auto total = *n;
416
107k
        auto read_count = 0;
417
107k
        _buffer.resize(total);
418
13.6M
        for (size_t i = 0; i < total; ++i) {
419
13.5M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
13.5M
            if (UNLIKELY(ord >= _num_elements)) {
421
669
                break;
422
669
            }
423
424
13.5M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
13.5M
        }
426
427
107k
        if (LIKELY(read_count > 0)) {
428
107k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
107k
        }
430
431
107k
        *n = read_count;
432
107k
        return Status::OK();
433
107k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
6.89k
                          MutableColumnPtr& dst) override {
409
6.89k
        DCHECK(_parsed);
410
6.89k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
6.89k
        auto total = *n;
416
6.89k
        auto read_count = 0;
417
6.89k
        _buffer.resize(total);
418
16.9k
        for (size_t i = 0; i < total; ++i) {
419
10.0k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
10.0k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
10.0k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
10.0k
        }
426
427
6.89k
        if (LIKELY(read_count > 0)) {
428
6.89k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
6.89k
        }
430
431
6.89k
        *n = read_count;
432
6.89k
        return Status::OK();
433
6.89k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
30.2k
                          MutableColumnPtr& dst) override {
409
30.2k
        DCHECK(_parsed);
410
30.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
30.2k
        auto total = *n;
416
30.2k
        auto read_count = 0;
417
30.2k
        _buffer.resize(total);
418
1.33M
        for (size_t i = 0; i < total; ++i) {
419
1.30M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.30M
            if (UNLIKELY(ord >= _num_elements)) {
421
198
                break;
422
198
            }
423
424
1.30M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.30M
        }
426
427
30.2k
        if (LIKELY(read_count > 0)) {
428
30.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
30.2k
        }
430
431
30.2k
        *n = read_count;
432
30.2k
        return Status::OK();
433
30.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
9.89k
                          MutableColumnPtr& dst) override {
409
9.89k
        DCHECK(_parsed);
410
9.89k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
9.89k
        auto total = *n;
416
9.89k
        auto read_count = 0;
417
9.89k
        _buffer.resize(total);
418
1.16M
        for (size_t i = 0; i < total; ++i) {
419
1.15M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.15M
            if (UNLIKELY(ord >= _num_elements)) {
421
30
                break;
422
30
            }
423
424
1.15M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.15M
        }
426
427
9.89k
        if (LIKELY(read_count > 0)) {
428
9.89k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
9.89k
        }
430
431
9.89k
        *n = read_count;
432
9.89k
        return Status::OK();
433
9.89k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
16.5k
                          MutableColumnPtr& dst) override {
409
16.5k
        DCHECK(_parsed);
410
16.5k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
16.5k
        auto total = *n;
416
16.5k
        auto read_count = 0;
417
16.5k
        _buffer.resize(total);
418
5.92M
        for (size_t i = 0; i < total; ++i) {
419
5.91M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
5.91M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.32k
                break;
422
1.32k
            }
423
424
5.91M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
5.91M
        }
426
427
16.5k
        if (LIKELY(read_count > 0)) {
428
16.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
16.5k
        }
430
431
16.5k
        *n = read_count;
432
16.5k
        return Status::OK();
433
16.5k
    }
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.37k
                          MutableColumnPtr& dst) override {
409
1.37k
        DCHECK(_parsed);
410
1.37k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.37k
        auto total = *n;
416
1.37k
        auto read_count = 0;
417
1.37k
        _buffer.resize(total);
418
436k
        for (size_t i = 0; i < total; ++i) {
419
434k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
434k
            if (UNLIKELY(ord >= _num_elements)) {
421
15
                break;
422
15
            }
423
424
434k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
434k
        }
426
427
1.37k
        if (LIKELY(read_count > 0)) {
428
1.37k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.37k
        }
430
431
1.37k
        *n = read_count;
432
1.37k
        return Status::OK();
433
1.37k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
28.6k
                          MutableColumnPtr& dst) override {
409
28.6k
        DCHECK(_parsed);
410
28.6k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
28.6k
        auto total = *n;
416
28.6k
        auto read_count = 0;
417
28.6k
        _buffer.resize(total);
418
6.52M
        for (size_t i = 0; i < total; ++i) {
419
6.50M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
6.50M
            if (UNLIKELY(ord >= _num_elements)) {
421
729
                break;
422
729
            }
423
424
6.49M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
6.49M
        }
426
427
28.6k
        if (LIKELY(read_count > 0)) {
428
28.6k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
28.6k
        }
430
431
28.6k
        *n = read_count;
432
28.6k
        return Status::OK();
433
28.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
31.1k
                          MutableColumnPtr& dst) override {
409
31.1k
        DCHECK(_parsed);
410
31.1k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
31.1k
        auto total = *n;
416
31.1k
        auto read_count = 0;
417
31.1k
        _buffer.resize(total);
418
9.50M
        for (size_t i = 0; i < total; ++i) {
419
9.47M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.47M
            if (UNLIKELY(ord >= _num_elements)) {
421
198
                break;
422
198
            }
423
424
9.47M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.47M
        }
426
427
31.1k
        if (LIKELY(read_count > 0)) {
428
31.1k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
31.1k
        }
430
431
31.1k
        *n = read_count;
432
31.1k
        return Status::OK();
433
31.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1.76k
                          MutableColumnPtr& dst) override {
409
1.76k
        DCHECK(_parsed);
410
1.76k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.76k
        auto total = *n;
416
1.76k
        auto read_count = 0;
417
1.76k
        _buffer.resize(total);
418
432k
        for (size_t i = 0; i < total; ++i) {
419
431k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
431k
            if (UNLIKELY(ord >= _num_elements)) {
421
242
                break;
422
242
            }
423
424
431k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
431k
        }
426
427
1.76k
        if (LIKELY(read_count > 0)) {
428
1.76k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.76k
        }
430
431
1.76k
        *n = read_count;
432
1.76k
        return Status::OK();
433
1.76k
    }
_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.0k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
13.0k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
13.0k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
13.0k
        }
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
193
                          MutableColumnPtr& dst) override {
409
193
        DCHECK(_parsed);
410
193
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
193
        auto total = *n;
416
193
        auto read_count = 0;
417
193
        _buffer.resize(total);
418
391
        for (size_t i = 0; i < total; ++i) {
419
198
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
198
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
198
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
198
        }
426
427
193
        if (LIKELY(read_count > 0)) {
428
193
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
193
        }
430
431
193
        *n = read_count;
432
193
        return Status::OK();
433
193
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4.50k
                          MutableColumnPtr& dst) override {
409
4.50k
        DCHECK(_parsed);
410
4.50k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.50k
        auto total = *n;
416
4.50k
        auto read_count = 0;
417
4.50k
        _buffer.resize(total);
418
18.9k
        for (size_t i = 0; i < total; ++i) {
419
14.4k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.4k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
14.4k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.4k
        }
426
427
4.50k
        if (LIKELY(read_count > 0)) {
428
4.50k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.50k
        }
430
431
4.50k
        *n = read_count;
432
4.50k
        return Status::OK();
433
4.50k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
26.5k
                          MutableColumnPtr& dst) override {
409
26.5k
        DCHECK(_parsed);
410
26.5k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
26.5k
        auto total = *n;
416
26.5k
        auto read_count = 0;
417
26.5k
        _buffer.resize(total);
418
19.2M
        for (size_t i = 0; i < total; ++i) {
419
19.2M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
19.2M
            if (UNLIKELY(ord >= _num_elements)) {
421
5.65k
                break;
422
5.65k
            }
423
424
19.2M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
19.2M
        }
426
427
26.5k
        if (LIKELY(read_count > 0)) {
428
26.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
26.5k
        }
430
431
26.5k
        *n = read_count;
432
26.5k
        return Status::OK();
433
26.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.1k
                          MutableColumnPtr& dst) override {
409
13.1k
        DCHECK(_parsed);
410
13.1k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.1k
        auto total = *n;
416
13.1k
        auto read_count = 0;
417
13.1k
        _buffer.resize(total);
418
8.79M
        for (size_t i = 0; i < total; ++i) {
419
8.78M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
8.78M
            if (UNLIKELY(ord >= _num_elements)) {
421
721
                break;
422
721
            }
423
424
8.78M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
8.78M
        }
426
427
13.1k
        if (LIKELY(read_count > 0)) {
428
13.1k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.1k
        }
430
431
13.1k
        *n = read_count;
432
13.1k
        return Status::OK();
433
13.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
960
                          MutableColumnPtr& dst) override {
409
960
        DCHECK(_parsed);
410
960
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
960
        auto total = *n;
416
960
        auto read_count = 0;
417
960
        _buffer.resize(total);
418
2.77k
        for (size_t i = 0; i < total; ++i) {
419
1.81k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.81k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
1.81k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.81k
        }
426
427
960
        if (LIKELY(read_count > 0)) {
428
960
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
960
        }
430
431
960
        *n = read_count;
432
960
        return Status::OK();
433
960
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
455
                          MutableColumnPtr& dst) override {
409
455
        DCHECK(_parsed);
410
455
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
455
        auto total = *n;
416
455
        auto read_count = 0;
417
455
        _buffer.resize(total);
418
1.17k
        for (size_t i = 0; i < total; ++i) {
419
720
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
720
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
720
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
720
        }
426
427
455
        if (LIKELY(read_count > 0)) {
428
452
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
452
        }
430
431
455
        *n = read_count;
432
455
        return Status::OK();
433
455
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
410
                          MutableColumnPtr& dst) override {
409
410
        DCHECK(_parsed);
410
410
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
410
        auto total = *n;
416
410
        auto read_count = 0;
417
410
        _buffer.resize(total);
418
1.32k
        for (size_t i = 0; i < total; ++i) {
419
919
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
919
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
919
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
919
        }
426
427
410
        if (LIKELY(read_count > 0)) {
428
409
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
409
        }
430
431
410
        *n = read_count;
432
410
        return Status::OK();
433
410
    }
434
435
194k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
194k
        return next_batch<false>(n, dst);
437
194k
    }
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
194k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
194k
        return next_batch<false>(n, dst);
437
194k
    }
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
3
    size_t count() const override { return _num_elements; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
439
3
    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
3.91M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
2.42M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
441
1.10k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
441
796
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
274k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
441
445
    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
226k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
201k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
441
211k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
441
227k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
441
27.6k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
441
199k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Line
Count
Source
441
1.01k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE13current_indexEv
Line
Count
Source
441
14
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE13current_indexEv
Line
Count
Source
441
3.28k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
441
828
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
441
111k
    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
55
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
Line
Count
Source
441
100
    size_t current_index() const override { return _cur_index; }
442
443
117M
    char* get_data(size_t index) const {
444
117M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
117M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
49.0M
    char* get_data(size_t index) const {
444
49.0M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
49.0M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
944k
    char* get_data(size_t index) const {
444
944k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
944k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
443
67.2k
    char* get_data(size_t index) const {
444
67.2k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
67.2k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
443
13.6M
    char* get_data(size_t index) const {
444
13.6M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
13.6M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
26.4k
    char* get_data(size_t index) const {
444
26.4k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
26.4k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
1.64M
    char* get_data(size_t index) const {
444
1.64M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.64M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
1.16M
    char* get_data(size_t index) const {
444
1.16M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.16M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
5.93M
    char* get_data(size_t index) const {
444
5.93M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
5.93M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
440k
    char* get_data(size_t index) const {
444
440k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
440k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
6.89M
    char* get_data(size_t index) const {
444
6.89M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
6.89M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
443
9.55M
    char* get_data(size_t index) const {
444
9.55M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.55M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
443
432k
    char* get_data(size_t index) const {
444
432k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
432k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
443
20.5k
    char* get_data(size_t index) const {
444
20.5k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20.5k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
443
1.53k
    char* get_data(size_t index) const {
444
1.53k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.53k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
443
23.7k
    char* get_data(size_t index) const {
444
23.7k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
23.7k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
443
19.2M
    char* get_data(size_t index) const {
444
19.2M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
19.2M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
8.80M
    char* get_data(size_t index) const {
444
8.80M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
8.80M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
443
4.96k
    char* get_data(size_t index) const {
444
4.96k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
4.96k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Line
Count
Source
443
3.97k
    char* get_data(size_t index) const {
444
3.97k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
3.97k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
Line
Count
Source
443
6.68k
    char* get_data(size_t index) const {
444
6.68k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
6.68k
    }
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