Coverage Report

Created: 2026-06-09 18:25

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
728k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
346k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
49.2k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
10.7k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
85.4k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
13.7k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
95
67.6k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
95
11.8k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
95
19.0k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
193
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
36.1k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
95
41.2k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
282
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
95
7.06k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
192
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
95
9.50k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
95
11.8k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
95
15.7k
    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
780
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
95
675
    Status init() override { return reset(); }
96
97
142M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
141M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
50.1k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
13.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
114k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
26.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
68.8k
    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.5k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
97
21.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
202
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
78.2k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
78.3k
    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.06k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
97
99
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
97
5.03k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
24.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
97
21.8k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Line
Count
Source
97
1.36k
    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.60k
    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
648k
    Status add(const uint8_t* vals, size_t* count) override {
100
648k
        return add_internal<false>(vals, count);
101
648k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
50.1k
    Status add(const uint8_t* vals, size_t* count) override {
100
50.1k
        return add_internal<false>(vals, count);
101
50.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
13.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
13.3k
        return add_internal<false>(vals, count);
101
13.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
114k
    Status add(const uint8_t* vals, size_t* count) override {
100
114k
        return add_internal<false>(vals, count);
101
114k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
26.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
26.3k
        return add_internal<false>(vals, count);
101
26.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
68.8k
    Status add(const uint8_t* vals, size_t* count) override {
100
68.8k
        return add_internal<false>(vals, count);
101
68.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
99
11.5k
    Status add(const uint8_t* vals, size_t* count) override {
100
11.5k
        return add_internal<false>(vals, count);
101
11.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
99
21.1k
    Status add(const uint8_t* vals, size_t* count) override {
100
21.1k
        return add_internal<false>(vals, count);
101
21.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
202
    Status add(const uint8_t* vals, size_t* count) override {
100
202
        return add_internal<false>(vals, count);
101
202
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
78.2k
    Status add(const uint8_t* vals, size_t* count) override {
100
78.2k
        return add_internal<false>(vals, count);
101
78.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
78.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
78.3k
        return add_internal<false>(vals, count);
101
78.3k
    }
_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.07k
    Status add(const uint8_t* vals, size_t* count) override {
100
7.07k
        return add_internal<false>(vals, count);
101
7.07k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
99
    Status add(const uint8_t* vals, size_t* count) override {
100
99
        return add_internal<false>(vals, count);
101
99
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
99
5.03k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.03k
        return add_internal<false>(vals, count);
101
5.03k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
24.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
24.3k
        return add_internal<false>(vals, count);
101
24.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
99
21.8k
    Status add(const uint8_t* vals, size_t* count) override {
100
21.8k
        return add_internal<false>(vals, count);
101
21.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Line
Count
Source
99
1.36k
    Status add(const uint8_t* vals, size_t* count) override {
100
1.36k
        return add_internal<false>(vals, count);
101
1.36k
    }
_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.60k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.60k
        return add_internal<false>(vals, count);
101
5.60k
    }
102
103
142M
    Status single_add(const uint8_t* vals, size_t* count) {
104
142M
        return add_internal<true>(vals, count);
105
142M
    }
106
107
    template <bool single>
108
143M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
143M
        DCHECK(!_finished);
110
143M
        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
143M
        uint32_t to_add = cast_set<UInt32>(
126
143M
                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
143M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
143M
        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
143M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
143M
        _count += to_add;
134
143M
        _remain_element_capacity -= to_add;
135
143M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
143M
        *num_written = to_add;
138
143M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
142M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
142M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
142M
                        *reinterpret_cast<const uint32_t*>(vals);
149
142M
                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
142M
        }
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
143M
        return Status::OK();
159
143M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
648k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
648k
        DCHECK(!_finished);
110
648k
        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
648k
        uint32_t to_add = cast_set<UInt32>(
126
648k
                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
648k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
648k
        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
648k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
648k
        _count += to_add;
134
648k
        _remain_element_capacity -= to_add;
135
648k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
648k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
648k
        memcpy(&_data[orig_size], vals, to_add_size);
158
648k
        return Status::OK();
159
648k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
142M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
142M
        DCHECK(!_finished);
110
142M
        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
142M
        uint32_t to_add = cast_set<UInt32>(
126
142M
                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
142M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
142M
        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
142M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
142M
        _count += to_add;
134
142M
        _remain_element_capacity -= to_add;
135
142M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
142M
        *num_written = to_add;
138
142M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
142M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
142M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
142M
                        *reinterpret_cast<const uint32_t*>(vals);
149
142M
                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
142M
        }
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
142M
        return Status::OK();
159
142M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
50.1k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
50.1k
        DCHECK(!_finished);
110
50.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
50.1k
        uint32_t to_add = cast_set<UInt32>(
126
50.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
50.1k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
50.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
50.1k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
50.1k
        _count += to_add;
134
50.1k
        _remain_element_capacity -= to_add;
135
50.1k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
50.1k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
50.1k
        memcpy(&_data[orig_size], vals, to_add_size);
158
50.1k
        return Status::OK();
159
50.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
13.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
13.3k
        DCHECK(!_finished);
110
13.3k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
13.3k
        uint32_t to_add = cast_set<UInt32>(
126
13.3k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
13.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
13.3k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
13.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
13.3k
        _count += to_add;
134
13.3k
        _remain_element_capacity -= to_add;
135
13.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
13.3k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
13.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
13.3k
        return Status::OK();
159
13.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
114k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
114k
        DCHECK(!_finished);
110
114k
        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
114k
        uint32_t to_add = cast_set<UInt32>(
126
114k
                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
114k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
114k
        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
114k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
114k
        _count += to_add;
134
114k
        _remain_element_capacity -= to_add;
135
114k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
114k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
114k
        memcpy(&_data[orig_size], vals, to_add_size);
158
114k
        return Status::OK();
159
114k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
26.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
26.3k
        DCHECK(!_finished);
110
26.3k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
26.3k
        uint32_t to_add = cast_set<UInt32>(
126
26.3k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
26.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
26.3k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
26.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
26.3k
        _count += to_add;
134
26.3k
        _remain_element_capacity -= to_add;
135
26.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
26.3k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
26.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
26.3k
        return Status::OK();
159
26.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
68.8k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
68.8k
        DCHECK(!_finished);
110
68.8k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
68.8k
        uint32_t to_add = cast_set<UInt32>(
126
68.8k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
68.8k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
68.8k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
68.8k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
68.8k
        _count += to_add;
134
68.8k
        _remain_element_capacity -= to_add;
135
68.8k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
68.8k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
68.8k
        memcpy(&_data[orig_size], vals, to_add_size);
158
68.8k
        return Status::OK();
159
68.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
11.5k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
11.5k
        DCHECK(!_finished);
110
11.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
11.5k
        uint32_t to_add = cast_set<UInt32>(
126
11.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
11.5k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
11.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
11.5k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
11.5k
        _count += to_add;
134
11.5k
        _remain_element_capacity -= to_add;
135
11.5k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
11.5k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
11.5k
        memcpy(&_data[orig_size], vals, to_add_size);
158
11.5k
        return Status::OK();
159
11.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
21.1k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
21.1k
        DCHECK(!_finished);
110
21.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
21.1k
        uint32_t to_add = cast_set<UInt32>(
126
21.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
21.1k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
21.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
21.1k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
21.1k
        _count += to_add;
134
21.1k
        _remain_element_capacity -= to_add;
135
21.1k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
21.1k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
21.1k
        memcpy(&_data[orig_size], vals, to_add_size);
158
21.1k
        return Status::OK();
159
21.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
202
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
202
        DCHECK(!_finished);
110
202
        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
202
        uint32_t to_add = cast_set<UInt32>(
126
202
                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
202
        int to_add_size = to_add * SIZE_OF_TYPE;
129
202
        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
202
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
202
        _count += to_add;
134
202
        _remain_element_capacity -= to_add;
135
202
        _raw_data_size += to_add_size;
136
        // return added number through count
137
202
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
202
        memcpy(&_data[orig_size], vals, to_add_size);
158
202
        return Status::OK();
159
202
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
78.2k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
78.2k
        DCHECK(!_finished);
110
78.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
78.2k
        uint32_t to_add = cast_set<UInt32>(
126
78.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
78.2k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
78.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
78.2k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
78.2k
        _count += to_add;
134
78.2k
        _remain_element_capacity -= to_add;
135
78.2k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
78.2k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
78.2k
        memcpy(&_data[orig_size], vals, to_add_size);
158
78.2k
        return Status::OK();
159
78.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
78.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
78.3k
        DCHECK(!_finished);
110
78.3k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
78.3k
        uint32_t to_add = cast_set<UInt32>(
126
78.3k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
78.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
78.3k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
78.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
78.3k
        _count += to_add;
134
78.3k
        _remain_element_capacity -= to_add;
135
78.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
78.3k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
78.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
78.3k
        return Status::OK();
159
78.3k
    }
_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
                _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.06k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
7.06k
        DCHECK(!_finished);
110
7.06k
        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.06k
        uint32_t to_add = cast_set<UInt32>(
126
7.06k
                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.06k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
7.06k
        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.06k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
7.06k
        _count += to_add;
134
7.06k
        _remain_element_capacity -= to_add;
135
7.06k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
7.06k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
7.06k
        memcpy(&_data[orig_size], vals, to_add_size);
158
7.06k
        return Status::OK();
159
7.06k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
99
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
99
        DCHECK(!_finished);
110
99
        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
99
        uint32_t to_add = cast_set<UInt32>(
126
99
                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
99
        int to_add_size = to_add * SIZE_OF_TYPE;
129
99
        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
99
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
99
        _count += to_add;
134
99
        _remain_element_capacity -= to_add;
135
99
        _raw_data_size += to_add_size;
136
        // return added number through count
137
99
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
99
        memcpy(&_data[orig_size], vals, to_add_size);
158
99
        return Status::OK();
159
99
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
5.03k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.03k
        DCHECK(!_finished);
110
5.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
5.03k
        uint32_t to_add = cast_set<UInt32>(
126
5.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
5.03k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.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
5.03k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.03k
        _count += to_add;
134
5.03k
        _remain_element_capacity -= to_add;
135
5.03k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.03k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
5.03k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.03k
        return Status::OK();
159
5.03k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
24.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
24.3k
        DCHECK(!_finished);
110
24.3k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
24.3k
        uint32_t to_add = cast_set<UInt32>(
126
24.3k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
24.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
24.3k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
24.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
24.3k
        _count += to_add;
134
24.3k
        _remain_element_capacity -= to_add;
135
24.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
24.3k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
24.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
24.3k
        return Status::OK();
159
24.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
21.8k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
21.8k
        DCHECK(!_finished);
110
21.8k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
21.8k
        uint32_t to_add = cast_set<UInt32>(
126
21.8k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
21.8k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
21.8k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
21.8k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
21.8k
        _count += to_add;
134
21.8k
        _remain_element_capacity -= to_add;
135
21.8k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
21.8k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
21.8k
        memcpy(&_data[orig_size], vals, to_add_size);
158
21.8k
        return Status::OK();
159
21.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
1.36k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
1.36k
        DCHECK(!_finished);
110
1.36k
        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.36k
        uint32_t to_add = cast_set<UInt32>(
126
1.36k
                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.36k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
1.36k
        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.36k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
1.36k
        _count += to_add;
134
1.36k
        _remain_element_capacity -= to_add;
135
1.36k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
1.36k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
1.36k
        memcpy(&_data[orig_size], vals, to_add_size);
158
1.36k
        return Status::OK();
159
1.36k
    }
_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
                _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.60k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.60k
        DCHECK(!_finished);
110
5.60k
        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.60k
        uint32_t to_add = cast_set<UInt32>(
126
5.60k
                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.60k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.60k
        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.60k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.60k
        _count += to_add;
134
5.60k
        _remain_element_capacity -= to_add;
135
5.60k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.60k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
5.60k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.60k
        return Status::OK();
159
5.60k
    }
160
161
727k
    Status finish(OwnedSlice* slice) override {
162
727k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
727k
        return Status::OK();
164
727k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
335k
    Status finish(OwnedSlice* slice) override {
162
335k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
335k
        return Status::OK();
164
335k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
48.7k
    Status finish(OwnedSlice* slice) override {
162
48.7k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
48.7k
        return Status::OK();
164
48.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
10.2k
    Status finish(OwnedSlice* slice) override {
162
10.2k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
10.2k
        return Status::OK();
164
10.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
90.3k
    Status finish(OwnedSlice* slice) override {
162
90.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
90.3k
        return Status::OK();
164
90.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
13.8k
    Status finish(OwnedSlice* slice) override {
162
13.8k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
13.8k
        return Status::OK();
164
13.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
67.7k
    Status finish(OwnedSlice* slice) override {
162
67.7k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
67.7k
        return Status::OK();
164
67.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
10.9k
    Status finish(OwnedSlice* slice) override {
162
10.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
10.9k
        return Status::OK();
164
10.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
18.8k
    Status finish(OwnedSlice* slice) override {
162
18.8k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
18.8k
        return Status::OK();
164
18.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
205
    Status finish(OwnedSlice* slice) override {
162
205
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
205
        return Status::OK();
164
205
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
36.8k
    Status finish(OwnedSlice* slice) override {
162
36.8k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
36.8k
        return Status::OK();
164
36.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
40.2k
    Status finish(OwnedSlice* slice) override {
162
40.2k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
40.2k
        return Status::OK();
164
40.2k
    }
_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.15k
    Status finish(OwnedSlice* slice) override {
162
7.15k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.16k
        return Status::OK();
164
7.15k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
107
    Status finish(OwnedSlice* slice) override {
162
107
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
107
        return Status::OK();
164
107
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
9.49k
    Status finish(OwnedSlice* slice) override {
162
9.49k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
9.49k
        return Status::OK();
164
9.49k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
18.5k
    Status finish(OwnedSlice* slice) override {
162
18.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
18.5k
        return Status::OK();
164
18.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
15.9k
    Status finish(OwnedSlice* slice) override {
162
15.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
15.9k
        return Status::OK();
164
15.9k
    }
_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
697
    Status finish(OwnedSlice* slice) override {
162
697
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
697
        return Status::OK();
164
697
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
595
    Status finish(OwnedSlice* slice) override {
162
595
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
595
        return Status::OK();
164
595
    }
165
166
1.74M
    Status reset() override {
167
1.74M
        RETURN_IF_CATCH_EXCEPTION({
168
1.74M
            size_t block_size = _options.data_page_size;
169
1.74M
            _count = 0;
170
1.74M
            _raw_data_size = 0;
171
1.74M
            _data.clear();
172
1.74M
            _data.reserve(block_size);
173
1.74M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.74M
                    << "buffer must be naturally-aligned";
175
1.74M
            _buffer.clear();
176
1.74M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.74M
            _finished = false;
178
1.74M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.74M
        });
180
1.74M
        return Status::OK();
181
1.74M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
166
965k
    Status reset() override {
167
965k
        RETURN_IF_CATCH_EXCEPTION({
168
965k
            size_t block_size = _options.data_page_size;
169
965k
            _count = 0;
170
965k
            _raw_data_size = 0;
171
965k
            _data.clear();
172
965k
            _data.reserve(block_size);
173
965k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
965k
                    << "buffer must be naturally-aligned";
175
965k
            _buffer.clear();
176
965k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
965k
            _finished = false;
178
965k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
965k
        });
180
966k
        return Status::OK();
181
965k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
97.9k
    Status reset() override {
167
97.9k
        RETURN_IF_CATCH_EXCEPTION({
168
97.9k
            size_t block_size = _options.data_page_size;
169
97.9k
            _count = 0;
170
97.9k
            _raw_data_size = 0;
171
97.9k
            _data.clear();
172
97.9k
            _data.reserve(block_size);
173
97.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
97.9k
                    << "buffer must be naturally-aligned";
175
97.9k
            _buffer.clear();
176
97.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
97.9k
            _finished = false;
178
97.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
97.9k
        });
180
97.9k
        return Status::OK();
181
97.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
166
21.0k
    Status reset() override {
167
21.0k
        RETURN_IF_CATCH_EXCEPTION({
168
21.0k
            size_t block_size = _options.data_page_size;
169
21.0k
            _count = 0;
170
21.0k
            _raw_data_size = 0;
171
21.0k
            _data.clear();
172
21.0k
            _data.reserve(block_size);
173
21.0k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
21.0k
                    << "buffer must be naturally-aligned";
175
21.0k
            _buffer.clear();
176
21.0k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
21.0k
            _finished = false;
178
21.0k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
21.0k
        });
180
21.0k
        return Status::OK();
181
21.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
175k
    Status reset() override {
167
175k
        RETURN_IF_CATCH_EXCEPTION({
168
175k
            size_t block_size = _options.data_page_size;
169
175k
            _count = 0;
170
175k
            _raw_data_size = 0;
171
175k
            _data.clear();
172
175k
            _data.reserve(block_size);
173
175k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
175k
                    << "buffer must be naturally-aligned";
175
175k
            _buffer.clear();
176
175k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
175k
            _finished = false;
178
175k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
175k
        });
180
175k
        return Status::OK();
181
175k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
166
27.6k
    Status reset() override {
167
27.6k
        RETURN_IF_CATCH_EXCEPTION({
168
27.6k
            size_t block_size = _options.data_page_size;
169
27.6k
            _count = 0;
170
27.6k
            _raw_data_size = 0;
171
27.6k
            _data.clear();
172
27.6k
            _data.reserve(block_size);
173
27.6k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
27.6k
                    << "buffer must be naturally-aligned";
175
27.6k
            _buffer.clear();
176
27.6k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
27.6k
            _finished = false;
178
27.6k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
27.6k
        });
180
27.6k
        return Status::OK();
181
27.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
166
135k
    Status reset() override {
167
135k
        RETURN_IF_CATCH_EXCEPTION({
168
135k
            size_t block_size = _options.data_page_size;
169
135k
            _count = 0;
170
135k
            _raw_data_size = 0;
171
135k
            _data.clear();
172
135k
            _data.reserve(block_size);
173
135k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
135k
                    << "buffer must be naturally-aligned";
175
135k
            _buffer.clear();
176
135k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
135k
            _finished = false;
178
135k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
135k
        });
180
135k
        return Status::OK();
181
135k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
166
22.8k
    Status reset() override {
167
22.8k
        RETURN_IF_CATCH_EXCEPTION({
168
22.8k
            size_t block_size = _options.data_page_size;
169
22.8k
            _count = 0;
170
22.8k
            _raw_data_size = 0;
171
22.8k
            _data.clear();
172
22.8k
            _data.reserve(block_size);
173
22.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
22.8k
                    << "buffer must be naturally-aligned";
175
22.8k
            _buffer.clear();
176
22.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
22.8k
            _finished = false;
178
22.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
22.8k
        });
180
22.8k
        return Status::OK();
181
22.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
166
37.8k
    Status reset() override {
167
37.8k
        RETURN_IF_CATCH_EXCEPTION({
168
37.8k
            size_t block_size = _options.data_page_size;
169
37.8k
            _count = 0;
170
37.8k
            _raw_data_size = 0;
171
37.8k
            _data.clear();
172
37.8k
            _data.reserve(block_size);
173
37.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
37.8k
                    << "buffer must be naturally-aligned";
175
37.8k
            _buffer.clear();
176
37.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
37.8k
            _finished = false;
178
37.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
37.8k
        });
180
37.8k
        return Status::OK();
181
37.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
166
398
    Status reset() override {
167
398
        RETURN_IF_CATCH_EXCEPTION({
168
398
            size_t block_size = _options.data_page_size;
169
398
            _count = 0;
170
398
            _raw_data_size = 0;
171
398
            _data.clear();
172
398
            _data.reserve(block_size);
173
398
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
398
                    << "buffer must be naturally-aligned";
175
398
            _buffer.clear();
176
398
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
398
            _finished = false;
178
398
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
398
        });
180
398
        return Status::OK();
181
398
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
166
73.0k
    Status reset() override {
167
73.0k
        RETURN_IF_CATCH_EXCEPTION({
168
73.0k
            size_t block_size = _options.data_page_size;
169
73.0k
            _count = 0;
170
73.0k
            _raw_data_size = 0;
171
73.0k
            _data.clear();
172
73.0k
            _data.reserve(block_size);
173
73.0k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
73.0k
                    << "buffer must be naturally-aligned";
175
73.0k
            _buffer.clear();
176
73.0k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
73.0k
            _finished = false;
178
73.0k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
73.0k
        });
180
73.0k
        return Status::OK();
181
73.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
166
81.5k
    Status reset() override {
167
81.5k
        RETURN_IF_CATCH_EXCEPTION({
168
81.5k
            size_t block_size = _options.data_page_size;
169
81.5k
            _count = 0;
170
81.5k
            _raw_data_size = 0;
171
81.5k
            _data.clear();
172
81.5k
            _data.reserve(block_size);
173
81.5k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
81.5k
                    << "buffer must be naturally-aligned";
175
81.5k
            _buffer.clear();
176
81.5k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
81.5k
            _finished = false;
178
81.5k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
81.5k
        });
180
81.6k
        return Status::OK();
181
81.5k
    }
_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.2k
    Status reset() override {
167
14.2k
        RETURN_IF_CATCH_EXCEPTION({
168
14.2k
            size_t block_size = _options.data_page_size;
169
14.2k
            _count = 0;
170
14.2k
            _raw_data_size = 0;
171
14.2k
            _data.clear();
172
14.2k
            _data.reserve(block_size);
173
14.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
14.2k
                    << "buffer must be naturally-aligned";
175
14.2k
            _buffer.clear();
176
14.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
14.2k
            _finished = false;
178
14.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
14.2k
        });
180
14.3k
        return Status::OK();
181
14.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
166
299
    Status reset() override {
167
299
        RETURN_IF_CATCH_EXCEPTION({
168
299
            size_t block_size = _options.data_page_size;
169
299
            _count = 0;
170
299
            _raw_data_size = 0;
171
299
            _data.clear();
172
299
            _data.reserve(block_size);
173
299
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
299
                    << "buffer must be naturally-aligned";
175
299
            _buffer.clear();
176
299
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
299
            _finished = false;
178
299
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
299
        });
180
299
        return Status::OK();
181
299
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
166
19.0k
    Status reset() override {
167
19.0k
        RETURN_IF_CATCH_EXCEPTION({
168
19.0k
            size_t block_size = _options.data_page_size;
169
19.0k
            _count = 0;
170
19.0k
            _raw_data_size = 0;
171
19.0k
            _data.clear();
172
19.0k
            _data.reserve(block_size);
173
19.0k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
19.0k
                    << "buffer must be naturally-aligned";
175
19.0k
            _buffer.clear();
176
19.0k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
19.0k
            _finished = false;
178
19.0k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
19.0k
        });
180
19.0k
        return Status::OK();
181
19.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
30.4k
    Status reset() override {
167
30.4k
        RETURN_IF_CATCH_EXCEPTION({
168
30.4k
            size_t block_size = _options.data_page_size;
169
30.4k
            _count = 0;
170
30.4k
            _raw_data_size = 0;
171
30.4k
            _data.clear();
172
30.4k
            _data.reserve(block_size);
173
30.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
30.4k
                    << "buffer must be naturally-aligned";
175
30.4k
            _buffer.clear();
176
30.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
30.4k
            _finished = false;
178
30.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
30.4k
        });
180
30.4k
        return Status::OK();
181
30.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
166
31.7k
    Status reset() override {
167
31.7k
        RETURN_IF_CATCH_EXCEPTION({
168
31.7k
            size_t block_size = _options.data_page_size;
169
31.7k
            _count = 0;
170
31.7k
            _raw_data_size = 0;
171
31.7k
            _data.clear();
172
31.7k
            _data.reserve(block_size);
173
31.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
31.7k
                    << "buffer must be naturally-aligned";
175
31.7k
            _buffer.clear();
176
31.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
31.7k
            _finished = false;
178
31.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
31.7k
        });
180
31.7k
        return Status::OK();
181
31.7k
    }
_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.21k
        return Status::OK();
181
2.21k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Line
Count
Source
166
1.47k
    Status reset() override {
167
1.47k
        RETURN_IF_CATCH_EXCEPTION({
168
1.47k
            size_t block_size = _options.data_page_size;
169
1.47k
            _count = 0;
170
1.47k
            _raw_data_size = 0;
171
1.47k
            _data.clear();
172
1.47k
            _data.reserve(block_size);
173
1.47k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.47k
                    << "buffer must be naturally-aligned";
175
1.47k
            _buffer.clear();
176
1.47k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.47k
            _finished = false;
178
1.47k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.47k
        });
180
1.47k
        return Status::OK();
181
1.47k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
166
1.27k
    Status reset() override {
167
1.27k
        RETURN_IF_CATCH_EXCEPTION({
168
1.27k
            size_t block_size = _options.data_page_size;
169
1.27k
            _count = 0;
170
1.27k
            _raw_data_size = 0;
171
1.27k
            _data.clear();
172
1.27k
            _data.reserve(block_size);
173
1.27k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.27k
                    << "buffer must be naturally-aligned";
175
1.27k
            _buffer.clear();
176
1.27k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.27k
            _finished = false;
178
1.27k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.27k
        });
180
1.27k
        return Status::OK();
181
1.27k
    }
182
183
4
    size_t count() const override { return _count; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
183
4
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5countEv
184
185
31.6k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
16.7k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
185
2.36k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
185
957
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
2.45k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
1.53k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
754
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
761
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
185
774
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4sizeEv
Line
Count
Source
185
6
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4sizeEv
Line
Count
Source
185
1.59k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
2.10k
    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
132
    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.10k
    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
455k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
63.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
48.7k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
10.2k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
90.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
187
13.8k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
67.7k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
187
10.9k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
18.8k
    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
205
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
187
36.8k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
187
40.2k
    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.15k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
187
107
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
187
9.49k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
18.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
187
15.9k
    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
697
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
187
595
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
728k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
346k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
49.1k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
10.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
85.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
13.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
67.5k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
11.8k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
19.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
193
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
36.1k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
41.2k
            : _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
7.06k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
192
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.51k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
11.8k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
15.7k
            : _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
781
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
675
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
192
193
727k
    OwnedSlice _finish(int final_size_of_type) {
194
727k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
727k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
727k
        int padding_elems = num_elems_after_padding - _count;
199
727k
        int padding_bytes = padding_elems * final_size_of_type;
200
20.8M
        for (int i = 0; i < padding_bytes; i++) {
201
20.1M
            _data.push_back(0);
202
20.1M
        }
203
204
        // reserve enough place for compression
205
727k
        _buffer.resize(
206
727k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
727k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
727k
        int64_t bytes =
210
727k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
727k
                                         num_elems_after_padding, final_size_of_type, 0);
212
727k
        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
727k
        encode_fixed32_le(&_buffer[0], _count);
222
727k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
727k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
727k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
727k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
727k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
727k
        return _buffer.build();
229
727k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
335k
    OwnedSlice _finish(int final_size_of_type) {
194
335k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
335k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
335k
        int padding_elems = num_elems_after_padding - _count;
199
335k
        int padding_bytes = padding_elems * final_size_of_type;
200
6.57M
        for (int i = 0; i < padding_bytes; i++) {
201
6.24M
            _data.push_back(0);
202
6.24M
        }
203
204
        // reserve enough place for compression
205
335k
        _buffer.resize(
206
335k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
335k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
335k
        int64_t bytes =
210
335k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
335k
                                         num_elems_after_padding, final_size_of_type, 0);
212
335k
        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
335k
        encode_fixed32_le(&_buffer[0], _count);
222
335k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
335k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
335k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
335k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
335k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
335k
        return _buffer.build();
229
335k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
48.7k
    OwnedSlice _finish(int final_size_of_type) {
194
48.7k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
48.7k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
48.7k
        int padding_elems = num_elems_after_padding - _count;
199
48.7k
        int padding_bytes = padding_elems * final_size_of_type;
200
310k
        for (int i = 0; i < padding_bytes; i++) {
201
261k
            _data.push_back(0);
202
261k
        }
203
204
        // reserve enough place for compression
205
48.7k
        _buffer.resize(
206
48.7k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
48.7k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
48.7k
        int64_t bytes =
210
48.7k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
48.7k
                                         num_elems_after_padding, final_size_of_type, 0);
212
48.7k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
48.7k
        encode_fixed32_le(&_buffer[0], _count);
222
48.7k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
48.7k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
48.7k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
48.7k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
48.7k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
48.7k
        return _buffer.build();
229
48.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
10.2k
    OwnedSlice _finish(int final_size_of_type) {
194
10.2k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
10.2k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
10.2k
        int padding_elems = num_elems_after_padding - _count;
199
10.2k
        int padding_bytes = padding_elems * final_size_of_type;
200
108k
        for (int i = 0; i < padding_bytes; i++) {
201
97.9k
            _data.push_back(0);
202
97.9k
        }
203
204
        // reserve enough place for compression
205
10.2k
        _buffer.resize(
206
10.2k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
10.2k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
10.2k
        int64_t bytes =
210
10.2k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
10.2k
                                         num_elems_after_padding, final_size_of_type, 0);
212
10.2k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
10.2k
        encode_fixed32_le(&_buffer[0], _count);
222
10.2k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
10.2k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
10.2k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
10.2k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
10.2k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
10.2k
        return _buffer.build();
229
10.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
90.3k
    OwnedSlice _finish(int final_size_of_type) {
194
90.3k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
90.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
90.3k
        int padding_elems = num_elems_after_padding - _count;
199
90.3k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.80M
        for (int i = 0; i < padding_bytes; i++) {
201
3.71M
            _data.push_back(0);
202
3.71M
        }
203
204
        // reserve enough place for compression
205
90.3k
        _buffer.resize(
206
90.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
90.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
90.3k
        int64_t bytes =
210
90.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
90.3k
                                         num_elems_after_padding, final_size_of_type, 0);
212
90.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
90.3k
        encode_fixed32_le(&_buffer[0], _count);
222
90.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
90.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
90.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
90.3k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
90.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
90.3k
        return _buffer.build();
229
90.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
13.8k
    OwnedSlice _finish(int final_size_of_type) {
194
13.8k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
13.8k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
13.8k
        int padding_elems = num_elems_after_padding - _count;
199
13.8k
        int padding_bytes = padding_elems * final_size_of_type;
200
924k
        for (int i = 0; i < padding_bytes; i++) {
201
910k
            _data.push_back(0);
202
910k
        }
203
204
        // reserve enough place for compression
205
13.8k
        _buffer.resize(
206
13.8k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
13.8k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
13.8k
        int64_t bytes =
210
13.8k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
13.8k
                                         num_elems_after_padding, final_size_of_type, 0);
212
13.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
13.8k
        encode_fixed32_le(&_buffer[0], _count);
222
13.8k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
13.8k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
13.8k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
13.8k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
13.8k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
13.8k
        return _buffer.build();
229
13.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
67.7k
    OwnedSlice _finish(int final_size_of_type) {
194
67.7k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
67.7k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
67.7k
        int padding_elems = num_elems_after_padding - _count;
199
67.7k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.28M
        for (int i = 0; i < padding_bytes; i++) {
201
3.21M
            _data.push_back(0);
202
3.21M
        }
203
204
        // reserve enough place for compression
205
67.7k
        _buffer.resize(
206
67.7k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
67.7k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
67.7k
        int64_t bytes =
210
67.7k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
67.7k
                                         num_elems_after_padding, final_size_of_type, 0);
212
67.7k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
67.7k
        encode_fixed32_le(&_buffer[0], _count);
222
67.7k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
67.7k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
67.7k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
67.7k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
67.7k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
67.7k
        return _buffer.build();
229
67.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
10.9k
    OwnedSlice _finish(int final_size_of_type) {
194
10.9k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
10.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
10.9k
        int padding_elems = num_elems_after_padding - _count;
199
10.9k
        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.9k
        _buffer.resize(
206
10.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
10.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
10.9k
        int64_t bytes =
210
10.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
10.9k
                                         num_elems_after_padding, final_size_of_type, 0);
212
10.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
10.9k
        encode_fixed32_le(&_buffer[0], _count);
222
10.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
10.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
10.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
10.9k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
10.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
10.9k
        return _buffer.build();
229
10.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
18.8k
    OwnedSlice _finish(int final_size_of_type) {
194
18.8k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
18.8k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
18.8k
        int padding_elems = num_elems_after_padding - _count;
199
18.8k
        int padding_bytes = padding_elems * final_size_of_type;
200
860k
        for (int i = 0; i < padding_bytes; i++) {
201
841k
            _data.push_back(0);
202
841k
        }
203
204
        // reserve enough place for compression
205
18.8k
        _buffer.resize(
206
18.8k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
18.8k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
18.8k
        int64_t bytes =
210
18.8k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
18.8k
                                         num_elems_after_padding, final_size_of_type, 0);
212
18.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
18.8k
        encode_fixed32_le(&_buffer[0], _count);
222
18.8k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
18.8k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
18.8k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
18.8k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
18.8k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
18.8k
        return _buffer.build();
229
18.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
205
    OwnedSlice _finish(int final_size_of_type) {
194
205
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
205
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
205
        int padding_elems = num_elems_after_padding - _count;
199
205
        int padding_bytes = padding_elems * final_size_of_type;
200
2.83k
        for (int i = 0; i < padding_bytes; i++) {
201
2.62k
            _data.push_back(0);
202
2.62k
        }
203
204
        // reserve enough place for compression
205
205
        _buffer.resize(
206
205
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
205
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
205
        int64_t bytes =
210
205
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
205
                                         num_elems_after_padding, final_size_of_type, 0);
212
205
        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
205
        encode_fixed32_le(&_buffer[0], _count);
222
205
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
205
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
205
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
205
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
205
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
205
        return _buffer.build();
229
205
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
193
36.8k
    OwnedSlice _finish(int final_size_of_type) {
194
36.8k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
36.8k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
36.8k
        int padding_elems = num_elems_after_padding - _count;
199
36.8k
        int padding_bytes = padding_elems * final_size_of_type;
200
787k
        for (int i = 0; i < padding_bytes; i++) {
201
750k
            _data.push_back(0);
202
750k
        }
203
204
        // reserve enough place for compression
205
36.8k
        _buffer.resize(
206
36.8k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
36.8k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
36.8k
        int64_t bytes =
210
36.8k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
36.8k
                                         num_elems_after_padding, final_size_of_type, 0);
212
36.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
36.8k
        encode_fixed32_le(&_buffer[0], _count);
222
36.8k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
36.8k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
36.8k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
36.8k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
36.8k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
36.8k
        return _buffer.build();
229
36.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
193
40.2k
    OwnedSlice _finish(int final_size_of_type) {
194
40.2k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
40.2k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
40.2k
        int padding_elems = num_elems_after_padding - _count;
199
40.2k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.69M
        for (int i = 0; i < padding_bytes; i++) {
201
1.65M
            _data.push_back(0);
202
1.65M
        }
203
204
        // reserve enough place for compression
205
40.2k
        _buffer.resize(
206
40.2k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
40.2k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
40.2k
        int64_t bytes =
210
40.2k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
40.2k
                                         num_elems_after_padding, final_size_of_type, 0);
212
40.2k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
40.2k
        encode_fixed32_le(&_buffer[0], _count);
222
40.2k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
40.2k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
40.2k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
40.2k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
40.2k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
40.2k
        return _buffer.build();
229
40.2k
    }
_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.97k
        for (int i = 0; i < padding_bytes; i++) {
201
6.53k
            _data.push_back(0);
202
6.53k
        }
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.15k
    OwnedSlice _finish(int final_size_of_type) {
194
7.15k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.15k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.15k
        int padding_elems = num_elems_after_padding - _count;
199
7.15k
        int padding_bytes = padding_elems * final_size_of_type;
200
374k
        for (int i = 0; i < padding_bytes; i++) {
201
367k
            _data.push_back(0);
202
367k
        }
203
204
        // reserve enough place for compression
205
7.15k
        _buffer.resize(
206
7.15k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.15k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.15k
        int64_t bytes =
210
7.15k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.15k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.15k
        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.15k
        encode_fixed32_le(&_buffer[0], _count);
222
7.15k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.15k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.15k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.15k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.15k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.15k
        return _buffer.build();
229
7.15k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
193
107
    OwnedSlice _finish(int final_size_of_type) {
194
107
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
107
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
107
        int padding_elems = num_elems_after_padding - _count;
199
107
        int padding_bytes = padding_elems * final_size_of_type;
200
6.53k
        for (int i = 0; i < padding_bytes; i++) {
201
6.43k
            _data.push_back(0);
202
6.43k
        }
203
204
        // reserve enough place for compression
205
107
        _buffer.resize(
206
107
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
107
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
107
        int64_t bytes =
210
107
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
107
                                         num_elems_after_padding, final_size_of_type, 0);
212
107
        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
107
        encode_fixed32_le(&_buffer[0], _count);
222
107
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
107
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
107
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
107
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
107
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
107
        return _buffer.build();
229
107
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
193
9.49k
    OwnedSlice _finish(int final_size_of_type) {
194
9.49k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
9.49k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
9.49k
        int padding_elems = num_elems_after_padding - _count;
199
9.49k
        int padding_bytes = padding_elems * final_size_of_type;
200
114k
        for (int i = 0; i < padding_bytes; i++) {
201
105k
            _data.push_back(0);
202
105k
        }
203
204
        // reserve enough place for compression
205
9.49k
        _buffer.resize(
206
9.49k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
9.49k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
9.49k
        int64_t bytes =
210
9.49k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
9.49k
                                         num_elems_after_padding, final_size_of_type, 0);
212
9.49k
        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.49k
        encode_fixed32_le(&_buffer[0], _count);
222
9.49k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
9.49k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
9.49k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
9.49k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
9.49k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
9.49k
        return _buffer.build();
229
9.49k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
18.5k
    OwnedSlice _finish(int final_size_of_type) {
194
18.5k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
18.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
18.5k
        int padding_elems = num_elems_after_padding - _count;
199
18.5k
        int padding_bytes = padding_elems * final_size_of_type;
200
479k
        for (int i = 0; i < padding_bytes; i++) {
201
460k
            _data.push_back(0);
202
460k
        }
203
204
        // reserve enough place for compression
205
18.5k
        _buffer.resize(
206
18.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
18.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
18.5k
        int64_t bytes =
210
18.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
18.5k
                                         num_elems_after_padding, final_size_of_type, 0);
212
18.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
18.5k
        encode_fixed32_le(&_buffer[0], _count);
222
18.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
18.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
18.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
18.5k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
18.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
18.5k
        return _buffer.build();
229
18.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
193
15.9k
    OwnedSlice _finish(int final_size_of_type) {
194
15.9k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
15.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
15.9k
        int padding_elems = num_elems_after_padding - _count;
199
15.9k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.08M
        for (int i = 0; i < padding_bytes; i++) {
201
1.06M
            _data.push_back(0);
202
1.06M
        }
203
204
        // reserve enough place for compression
205
15.9k
        _buffer.resize(
206
15.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
15.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
15.9k
        int64_t bytes =
210
15.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
15.9k
                                         num_elems_after_padding, final_size_of_type, 0);
212
15.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
15.9k
        encode_fixed32_le(&_buffer[0], _count);
222
15.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
15.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
15.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
15.9k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
15.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
15.9k
        return _buffer.build();
229
15.9k
    }
_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
161k
        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
697
    OwnedSlice _finish(int final_size_of_type) {
194
697
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
697
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
697
        int padding_elems = num_elems_after_padding - _count;
199
697
        int padding_bytes = padding_elems * final_size_of_type;
200
14.6k
        for (int i = 0; i < padding_bytes; i++) {
201
13.9k
            _data.push_back(0);
202
13.9k
        }
203
204
        // reserve enough place for compression
205
697
        _buffer.resize(
206
697
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
697
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
697
        int64_t bytes =
210
697
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
697
                                         num_elems_after_padding, final_size_of_type, 0);
212
697
        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
697
        encode_fixed32_le(&_buffer[0], _count);
222
697
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
697
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
697
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
697
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
697
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
697
        return _buffer.build();
229
697
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
193
595
    OwnedSlice _finish(int final_size_of_type) {
194
595
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
595
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
595
        int padding_elems = num_elems_after_padding - _count;
199
595
        int padding_bytes = padding_elems * final_size_of_type;
200
47.2k
        for (int i = 0; i < padding_bytes; i++) {
201
46.6k
            _data.push_back(0);
202
46.6k
        }
203
204
        // reserve enough place for compression
205
595
        _buffer.resize(
206
595
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
595
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
595
        int64_t bytes =
210
595
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
595
                                         num_elems_after_padding, final_size_of_type, 0);
212
595
        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
595
        encode_fixed32_le(&_buffer[0], _count);
222
595
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
595
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
595
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
595
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
595
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
595
        return _buffer.build();
229
595
    }
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.28M
                                       int& size_of_element) {
253
2.28M
    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.28M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
2.28M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
2.28M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
2.28M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
2.28M
    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.28M
    switch (size_of_element) {
271
214k
    case 1:
272
257k
    case 2:
273
260k
    case 3:
274
1.47M
    case 4:
275
2.17M
    case 8:
276
2.18M
    case 12:
277
2.28M
    case 16:
278
2.28M
    case 32:
279
2.28M
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
2.28M
    }
283
2.28M
    return Status::OK();
284
2.28M
}
285
286
template <FieldType Type>
287
class BitShufflePageDecoder : public PageDecoder {
288
public:
289
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
290
1.14M
            : _data(data),
291
1.14M
              _options(options),
292
1.14M
              _parsed(false),
293
1.14M
              _num_elements(0),
294
1.14M
              _num_element_after_padding(0),
295
1.14M
              _size_of_element(0),
296
1.14M
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
516k
            : _data(data),
291
516k
              _options(options),
292
516k
              _parsed(false),
293
516k
              _num_elements(0),
294
516k
              _num_element_after_padding(0),
295
516k
              _size_of_element(0),
296
516k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
107k
            : _data(data),
291
107k
              _options(options),
292
107k
              _parsed(false),
293
107k
              _num_elements(0),
294
107k
              _num_element_after_padding(0),
295
107k
              _size_of_element(0),
296
107k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
21.5k
            : _data(data),
291
21.5k
              _options(options),
292
21.5k
              _parsed(false),
293
21.5k
              _num_elements(0),
294
21.5k
              _num_element_after_padding(0),
295
21.5k
              _size_of_element(0),
296
21.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
112k
            : _data(data),
291
112k
              _options(options),
292
112k
              _parsed(false),
293
112k
              _num_elements(0),
294
112k
              _num_element_after_padding(0),
295
112k
              _size_of_element(0),
296
112k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
21.3k
            : _data(data),
291
21.3k
              _options(options),
292
21.3k
              _parsed(false),
293
21.3k
              _num_elements(0),
294
21.3k
              _num_element_after_padding(0),
295
21.3k
              _size_of_element(0),
296
21.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
88.9k
            : _data(data),
291
88.9k
              _options(options),
292
88.9k
              _parsed(false),
293
88.9k
              _num_elements(0),
294
88.9k
              _num_element_after_padding(0),
295
88.9k
              _size_of_element(0),
296
88.9k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
19.1k
            : _data(data),
291
19.1k
              _options(options),
292
19.1k
              _parsed(false),
293
19.1k
              _num_elements(0),
294
19.1k
              _num_element_after_padding(0),
295
19.1k
              _size_of_element(0),
296
19.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
27.4k
            : _data(data),
291
27.4k
              _options(options),
292
27.4k
              _parsed(false),
293
27.4k
              _num_elements(0),
294
27.4k
              _num_element_after_padding(0),
295
27.4k
              _size_of_element(0),
296
27.4k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.55k
            : _data(data),
291
1.55k
              _options(options),
292
1.55k
              _parsed(false),
293
1.55k
              _num_elements(0),
294
1.55k
              _num_element_after_padding(0),
295
1.55k
              _size_of_element(0),
296
1.55k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
57.9k
            : _data(data),
291
57.9k
              _options(options),
292
57.9k
              _parsed(false),
293
57.9k
              _num_elements(0),
294
57.9k
              _num_element_after_padding(0),
295
57.9k
              _size_of_element(0),
296
57.9k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
64.1k
            : _data(data),
291
64.1k
              _options(options),
292
64.1k
              _parsed(false),
293
64.1k
              _num_elements(0),
294
64.1k
              _num_element_after_padding(0),
295
64.1k
              _size_of_element(0),
296
64.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
2.47k
            : _data(data),
291
2.47k
              _options(options),
292
2.47k
              _parsed(false),
293
2.47k
              _num_elements(0),
294
2.47k
              _num_element_after_padding(0),
295
2.47k
              _size_of_element(0),
296
2.47k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
14.9k
            : _data(data),
291
14.9k
              _options(options),
292
14.9k
              _parsed(false),
293
14.9k
              _num_elements(0),
294
14.9k
              _num_element_after_padding(0),
295
14.9k
              _size_of_element(0),
296
14.9k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.34k
            : _data(data),
291
1.34k
              _options(options),
292
1.34k
              _parsed(false),
293
1.34k
              _num_elements(0),
294
1.34k
              _num_element_after_padding(0),
295
1.34k
              _size_of_element(0),
296
1.34k
              _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
39.9k
            : _data(data),
291
39.9k
              _options(options),
292
39.9k
              _parsed(false),
293
39.9k
              _num_elements(0),
294
39.9k
              _num_element_after_padding(0),
295
39.9k
              _size_of_element(0),
296
39.9k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
29.3k
            : _data(data),
291
29.3k
              _options(options),
292
29.3k
              _parsed(false),
293
29.3k
              _num_elements(0),
294
29.3k
              _num_element_after_padding(0),
295
29.3k
              _size_of_element(0),
296
29.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.75k
            : _data(data),
291
1.75k
              _options(options),
292
1.75k
              _parsed(false),
293
1.75k
              _num_elements(0),
294
1.75k
              _num_element_after_padding(0),
295
1.75k
              _size_of_element(0),
296
1.75k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.18k
            : _data(data),
291
1.18k
              _options(options),
292
1.18k
              _parsed(false),
293
1.18k
              _num_elements(0),
294
1.18k
              _num_element_after_padding(0),
295
1.18k
              _size_of_element(0),
296
1.18k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.08k
            : _data(data),
291
1.08k
              _options(options),
292
1.08k
              _parsed(false),
293
1.08k
              _num_elements(0),
294
1.08k
              _num_element_after_padding(0),
295
1.08k
              _size_of_element(0),
296
1.08k
              _cur_index(0) {}
297
298
1.14M
    Status init() override {
299
1.14M
        CHECK(!_parsed);
300
1.14M
        size_t unused;
301
1.14M
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.14M
                                                 _num_element_after_padding, _size_of_element));
303
304
1.14M
        if (_data.size !=
305
1.14M
            _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.14M
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.14M
                     _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.14M
        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.14M
        _parsed = true;
325
1.14M
        return Status::OK();
326
1.14M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
298
515k
    Status init() override {
299
515k
        CHECK(!_parsed);
300
515k
        size_t unused;
301
515k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
515k
                                                 _num_element_after_padding, _size_of_element));
303
304
515k
        if (_data.size !=
305
515k
            _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
515k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
515k
                     _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
515k
        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
515k
        _parsed = true;
325
515k
        return Status::OK();
326
515k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
107k
    Status init() override {
299
107k
        CHECK(!_parsed);
300
107k
        size_t unused;
301
107k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
107k
                                                 _num_element_after_padding, _size_of_element));
303
304
107k
        if (_data.size !=
305
107k
            _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
107k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
107k
                     _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
107k
        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
107k
        _parsed = true;
325
107k
        return Status::OK();
326
107k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
21.5k
    Status init() override {
299
21.5k
        CHECK(!_parsed);
300
21.5k
        size_t unused;
301
21.5k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
21.5k
                                                 _num_element_after_padding, _size_of_element));
303
304
21.5k
        if (_data.size !=
305
21.5k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
21.5k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
21.5k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
21.5k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
21.5k
        _parsed = true;
325
21.5k
        return Status::OK();
326
21.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
112k
    Status init() override {
299
112k
        CHECK(!_parsed);
300
112k
        size_t unused;
301
112k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
112k
                                                 _num_element_after_padding, _size_of_element));
303
304
112k
        if (_data.size !=
305
112k
            _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
112k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
112k
                     _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
112k
        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
112k
        _parsed = true;
325
112k
        return Status::OK();
326
112k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
298
21.3k
    Status init() override {
299
21.3k
        CHECK(!_parsed);
300
21.3k
        size_t unused;
301
21.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
21.3k
                                                 _num_element_after_padding, _size_of_element));
303
304
21.3k
        if (_data.size !=
305
21.3k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
21.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
21.3k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
21.3k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
21.3k
        _parsed = true;
325
21.3k
        return Status::OK();
326
21.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
298
88.9k
    Status init() override {
299
88.9k
        CHECK(!_parsed);
300
88.9k
        size_t unused;
301
88.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
88.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
88.9k
        if (_data.size !=
305
88.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
88.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
88.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
88.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
88.9k
        _parsed = true;
325
88.9k
        return Status::OK();
326
88.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
298
19.1k
    Status init() override {
299
19.1k
        CHECK(!_parsed);
300
19.1k
        size_t unused;
301
19.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
19.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
19.1k
        if (_data.size !=
305
19.1k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
19.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
19.1k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
19.1k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
19.1k
        _parsed = true;
325
19.1k
        return Status::OK();
326
19.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
298
27.4k
    Status init() override {
299
27.4k
        CHECK(!_parsed);
300
27.4k
        size_t unused;
301
27.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
27.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
27.4k
        if (_data.size !=
305
27.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
27.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
27.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
27.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
27.4k
        _parsed = true;
325
27.4k
        return Status::OK();
326
27.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
1.55k
    Status init() override {
299
1.55k
        CHECK(!_parsed);
300
1.55k
        size_t unused;
301
1.55k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.55k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.55k
        if (_data.size !=
305
1.55k
            _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.55k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.55k
                     _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.55k
        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.55k
        _parsed = true;
325
1.55k
        return Status::OK();
326
1.55k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
57.9k
    Status init() override {
299
57.9k
        CHECK(!_parsed);
300
57.9k
        size_t unused;
301
57.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
57.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
57.9k
        if (_data.size !=
305
57.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
57.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
57.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
57.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
57.9k
        _parsed = true;
325
57.9k
        return Status::OK();
326
57.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
298
64.0k
    Status init() override {
299
64.0k
        CHECK(!_parsed);
300
64.0k
        size_t unused;
301
64.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
64.0k
                                                 _num_element_after_padding, _size_of_element));
303
304
64.0k
        if (_data.size !=
305
64.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
64.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
64.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
64.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
64.0k
        _parsed = true;
325
64.0k
        return Status::OK();
326
64.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
298
2.47k
    Status init() override {
299
2.47k
        CHECK(!_parsed);
300
2.47k
        size_t unused;
301
2.47k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
2.47k
                                                 _num_element_after_padding, _size_of_element));
303
304
2.47k
        if (_data.size !=
305
2.47k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
2.47k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
2.47k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
2.47k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
2.47k
        _parsed = true;
325
2.47k
        return Status::OK();
326
2.47k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
298
14.9k
    Status init() override {
299
14.9k
        CHECK(!_parsed);
300
14.9k
        size_t unused;
301
14.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
14.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
14.9k
        if (_data.size !=
305
14.9k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
14.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
14.9k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
14.9k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
14.9k
        _parsed = true;
325
14.9k
        return Status::OK();
326
14.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
298
1.34k
    Status init() override {
299
1.34k
        CHECK(!_parsed);
300
1.34k
        size_t unused;
301
1.34k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.34k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.34k
        if (_data.size !=
305
1.34k
            _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.34k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.34k
                     _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.34k
        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.34k
        _parsed = true;
325
1.34k
        return Status::OK();
326
1.34k
    }
_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
39.9k
    Status init() override {
299
39.9k
        CHECK(!_parsed);
300
39.9k
        size_t unused;
301
39.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
39.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
39.9k
        if (_data.size !=
305
39.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
39.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
39.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
39.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
39.9k
        _parsed = true;
325
39.9k
        return Status::OK();
326
39.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
298
29.3k
    Status init() override {
299
29.3k
        CHECK(!_parsed);
300
29.3k
        size_t unused;
301
29.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
29.3k
                                                 _num_element_after_padding, _size_of_element));
303
304
29.3k
        if (_data.size !=
305
29.3k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
29.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
29.3k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
29.3k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
29.3k
        _parsed = true;
325
29.3k
        return Status::OK();
326
29.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
298
1.75k
    Status init() override {
299
1.75k
        CHECK(!_parsed);
300
1.75k
        size_t unused;
301
1.75k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.75k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.75k
        if (_data.size !=
305
1.75k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.75k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.75k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.75k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.75k
        _parsed = true;
325
1.75k
        return Status::OK();
326
1.75k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
298
1.18k
    Status init() override {
299
1.18k
        CHECK(!_parsed);
300
1.18k
        size_t unused;
301
1.18k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.18k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.18k
        if (_data.size !=
305
1.18k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.18k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.18k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.18k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.18k
        _parsed = true;
325
1.18k
        return Status::OK();
326
1.18k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
298
1.08k
    Status init() override {
299
1.08k
        CHECK(!_parsed);
300
1.08k
        size_t unused;
301
1.08k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.08k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.08k
        if (_data.size !=
305
1.08k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.08k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.08k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.08k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.08k
        _parsed = true;
325
1.08k
        return Status::OK();
326
1.08k
    }
327
328
    // If the page only contains null, then _num_elements == 0, and the nullmap has
329
    // some value. But in _seek_columns --> seek_to_ordinal --> _seek_to_pos_in_page
330
    // in this call stack it will pass pos == 0 to this method. Although we can add some
331
    // code such as check if the count == 0, then skip seek, but there are other method such
332
    // as init will also call seek with pos == 0. And the seek is useless when _num_elements
333
    // == 0, because next batch will return empty in this method.
334
4.45M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
4.45M
        if (_num_elements == 0) [[unlikely]] {
337
6.76k
            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.76k
        }
342
343
4.45M
        DCHECK_LE(pos, _num_elements);
344
4.45M
        _cur_index = pos;
345
4.45M
        return Status::OK();
346
4.45M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.99M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
1.99M
        if (_num_elements == 0) [[unlikely]] {
337
2.76k
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
2.76k
        }
342
343
1.99M
        DCHECK_LE(pos, _num_elements);
344
1.99M
        _cur_index = pos;
345
1.99M
        return Status::OK();
346
1.99M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
307k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
307k
        if (_num_elements == 0) [[unlikely]] {
337
531
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
531
        }
342
343
307k
        DCHECK_LE(pos, _num_elements);
344
307k
        _cur_index = pos;
345
307k
        return Status::OK();
346
307k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
229k
    Status seek_to_position_in_page(size_t pos) override {
335
229k
        DCHECK(_parsed) << "Must call init()";
336
229k
        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
229k
        DCHECK_LE(pos, _num_elements);
344
229k
        _cur_index = pos;
345
229k
        return Status::OK();
346
229k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
159k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
159k
        if (_num_elements == 0) [[unlikely]] {
337
642
            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
642
        }
342
343
159k
        DCHECK_LE(pos, _num_elements);
344
159k
        _cur_index = pos;
345
159k
        return Status::OK();
346
159k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
334
130k
    Status seek_to_position_in_page(size_t pos) override {
335
130k
        DCHECK(_parsed) << "Must call init()";
336
130k
        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
130k
        DCHECK_LE(pos, _num_elements);
344
130k
        _cur_index = pos;
345
130k
        return Status::OK();
346
130k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
334
11.8k
    Status seek_to_position_in_page(size_t pos) override {
335
11.8k
        DCHECK(_parsed) << "Must call init()";
336
11.8k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
11.8k
        DCHECK_LE(pos, _num_elements);
344
11.8k
        _cur_index = pos;
345
11.8k
        return Status::OK();
346
11.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
235k
    Status seek_to_position_in_page(size_t pos) override {
335
235k
        DCHECK(_parsed) << "Must call init()";
336
235k
        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
235k
        DCHECK_LE(pos, _num_elements);
344
235k
        _cur_index = pos;
345
235k
        return Status::OK();
346
235k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
334
208k
    Status seek_to_position_in_page(size_t pos) override {
335
208k
        DCHECK(_parsed) << "Must call init()";
336
208k
        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
208k
        DCHECK_LE(pos, _num_elements);
344
208k
        _cur_index = pos;
345
208k
        return Status::OK();
346
208k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
334
219k
    Status seek_to_position_in_page(size_t pos) override {
335
219k
        DCHECK(_parsed) << "Must call init()";
336
219k
        if (_num_elements == 0) [[unlikely]] {
337
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
219k
        DCHECK_LE(pos, _num_elements);
344
219k
        _cur_index = pos;
345
219k
        return Status::OK();
346
219k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
334
515k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
515k
        if (_num_elements == 0) [[unlikely]] {
337
1.46k
            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.46k
        }
342
343
515k
        DCHECK_LE(pos, _num_elements);
344
515k
        _cur_index = pos;
345
515k
        return Status::OK();
346
515k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
334
79.1k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
79.1k
        if (_num_elements == 0) [[unlikely]] {
337
14
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
14
        }
342
343
79.1k
        DCHECK_LE(pos, _num_elements);
344
79.1k
        _cur_index = pos;
345
79.1k
        return Status::OK();
346
79.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
207k
    Status seek_to_position_in_page(size_t pos) override {
335
207k
        DCHECK(_parsed) << "Must call init()";
336
207k
        if (_num_elements == 0) [[unlikely]] {
337
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
207k
        DCHECK_LE(pos, _num_elements);
344
207k
        _cur_index = pos;
345
207k
        return Status::OK();
346
207k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
334
6.76k
    Status seek_to_position_in_page(size_t pos) override {
335
6.76k
        DCHECK(_parsed) << "Must call init()";
336
6.76k
        if (_num_elements == 0) [[unlikely]] {
337
353
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
353
        }
342
343
6.76k
        DCHECK_LE(pos, _num_elements);
344
6.76k
        _cur_index = pos;
345
6.76k
        return Status::OK();
346
6.76k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
Line
Count
Source
334
32
    Status seek_to_position_in_page(size_t pos) override {
335
32
        DCHECK(_parsed) << "Must call init()";
336
32
        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
32
        DCHECK_LE(pos, _num_elements);
344
32
        _cur_index = pos;
345
32
        return Status::OK();
346
32
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Line
Count
Source
334
862
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
862
        if (_num_elements == 0) [[unlikely]] {
337
25
            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
25
        }
342
343
862
        DCHECK_LE(pos, _num_elements);
344
862
        _cur_index = pos;
345
862
        return Status::OK();
346
862
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
334
16.8k
    Status seek_to_position_in_page(size_t pos) override {
335
16.8k
        DCHECK(_parsed) << "Must call init()";
336
16.8k
        if (_num_elements == 0) [[unlikely]] {
337
716
            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
716
        }
342
343
16.8k
        DCHECK_LE(pos, _num_elements);
344
16.8k
        _cur_index = pos;
345
16.8k
        return Status::OK();
346
16.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Line
Count
Source
334
127k
    Status seek_to_position_in_page(size_t pos) override {
335
127k
        DCHECK(_parsed) << "Must call init()";
336
127k
        if (_num_elements == 0) [[unlikely]] {
337
234
            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
234
        }
342
343
127k
        DCHECK_LE(pos, _num_elements);
344
127k
        _cur_index = pos;
345
127k
        return Status::OK();
346
127k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.97k
    Status seek_to_position_in_page(size_t pos) override {
335
1.97k
        DCHECK(_parsed) << "Must call init()";
336
1.97k
        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.97k
        DCHECK_LE(pos, _num_elements);
344
1.97k
        _cur_index = pos;
345
1.97k
        return Status::OK();
346
1.97k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE24seek_to_position_in_pageEm
Line
Count
Source
334
50
    Status seek_to_position_in_page(size_t pos) override {
335
50
        DCHECK(_parsed) << "Must call init()";
336
50
        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
50
        DCHECK_LE(pos, _num_elements);
344
50
        _cur_index = pos;
345
50
        return Status::OK();
346
50
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE24seek_to_position_in_pageEm
Line
Count
Source
334
89
    Status seek_to_position_in_page(size_t pos) override {
335
89
        DCHECK(_parsed) << "Must call init()";
336
89
        if (_num_elements == 0) [[unlikely]] {
337
1
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
1
        }
342
343
89
        DCHECK_LE(pos, _num_elements);
344
89
        _cur_index = pos;
345
89
        return Status::OK();
346
89
    }
347
348
0
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
349
0
        DCHECK(_parsed) << "Must call init() firstly";
350
351
0
        if (_num_elements == 0) {
352
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
353
0
        }
354
355
0
        size_t left = 0;
356
0
        size_t right = _num_elements;
357
358
0
        void* mid_value = nullptr;
359
360
        // find the first value >= target. after loop,
361
        // - left == index of first value >= target when found
362
        // - left == _num_elements when not found (all values < target)
363
0
        while (left < right) {
364
0
            size_t mid = left + (right - left) / 2;
365
0
            mid_value = get_data(mid);
366
0
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
367
0
                left = mid + 1;
368
0
            } else {
369
0
                right = mid;
370
0
            }
371
0
        }
372
0
        if (left >= _num_elements) {
373
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
374
0
        }
375
0
        void* find_value = get_data(left);
376
0
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
377
0
            *exact_match = true;
378
0
        } else {
379
0
            *exact_match = false;
380
0
        }
381
382
0
        _cur_index = left;
383
0
        return Status::OK();
384
0
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE22seek_at_or_after_valueEPKvPb
385
386
    template <bool forward_index = true>
387
1.89M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.89M
        DCHECK(_parsed);
389
1.89M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.89M
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.89M
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.89M
        *n = max_fetch;
398
1.89M
        if constexpr (forward_index) {
399
1.72M
            _cur_index += max_fetch;
400
1.72M
        }
401
402
1.89M
        return Status::OK();
403
1.89M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
637k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
637k
        DCHECK(_parsed);
389
637k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
637k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
637k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
637k
        *n = max_fetch;
398
637k
        if constexpr (forward_index) {
399
637k
            _cur_index += max_fetch;
400
637k
        }
401
402
637k
        return Status::OK();
403
637k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
211k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
211k
        DCHECK(_parsed);
389
212k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
211k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
211k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
211k
        *n = max_fetch;
398
211k
        if constexpr (forward_index) {
399
211k
            _cur_index += max_fetch;
400
211k
        }
401
402
211k
        return Status::OK();
403
211k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
18.3k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
18.3k
        DCHECK(_parsed);
389
18.3k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
18.3k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
18.3k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
18.3k
        *n = max_fetch;
398
18.3k
        if constexpr (forward_index) {
399
18.3k
            _cur_index += max_fetch;
400
18.3k
        }
401
402
18.3k
        return Status::OK();
403
18.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
99.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
99.4k
        DCHECK(_parsed);
389
99.4k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
99.4k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
99.4k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
99.4k
        *n = max_fetch;
398
99.4k
        if constexpr (forward_index) {
399
99.4k
            _cur_index += max_fetch;
400
99.4k
        }
401
402
99.4k
        return Status::OK();
403
99.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
31.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
31.0k
        DCHECK(_parsed);
389
31.0k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
31.0k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
31.0k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
31.0k
        *n = max_fetch;
398
31.0k
        if constexpr (forward_index) {
399
31.0k
            _cur_index += max_fetch;
400
31.0k
        }
401
402
31.0k
        return Status::OK();
403
31.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
131k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
131k
        DCHECK(_parsed);
389
131k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
131k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
131k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
131k
        *n = max_fetch;
398
131k
        if constexpr (forward_index) {
399
131k
            _cur_index += max_fetch;
400
131k
        }
401
402
131k
        return Status::OK();
403
131k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
166k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
166k
        DCHECK(_parsed);
389
166k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
166k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
166k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
166k
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
166k
        return Status::OK();
403
166k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
13.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
13.7k
        DCHECK(_parsed);
389
13.7k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
13.7k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
13.7k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
13.7k
        *n = max_fetch;
398
13.7k
        if constexpr (forward_index) {
399
13.7k
            _cur_index += max_fetch;
400
13.7k
        }
401
402
13.7k
        return Status::OK();
403
13.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
19.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
19.4k
        DCHECK(_parsed);
389
19.4k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
19.4k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
19.4k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
19.4k
        *n = max_fetch;
398
19.4k
        if constexpr (forward_index) {
399
19.4k
            _cur_index += max_fetch;
400
19.4k
        }
401
402
19.4k
        return Status::OK();
403
19.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.46k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.46k
        DCHECK(_parsed);
389
3.46k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.46k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.46k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.46k
        *n = max_fetch;
398
3.46k
        if constexpr (forward_index) {
399
3.46k
            _cur_index += max_fetch;
400
3.46k
        }
401
402
3.46k
        return Status::OK();
403
3.46k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
393k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
393k
        DCHECK(_parsed);
389
393k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
393k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
393k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
393k
        *n = max_fetch;
398
393k
        if constexpr (forward_index) {
399
393k
            _cur_index += max_fetch;
400
393k
        }
401
402
393k
        return Status::OK();
403
393k
    }
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.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
78.5k
        DCHECK(_parsed);
389
78.5k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
78.5k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
78.5k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
78.5k
        *n = max_fetch;
398
78.5k
        if constexpr (forward_index) {
399
78.5k
            _cur_index += max_fetch;
400
78.5k
        }
401
402
78.5k
        return Status::OK();
403
78.5k
    }
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.45k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.45k
        DCHECK(_parsed);
389
1.45k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.45k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.45k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.45k
        *n = max_fetch;
398
1.45k
        if constexpr (forward_index) {
399
1.45k
            _cur_index += max_fetch;
400
1.45k
        }
401
402
1.45k
        return Status::OK();
403
1.45k
    }
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.64k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
7.64k
        DCHECK(_parsed);
389
7.64k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
7.64k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
7.64k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
7.64k
        *n = max_fetch;
398
7.64k
        if constexpr (forward_index) {
399
7.64k
            _cur_index += max_fetch;
400
7.64k
        }
401
402
7.64k
        return Status::OK();
403
7.64k
    }
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.22k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.22k
        DCHECK(_parsed);
389
1.22k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.22k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.22k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.22k
        *n = max_fetch;
398
1.22k
        if constexpr (forward_index) {
399
1.22k
            _cur_index += max_fetch;
400
1.22k
        }
401
402
1.22k
        return Status::OK();
403
1.22k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
8.22k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
8.22k
        DCHECK(_parsed);
389
8.22k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
8.22k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
8.22k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
8.22k
        *n = max_fetch;
398
8.22k
        if constexpr (forward_index) {
399
8.22k
            _cur_index += max_fetch;
400
8.22k
        }
401
402
8.22k
        return Status::OK();
403
8.22k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
30.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
30.7k
        DCHECK(_parsed);
389
30.7k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
30.7k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
30.7k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
30.7k
        *n = max_fetch;
398
30.7k
        if constexpr (forward_index) {
399
30.7k
            _cur_index += max_fetch;
400
30.7k
        }
401
402
30.7k
        return Status::OK();
403
30.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
25.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
25.4k
        DCHECK(_parsed);
389
25.4k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
25.4k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
25.4k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
25.4k
        *n = max_fetch;
398
25.4k
        if constexpr (forward_index) {
399
25.4k
            _cur_index += max_fetch;
400
25.4k
        }
401
402
25.4k
        return Status::OK();
403
25.4k
    }
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.18k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.18k
        DCHECK(_parsed);
389
3.18k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.18k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.18k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.18k
        *n = max_fetch;
398
3.18k
        if constexpr (forward_index) {
399
3.18k
            _cur_index += max_fetch;
400
3.18k
        }
401
402
3.18k
        return Status::OK();
403
3.18k
    }
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.23k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.23k
        DCHECK(_parsed);
389
3.24k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.23k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.23k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.23k
        *n = max_fetch;
398
3.23k
        if constexpr (forward_index) {
399
3.23k
            _cur_index += max_fetch;
400
3.23k
        }
401
402
3.23k
        return Status::OK();
403
3.23k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
5.75k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
5.75k
        DCHECK(_parsed);
389
5.75k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
5.75k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
5.75k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
5.75k
        *n = max_fetch;
398
5.75k
        if constexpr (forward_index) {
399
5.75k
            _cur_index += max_fetch;
400
5.75k
        }
401
402
5.75k
        return Status::OK();
403
5.75k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
404
405
1.72M
    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
637k
    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
212k
    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
18.3k
    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
99.4k
    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
31.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
132k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
13.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
19.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
3.46k
    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
393k
    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.5k
    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.45k
    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.64k
    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.22k
    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
8.23k
    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
30.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
25.4k
    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.18k
    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.23k
    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.75k
    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
382k
                          MutableColumnPtr& dst) override {
409
382k
        DCHECK(_parsed);
410
382k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
382k
        auto total = *n;
416
382k
        auto read_count = 0;
417
382k
        _buffer.resize(total);
418
141M
        for (size_t i = 0; i < total; ++i) {
419
141M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
141M
            if (UNLIKELY(ord >= _num_elements)) {
421
13.0k
                break;
422
13.0k
            }
423
424
141M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
141M
        }
426
427
382k
        if (LIKELY(read_count > 0)) {
428
382k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
382k
        }
430
431
382k
        *n = read_count;
432
382k
        return Status::OK();
433
382k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
83.0k
                          MutableColumnPtr& dst) override {
409
83.0k
        DCHECK(_parsed);
410
83.0k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
83.0k
        auto total = *n;
416
83.0k
        auto read_count = 0;
417
83.0k
        _buffer.resize(total);
418
47.9M
        for (size_t i = 0; i < total; ++i) {
419
47.8M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
47.8M
            if (UNLIKELY(ord >= _num_elements)) {
421
926
                break;
422
926
            }
423
424
47.8M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
47.8M
        }
426
427
83.0k
        if (LIKELY(read_count > 0)) {
428
83.0k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
83.0k
        }
430
431
83.0k
        *n = read_count;
432
83.0k
        return Status::OK();
433
83.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
30.0k
                          MutableColumnPtr& dst) override {
409
30.0k
        DCHECK(_parsed);
410
30.0k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
30.0k
        auto total = *n;
416
30.0k
        auto read_count = 0;
417
30.0k
        _buffer.resize(total);
418
1.84M
        for (size_t i = 0; i < total; ++i) {
419
1.81M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.81M
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
1.81M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.81M
        }
426
427
30.1k
        if (LIKELY(read_count > 0)) {
428
30.1k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
30.1k
        }
430
431
30.0k
        *n = read_count;
432
30.0k
        return Status::OK();
433
30.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
9.78k
                          MutableColumnPtr& dst) override {
409
9.78k
        DCHECK(_parsed);
410
9.78k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
9.78k
        auto total = *n;
416
9.78k
        auto read_count = 0;
417
9.78k
        _buffer.resize(total);
418
628k
        for (size_t i = 0; i < total; ++i) {
419
618k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
618k
            if (UNLIKELY(ord >= _num_elements)) {
421
13
                break;
422
13
            }
423
424
618k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
618k
        }
426
427
9.78k
        if (LIKELY(read_count > 0)) {
428
9.78k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
9.78k
        }
430
431
9.78k
        *n = read_count;
432
9.78k
        return Status::OK();
433
9.78k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
70.2k
                          MutableColumnPtr& dst) override {
409
70.2k
        DCHECK(_parsed);
410
70.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
70.2k
        auto total = *n;
416
70.2k
        auto read_count = 0;
417
70.2k
        _buffer.resize(total);
418
28.4M
        for (size_t i = 0; i < total; ++i) {
419
28.3M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
28.3M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.58k
                break;
422
1.58k
            }
423
424
28.3M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
28.3M
        }
426
427
70.2k
        if (LIKELY(read_count > 0)) {
428
70.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
70.2k
        }
430
431
70.2k
        *n = read_count;
432
70.2k
        return Status::OK();
433
70.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
10.1k
                          MutableColumnPtr& dst) override {
409
10.1k
        DCHECK(_parsed);
410
10.1k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
10.1k
        auto total = *n;
416
10.1k
        auto read_count = 0;
417
10.1k
        _buffer.resize(total);
418
1.28M
        for (size_t i = 0; i < total; ++i) {
419
1.27M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.27M
            if (UNLIKELY(ord >= _num_elements)) {
421
579
                break;
422
579
            }
423
424
1.27M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.27M
        }
426
427
10.1k
        if (LIKELY(read_count > 0)) {
428
10.1k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
10.1k
        }
430
431
10.1k
        *n = read_count;
432
10.1k
        return Status::OK();
433
10.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
33.5k
                          MutableColumnPtr& dst) override {
409
33.5k
        DCHECK(_parsed);
410
33.5k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
33.5k
        auto total = *n;
416
33.5k
        auto read_count = 0;
417
33.5k
        _buffer.resize(total);
418
7.55M
        for (size_t i = 0; i < total; ++i) {
419
7.52M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
7.52M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.92k
                break;
422
1.92k
            }
423
424
7.52M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
7.52M
        }
426
427
33.5k
        if (LIKELY(read_count > 0)) {
428
33.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
33.5k
        }
430
431
33.5k
        *n = read_count;
432
33.5k
        return Status::OK();
433
33.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
9.95k
                          MutableColumnPtr& dst) override {
409
9.95k
        DCHECK(_parsed);
410
9.95k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
9.95k
        auto total = *n;
416
9.95k
        auto read_count = 0;
417
9.95k
        _buffer.resize(total);
418
1.21M
        for (size_t i = 0; i < total; ++i) {
419
1.20M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.20M
            if (UNLIKELY(ord >= _num_elements)) {
421
31
                break;
422
31
            }
423
424
1.20M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.20M
        }
426
427
9.95k
        if (LIKELY(read_count > 0)) {
428
9.95k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
9.95k
        }
430
431
9.95k
        *n = read_count;
432
9.95k
        return Status::OK();
433
9.95k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.6k
                          MutableColumnPtr& dst) override {
409
13.6k
        DCHECK(_parsed);
410
13.6k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.6k
        auto total = *n;
416
13.6k
        auto read_count = 0;
417
13.6k
        _buffer.resize(total);
418
1.99M
        for (size_t i = 0; i < total; ++i) {
419
1.97M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.97M
            if (UNLIKELY(ord >= _num_elements)) {
421
405
                break;
422
405
            }
423
424
1.97M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.97M
        }
426
427
13.6k
        if (LIKELY(read_count > 0)) {
428
13.6k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.6k
        }
430
431
13.6k
        *n = read_count;
432
13.6k
        return Status::OK();
433
13.6k
    }
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.34k
                          MutableColumnPtr& dst) override {
409
1.34k
        DCHECK(_parsed);
410
1.34k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.34k
        auto total = *n;
416
1.34k
        auto read_count = 0;
417
1.34k
        _buffer.resize(total);
418
502k
        for (size_t i = 0; i < total; ++i) {
419
500k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
500k
            if (UNLIKELY(ord >= _num_elements)) {
421
15
                break;
422
15
            }
423
424
500k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
500k
        }
426
427
1.34k
        if (LIKELY(read_count > 0)) {
428
1.34k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.34k
        }
430
431
1.34k
        *n = read_count;
432
1.34k
        return Status::OK();
433
1.34k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
29.5k
                          MutableColumnPtr& dst) override {
409
29.5k
        DCHECK(_parsed);
410
29.5k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
29.5k
        auto total = *n;
416
29.5k
        auto read_count = 0;
417
29.5k
        _buffer.resize(total);
418
7.58M
        for (size_t i = 0; i < total; ++i) {
419
7.55M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
7.55M
            if (UNLIKELY(ord >= _num_elements)) {
421
787
                break;
422
787
            }
423
424
7.55M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
7.55M
        }
426
427
29.5k
        if (LIKELY(read_count > 0)) {
428
29.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
29.5k
        }
430
431
29.5k
        *n = read_count;
432
29.5k
        return Status::OK();
433
29.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
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.52M
        for (size_t i = 0; i < total; ++i) {
419
9.49M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.49M
            if (UNLIKELY(ord >= _num_elements)) {
421
189
                break;
422
189
            }
423
424
9.49M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.49M
        }
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.89k
                          MutableColumnPtr& dst) override {
409
1.89k
        DCHECK(_parsed);
410
1.89k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.89k
        auto total = *n;
416
1.89k
        auto read_count = 0;
417
1.89k
        _buffer.resize(total);
418
506k
        for (size_t i = 0; i < total; ++i) {
419
505k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
505k
            if (UNLIKELY(ord >= _num_elements)) {
421
245
                break;
422
245
            }
423
424
504k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
504k
        }
426
427
1.89k
        if (LIKELY(read_count > 0)) {
428
1.89k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.89k
        }
430
431
1.89k
        *n = read_count;
432
1.89k
        return Status::OK();
433
1.89k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
11.7k
                          MutableColumnPtr& dst) override {
409
11.7k
        DCHECK(_parsed);
410
11.7k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
11.7k
        auto total = *n;
416
11.7k
        auto read_count = 0;
417
11.7k
        _buffer.resize(total);
418
24.9k
        for (size_t i = 0; i < total; ++i) {
419
13.2k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
13.2k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
13.2k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
13.2k
        }
426
427
11.7k
        if (LIKELY(read_count > 0)) {
428
11.7k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
11.7k
        }
430
431
11.7k
        *n = read_count;
432
11.7k
        return Status::OK();
433
11.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
139
                          MutableColumnPtr& dst) override {
409
139
        DCHECK(_parsed);
410
139
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
139
        auto total = *n;
416
139
        auto read_count = 0;
417
139
        _buffer.resize(total);
418
283
        for (size_t i = 0; i < total; ++i) {
419
144
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
144
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
144
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
144
        }
426
427
139
        if (LIKELY(read_count > 0)) {
428
139
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
139
        }
430
431
139
        *n = read_count;
432
139
        return Status::OK();
433
139
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4.54k
                          MutableColumnPtr& dst) override {
409
4.54k
        DCHECK(_parsed);
410
4.54k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.54k
        auto total = *n;
416
4.54k
        auto read_count = 0;
417
4.54k
        _buffer.resize(total);
418
19.1k
        for (size_t i = 0; i < total; ++i) {
419
14.6k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.6k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
14.6k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.6k
        }
426
427
4.54k
        if (LIKELY(read_count > 0)) {
428
4.54k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.54k
        }
430
431
4.54k
        *n = read_count;
432
4.54k
        return Status::OK();
433
4.54k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
26.1k
                          MutableColumnPtr& dst) override {
409
26.1k
        DCHECK(_parsed);
410
26.1k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
26.1k
        auto total = *n;
416
26.1k
        auto read_count = 0;
417
26.1k
        _buffer.resize(total);
418
23.4M
        for (size_t i = 0; i < total; ++i) {
419
23.4M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
23.4M
            if (UNLIKELY(ord >= _num_elements)) {
421
5.59k
                break;
422
5.59k
            }
423
424
23.4M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
23.4M
        }
426
427
26.1k
        if (LIKELY(read_count > 0)) {
428
26.1k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
26.1k
        }
430
431
26.1k
        *n = read_count;
432
26.1k
        return Status::OK();
433
26.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.3k
                          MutableColumnPtr& dst) override {
409
13.3k
        DCHECK(_parsed);
410
13.3k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.3k
        auto total = *n;
416
13.3k
        auto read_count = 0;
417
13.3k
        _buffer.resize(total);
418
8.94M
        for (size_t i = 0; i < total; ++i) {
419
8.93M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
8.93M
            if (UNLIKELY(ord >= _num_elements)) {
421
760
                break;
422
760
            }
423
424
8.93M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
8.93M
        }
426
427
13.3k
        if (LIKELY(read_count > 0)) {
428
13.3k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.3k
        }
430
431
13.3k
        *n = read_count;
432
13.3k
        return Status::OK();
433
13.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
964
                          MutableColumnPtr& dst) override {
409
964
        DCHECK(_parsed);
410
964
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
964
        auto total = *n;
416
964
        auto read_count = 0;
417
964
        _buffer.resize(total);
418
2.78k
        for (size_t i = 0; i < total; ++i) {
419
1.81k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.81k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
1.81k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.81k
        }
426
427
964
        if (LIKELY(read_count > 0)) {
428
964
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
964
        }
430
431
964
        *n = read_count;
432
964
        return Status::OK();
433
964
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
451
                          MutableColumnPtr& dst) override {
409
451
        DCHECK(_parsed);
410
451
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
451
        auto total = *n;
416
451
        auto read_count = 0;
417
451
        _buffer.resize(total);
418
1.15k
        for (size_t i = 0; i < total; ++i) {
419
705
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
705
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
705
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
705
        }
426
427
451
        if (LIKELY(read_count > 0)) {
428
451
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
451
        }
430
431
451
        *n = read_count;
432
451
        return Status::OK();
433
451
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
353
                          MutableColumnPtr& dst) override {
409
353
        DCHECK(_parsed);
410
353
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
353
        auto total = *n;
416
353
        auto read_count = 0;
417
353
        _buffer.resize(total);
418
1.22k
        for (size_t i = 0; i < total; ++i) {
419
868
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
868
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
868
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
868
        }
426
427
354
        if (LIKELY(read_count > 0)) {
428
354
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
354
        }
430
431
353
        *n = read_count;
432
353
        return Status::OK();
433
353
    }
434
435
166k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
166k
        return next_batch<false>(n, dst);
437
166k
    }
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
166k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
166k
        return next_batch<false>(n, dst);
437
166k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
438
439
4
    size_t count() const override { return _num_elements; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
439
4
    size_t count() const override { return _num_elements; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE5countEv
440
441
2.95M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
974k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
441
228k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
441
227k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
119k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
441
125k
    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
233k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
207k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
441
216k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
441
233k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
441
52.0k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
441
206k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Line
Count
Source
441
1.06k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE13current_indexEv
Line
Count
Source
441
6
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE13current_indexEv
Line
Count
Source
441
3.36k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
441
1.52k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
441
123k
    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
48
    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
144M
    char* get_data(size_t index) const {
444
144M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
144M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
49.4M
    char* get_data(size_t index) const {
444
49.4M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
49.4M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
2.03M
    char* get_data(size_t index) const {
444
2.03M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
2.03M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
443
636k
    char* get_data(size_t index) const {
444
636k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
636k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
443
28.4M
    char* get_data(size_t index) const {
444
28.4M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
28.4M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
1.30M
    char* get_data(size_t index) const {
444
1.30M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.30M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
7.82M
    char* get_data(size_t index) const {
444
7.82M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
7.82M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
1.21M
    char* get_data(size_t index) const {
444
1.21M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.21M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
1.99M
    char* get_data(size_t index) const {
444
1.99M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.99M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
504k
    char* get_data(size_t index) const {
444
504k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
504k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
7.94M
    char* get_data(size_t index) const {
444
7.94M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
7.94M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
443
9.57M
    char* get_data(size_t index) const {
444
9.57M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.57M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
443
506k
    char* get_data(size_t index) const {
444
506k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
506k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
443
20.8k
    char* get_data(size_t index) const {
444
20.8k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20.8k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
443
1.37k
    char* get_data(size_t index) const {
444
1.37k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.37k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
443
22.8k
    char* get_data(size_t index) const {
444
22.8k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
22.8k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
443
23.4M
    char* get_data(size_t index) const {
444
23.4M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
23.4M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
8.96M
    char* get_data(size_t index) const {
444
8.96M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
8.96M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
443
5.00k
    char* get_data(size_t index) const {
444
5.00k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
5.00k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Line
Count
Source
443
3.94k
    char* get_data(size_t index) const {
444
3.94k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
3.94k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
Line
Count
Source
443
6.62k
    char* get_data(size_t index) const {
444
6.62k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
6.62k
    }
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