Coverage Report

Created: 2026-06-26 15:54

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
718k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
336k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
55.0k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
10.1k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
88.1k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
12.9k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
95
64.5k
    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
14.1k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
184
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
36.3k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
95
41.4k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
283
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
95
6.85k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
193
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
95
9.54k
    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
782
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
95
674
    Status init() override { return reset(); }
96
97
141M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
140M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
55.4k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
10.2k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
328k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
25.5k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
65.0k
    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
16.2k
    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
191
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
79.1k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
78.5k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
97
337
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
Line
Count
Source
97
7.04k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
97
98
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
97
4.98k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
25.2k
    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.37k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Line
Count
Source
97
25.7k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
97
5.61k
    bool is_page_full() override { return _remain_element_capacity == 0; }
98
99
1.41M
    Status add(const uint8_t* vals, size_t* count) override {
100
1.41M
        return add_internal<false>(vals, count);
101
1.41M
    }
_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
55.4k
    Status add(const uint8_t* vals, size_t* count) override {
100
55.4k
        return add_internal<false>(vals, count);
101
55.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
10.2k
    Status add(const uint8_t* vals, size_t* count) override {
100
10.2k
        return add_internal<false>(vals, count);
101
10.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
328k
    Status add(const uint8_t* vals, size_t* count) override {
100
328k
        return add_internal<false>(vals, count);
101
328k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
25.5k
    Status add(const uint8_t* vals, size_t* count) override {
100
25.5k
        return add_internal<false>(vals, count);
101
25.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
65.0k
    Status add(const uint8_t* vals, size_t* count) override {
100
65.0k
        return add_internal<false>(vals, count);
101
65.0k
    }
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
16.2k
    Status add(const uint8_t* vals, size_t* count) override {
100
16.2k
        return add_internal<false>(vals, count);
101
16.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
191
    Status add(const uint8_t* vals, size_t* count) override {
100
191
        return add_internal<false>(vals, count);
101
191
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
79.1k
    Status add(const uint8_t* vals, size_t* count) override {
100
79.1k
        return add_internal<false>(vals, count);
101
79.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
78.5k
    Status add(const uint8_t* vals, size_t* count) override {
100
78.5k
        return add_internal<false>(vals, count);
101
78.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
99
336
    Status add(const uint8_t* vals, size_t* count) override {
100
336
        return add_internal<false>(vals, count);
101
336
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
Line
Count
Source
99
7.04k
    Status add(const uint8_t* vals, size_t* count) override {
100
7.04k
        return add_internal<false>(vals, count);
101
7.04k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
98
    Status add(const uint8_t* vals, size_t* count) override {
100
98
        return add_internal<false>(vals, count);
101
98
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
99
4.98k
    Status add(const uint8_t* vals, size_t* count) override {
100
4.98k
        return add_internal<false>(vals, count);
101
4.98k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
25.2k
    Status add(const uint8_t* vals, size_t* count) override {
100
25.2k
        return add_internal<false>(vals, count);
101
25.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
99
21.9k
    Status add(const uint8_t* vals, size_t* count) override {
100
21.9k
        return add_internal<false>(vals, count);
101
21.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Line
Count
Source
99
1.37k
    Status add(const uint8_t* vals, size_t* count) override {
100
1.37k
        return add_internal<false>(vals, count);
101
1.37k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Line
Count
Source
99
25.7k
    Status add(const uint8_t* vals, size_t* count) override {
100
25.7k
        return add_internal<false>(vals, count);
101
25.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
99
5.61k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.61k
        return add_internal<false>(vals, count);
101
5.61k
    }
102
103
141M
    Status single_add(const uint8_t* vals, size_t* count) {
104
141M
        return add_internal<true>(vals, count);
105
141M
    }
106
107
    template <bool single>
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
141M
        _count += to_add;
134
141M
        _remain_element_capacity -= to_add;
135
141M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
141M
        *num_written = to_add;
138
141M
        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
140M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
140M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
140M
                        *reinterpret_cast<const uint32_t*>(vals);
149
140M
                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
140M
        }
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
141M
        return Status::OK();
159
142M
    }
_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
140M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
140M
        DCHECK(!_finished);
110
140M
        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
140M
        uint32_t to_add = cast_set<UInt32>(
126
140M
                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
140M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
140M
        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
140M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
140M
        _count += to_add;
134
140M
        _remain_element_capacity -= to_add;
135
140M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
140M
        *num_written = to_add;
138
140M
        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
140M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
140M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
140M
                        *reinterpret_cast<const uint32_t*>(vals);
149
140M
                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
140M
        }
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
140M
        return Status::OK();
159
140M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
55.4k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
55.4k
        DCHECK(!_finished);
110
55.4k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
55.4k
        uint32_t to_add = cast_set<UInt32>(
126
55.4k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
55.4k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
55.4k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
55.4k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
55.4k
        _count += to_add;
134
55.4k
        _remain_element_capacity -= to_add;
135
55.4k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
55.4k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
55.4k
        memcpy(&_data[orig_size], vals, to_add_size);
158
55.4k
        return Status::OK();
159
55.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
10.2k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
10.2k
        DCHECK(!_finished);
110
10.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
10.2k
        uint32_t to_add = cast_set<UInt32>(
126
10.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
10.2k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
10.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
10.2k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
10.2k
        _count += to_add;
134
10.2k
        _remain_element_capacity -= to_add;
135
10.2k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
10.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
10.2k
        memcpy(&_data[orig_size], vals, to_add_size);
158
10.2k
        return Status::OK();
159
10.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
328k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
328k
        DCHECK(!_finished);
110
328k
        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
328k
        uint32_t to_add = cast_set<UInt32>(
126
328k
                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
328k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
328k
        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
328k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
328k
        _count += to_add;
134
328k
        _remain_element_capacity -= to_add;
135
328k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
328k
        *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
328k
        memcpy(&_data[orig_size], vals, to_add_size);
158
328k
        return Status::OK();
159
328k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
25.5k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
25.5k
        DCHECK(!_finished);
110
25.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
25.5k
        uint32_t to_add = cast_set<UInt32>(
126
25.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
25.5k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
25.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
25.5k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
25.5k
        _count += to_add;
134
25.5k
        _remain_element_capacity -= to_add;
135
25.5k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
25.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
25.5k
        memcpy(&_data[orig_size], vals, to_add_size);
158
25.5k
        return Status::OK();
159
25.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
65.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
65.0k
        DCHECK(!_finished);
110
65.0k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
65.0k
        uint32_t to_add = cast_set<UInt32>(
126
65.0k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
65.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
65.0k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
65.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
65.0k
        _count += to_add;
134
65.0k
        _remain_element_capacity -= to_add;
135
65.0k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
65.0k
        *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
65.0k
        memcpy(&_data[orig_size], vals, to_add_size);
158
65.0k
        return Status::OK();
159
65.0k
    }
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
16.2k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
16.2k
        DCHECK(!_finished);
110
16.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
16.2k
        uint32_t to_add = cast_set<UInt32>(
126
16.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
16.2k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
16.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
16.2k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
16.2k
        _count += to_add;
134
16.2k
        _remain_element_capacity -= to_add;
135
16.2k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
16.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
16.2k
        memcpy(&_data[orig_size], vals, to_add_size);
158
16.2k
        return Status::OK();
159
16.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
191
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
191
        DCHECK(!_finished);
110
191
        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
191
        uint32_t to_add = cast_set<UInt32>(
126
191
                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
191
        int to_add_size = to_add * SIZE_OF_TYPE;
129
191
        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
191
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
191
        _count += to_add;
134
191
        _remain_element_capacity -= to_add;
135
191
        _raw_data_size += to_add_size;
136
        // return added number through count
137
191
        *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
191
        memcpy(&_data[orig_size], vals, to_add_size);
158
191
        return Status::OK();
159
191
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
79.1k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
79.1k
        DCHECK(!_finished);
110
79.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
79.1k
        uint32_t to_add = cast_set<UInt32>(
126
79.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
79.1k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
79.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
79.1k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
79.1k
        _count += to_add;
134
79.1k
        _remain_element_capacity -= to_add;
135
79.1k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
79.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
79.1k
        memcpy(&_data[orig_size], vals, to_add_size);
158
79.1k
        return Status::OK();
159
79.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
78.5k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
78.5k
        DCHECK(!_finished);
110
78.5k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
78.5k
        uint32_t to_add = cast_set<UInt32>(
126
78.5k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
78.5k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
78.5k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
78.5k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
78.5k
        _count += to_add;
134
78.5k
        _remain_element_capacity -= to_add;
135
78.5k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
78.5k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
78.5k
        memcpy(&_data[orig_size], vals, to_add_size);
158
78.5k
        return Status::OK();
159
78.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
337
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
337
        DCHECK(!_finished);
110
337
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
337
        uint32_t to_add = cast_set<UInt32>(
126
337
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
337
        int to_add_size = to_add * SIZE_OF_TYPE;
129
337
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
337
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
337
        _count += to_add;
134
337
        _remain_element_capacity -= to_add;
135
337
        _raw_data_size += to_add_size;
136
        // return added number through count
137
337
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _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.04k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
7.04k
        DCHECK(!_finished);
110
7.04k
        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.04k
        uint32_t to_add = cast_set<UInt32>(
126
7.04k
                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.04k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
7.04k
        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.04k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
7.04k
        _count += to_add;
134
7.04k
        _remain_element_capacity -= to_add;
135
7.04k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
7.04k
        *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.04k
        memcpy(&_data[orig_size], vals, to_add_size);
158
7.04k
        return Status::OK();
159
7.04k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
98
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
98
        DCHECK(!_finished);
110
98
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
98
        uint32_t to_add = cast_set<UInt32>(
126
98
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
98
        int to_add_size = to_add * SIZE_OF_TYPE;
129
98
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
98
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
98
        _count += to_add;
134
98
        _remain_element_capacity -= to_add;
135
98
        _raw_data_size += to_add_size;
136
        // return added number through count
137
98
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
98
        memcpy(&_data[orig_size], vals, to_add_size);
158
98
        return Status::OK();
159
98
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
4.98k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
4.98k
        DCHECK(!_finished);
110
4.98k
        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
4.98k
        uint32_t to_add = cast_set<UInt32>(
126
4.98k
                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
4.98k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
4.98k
        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
4.98k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
4.98k
        _count += to_add;
134
4.98k
        _remain_element_capacity -= to_add;
135
4.98k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
4.98k
        *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
4.98k
        memcpy(&_data[orig_size], vals, to_add_size);
158
4.98k
        return Status::OK();
159
4.98k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
25.2k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
25.2k
        DCHECK(!_finished);
110
25.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
25.2k
        uint32_t to_add = cast_set<UInt32>(
126
25.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
25.2k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
25.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
25.2k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
25.2k
        _count += to_add;
134
25.2k
        _remain_element_capacity -= to_add;
135
25.2k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
25.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
25.2k
        memcpy(&_data[orig_size], vals, to_add_size);
158
25.2k
        return Status::OK();
159
25.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
21.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
21.9k
        DCHECK(!_finished);
110
21.9k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
21.9k
        uint32_t to_add = cast_set<UInt32>(
126
21.9k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
21.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
21.9k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
21.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
21.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.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
1.37k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
1.37k
        DCHECK(!_finished);
110
1.37k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
1.37k
        uint32_t to_add = cast_set<UInt32>(
126
1.37k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
1.37k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
1.37k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
1.37k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
1.37k
        _count += to_add;
134
1.37k
        _remain_element_capacity -= to_add;
135
1.37k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
1.37k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
1.37k
        memcpy(&_data[orig_size], vals, to_add_size);
158
1.37k
        return Status::OK();
159
1.37k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
25.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
25.7k
        DCHECK(!_finished);
110
25.7k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
25.7k
        uint32_t to_add = cast_set<UInt32>(
126
25.7k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
25.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
25.7k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
25.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
25.7k
        _count += to_add;
134
25.7k
        _remain_element_capacity -= to_add;
135
25.7k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
25.7k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _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.61k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.61k
        DCHECK(!_finished);
110
5.61k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
5.61k
        uint32_t to_add = cast_set<UInt32>(
126
5.61k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
5.61k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.61k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
5.61k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.61k
        _count += to_add;
134
5.61k
        _remain_element_capacity -= to_add;
135
5.61k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.61k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
5.61k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.61k
        return Status::OK();
159
5.61k
    }
160
161
713k
    Status finish(OwnedSlice* slice) override {
162
713k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
713k
        return Status::OK();
164
713k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
324k
    Status finish(OwnedSlice* slice) override {
162
324k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
324k
        return Status::OK();
164
324k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
53.7k
    Status finish(OwnedSlice* slice) override {
162
53.7k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
53.7k
        return Status::OK();
164
53.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
9.34k
    Status finish(OwnedSlice* slice) override {
162
9.34k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
9.34k
        return Status::OK();
164
9.34k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
90.9k
    Status finish(OwnedSlice* slice) override {
162
90.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
90.9k
        return Status::OK();
164
90.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
12.8k
    Status finish(OwnedSlice* slice) override {
162
12.8k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
12.8k
        return Status::OK();
164
12.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
64.3k
    Status finish(OwnedSlice* slice) override {
162
64.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
64.3k
        return Status::OK();
164
64.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
11.0k
    Status finish(OwnedSlice* slice) override {
162
11.0k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
11.0k
        return Status::OK();
164
11.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
13.9k
    Status finish(OwnedSlice* slice) override {
162
13.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
13.9k
        return Status::OK();
164
13.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
196
    Status finish(OwnedSlice* slice) override {
162
196
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
196
        return Status::OK();
164
196
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
37.2k
    Status finish(OwnedSlice* slice) override {
162
37.2k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
37.2k
        return Status::OK();
164
37.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
40.4k
    Status finish(OwnedSlice* slice) override {
162
40.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
40.4k
        return Status::OK();
164
40.4k
    }
_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.13k
    Status finish(OwnedSlice* slice) override {
162
7.13k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.13k
        return Status::OK();
164
7.13k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
106
    Status finish(OwnedSlice* slice) override {
162
106
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
106
        return Status::OK();
164
106
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
9.54k
    Status finish(OwnedSlice* slice) override {
162
9.54k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
9.54k
        return Status::OK();
164
9.54k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
18.9k
    Status finish(OwnedSlice* slice) override {
162
18.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
18.9k
        return Status::OK();
164
18.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
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
699
    Status finish(OwnedSlice* slice) override {
162
699
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
699
        return Status::OK();
164
699
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
597
    Status finish(OwnedSlice* slice) override {
162
597
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
597
        return Status::OK();
164
597
    }
165
166
1.70M
    Status reset() override {
167
1.70M
        RETURN_IF_CATCH_EXCEPTION({
168
1.70M
            size_t block_size = _options.data_page_size;
169
1.70M
            _count = 0;
170
1.70M
            _raw_data_size = 0;
171
1.70M
            _data.clear();
172
1.70M
            _data.reserve(block_size);
173
1.70M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.70M
                    << "buffer must be naturally-aligned";
175
1.70M
            _buffer.clear();
176
1.70M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.70M
            _finished = false;
178
1.70M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.70M
        });
180
1.71M
        return Status::OK();
181
1.70M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
166
935k
    Status reset() override {
167
935k
        RETURN_IF_CATCH_EXCEPTION({
168
935k
            size_t block_size = _options.data_page_size;
169
935k
            _count = 0;
170
935k
            _raw_data_size = 0;
171
935k
            _data.clear();
172
935k
            _data.reserve(block_size);
173
935k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
935k
                    << "buffer must be naturally-aligned";
175
935k
            _buffer.clear();
176
935k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
935k
            _finished = false;
178
935k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
935k
        });
180
938k
        return Status::OK();
181
935k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
108k
    Status reset() override {
167
108k
        RETURN_IF_CATCH_EXCEPTION({
168
108k
            size_t block_size = _options.data_page_size;
169
108k
            _count = 0;
170
108k
            _raw_data_size = 0;
171
108k
            _data.clear();
172
108k
            _data.reserve(block_size);
173
108k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
108k
                    << "buffer must be naturally-aligned";
175
108k
            _buffer.clear();
176
108k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
108k
            _finished = false;
178
108k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
108k
        });
180
108k
        return Status::OK();
181
108k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
166
19.4k
    Status reset() override {
167
19.4k
        RETURN_IF_CATCH_EXCEPTION({
168
19.4k
            size_t block_size = _options.data_page_size;
169
19.4k
            _count = 0;
170
19.4k
            _raw_data_size = 0;
171
19.4k
            _data.clear();
172
19.4k
            _data.reserve(block_size);
173
19.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
19.4k
                    << "buffer must be naturally-aligned";
175
19.4k
            _buffer.clear();
176
19.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
19.4k
            _finished = false;
178
19.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
19.4k
        });
180
19.5k
        return Status::OK();
181
19.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
178k
    Status reset() override {
167
178k
        RETURN_IF_CATCH_EXCEPTION({
168
178k
            size_t block_size = _options.data_page_size;
169
178k
            _count = 0;
170
178k
            _raw_data_size = 0;
171
178k
            _data.clear();
172
178k
            _data.reserve(block_size);
173
178k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
178k
                    << "buffer must be naturally-aligned";
175
178k
            _buffer.clear();
176
178k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
178k
            _finished = false;
178
178k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
178k
        });
180
179k
        return Status::OK();
181
178k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
166
25.8k
    Status reset() override {
167
25.8k
        RETURN_IF_CATCH_EXCEPTION({
168
25.8k
            size_t block_size = _options.data_page_size;
169
25.8k
            _count = 0;
170
25.8k
            _raw_data_size = 0;
171
25.8k
            _data.clear();
172
25.8k
            _data.reserve(block_size);
173
25.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
25.8k
                    << "buffer must be naturally-aligned";
175
25.8k
            _buffer.clear();
176
25.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
25.8k
            _finished = false;
178
25.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
25.8k
        });
180
25.8k
        return Status::OK();
181
25.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
166
128k
    Status reset() override {
167
128k
        RETURN_IF_CATCH_EXCEPTION({
168
128k
            size_t block_size = _options.data_page_size;
169
128k
            _count = 0;
170
128k
            _raw_data_size = 0;
171
128k
            _data.clear();
172
128k
            _data.reserve(block_size);
173
128k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
128k
                    << "buffer must be naturally-aligned";
175
128k
            _buffer.clear();
176
128k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
128k
            _finished = false;
178
128k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
128k
        });
180
129k
        return Status::OK();
181
128k
    }
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
28.1k
    Status reset() override {
167
28.1k
        RETURN_IF_CATCH_EXCEPTION({
168
28.1k
            size_t block_size = _options.data_page_size;
169
28.1k
            _count = 0;
170
28.1k
            _raw_data_size = 0;
171
28.1k
            _data.clear();
172
28.1k
            _data.reserve(block_size);
173
28.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
28.1k
                    << "buffer must be naturally-aligned";
175
28.1k
            _buffer.clear();
176
28.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
28.1k
            _finished = false;
178
28.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
28.1k
        });
180
28.1k
        return Status::OK();
181
28.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
166
380
    Status reset() override {
167
380
        RETURN_IF_CATCH_EXCEPTION({
168
380
            size_t block_size = _options.data_page_size;
169
380
            _count = 0;
170
380
            _raw_data_size = 0;
171
380
            _data.clear();
172
380
            _data.reserve(block_size);
173
380
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
380
                    << "buffer must be naturally-aligned";
175
380
            _buffer.clear();
176
380
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
380
            _finished = false;
178
380
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
380
        });
180
380
        return Status::OK();
181
380
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
166
73.6k
    Status reset() override {
167
73.6k
        RETURN_IF_CATCH_EXCEPTION({
168
73.6k
            size_t block_size = _options.data_page_size;
169
73.6k
            _count = 0;
170
73.6k
            _raw_data_size = 0;
171
73.6k
            _data.clear();
172
73.6k
            _data.reserve(block_size);
173
73.6k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
73.6k
                    << "buffer must be naturally-aligned";
175
73.6k
            _buffer.clear();
176
73.6k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
73.6k
            _finished = false;
178
73.6k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
73.6k
        });
180
73.7k
        return Status::OK();
181
73.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
166
81.8k
    Status reset() override {
167
81.8k
        RETURN_IF_CATCH_EXCEPTION({
168
81.8k
            size_t block_size = _options.data_page_size;
169
81.8k
            _count = 0;
170
81.8k
            _raw_data_size = 0;
171
81.8k
            _data.clear();
172
81.8k
            _data.reserve(block_size);
173
81.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
81.8k
                    << "buffer must be naturally-aligned";
175
81.8k
            _buffer.clear();
176
81.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
81.8k
            _finished = false;
178
81.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
81.8k
        });
180
81.9k
        return Status::OK();
181
81.8k
    }
_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
13.9k
    Status reset() override {
167
13.9k
        RETURN_IF_CATCH_EXCEPTION({
168
13.9k
            size_t block_size = _options.data_page_size;
169
13.9k
            _count = 0;
170
13.9k
            _raw_data_size = 0;
171
13.9k
            _data.clear();
172
13.9k
            _data.reserve(block_size);
173
13.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
13.9k
                    << "buffer must be naturally-aligned";
175
13.9k
            _buffer.clear();
176
13.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
13.9k
            _finished = false;
178
13.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
13.9k
        });
180
14.2k
        return Status::OK();
181
13.9k
    }
_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.1k
        return Status::OK();
181
19.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
30.7k
    Status reset() override {
167
30.7k
        RETURN_IF_CATCH_EXCEPTION({
168
30.7k
            size_t block_size = _options.data_page_size;
169
30.7k
            _count = 0;
170
30.7k
            _raw_data_size = 0;
171
30.7k
            _data.clear();
172
30.7k
            _data.reserve(block_size);
173
30.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
30.7k
                    << "buffer must be naturally-aligned";
175
30.7k
            _buffer.clear();
176
30.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
30.7k
            _finished = false;
178
30.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
30.7k
        });
180
30.7k
        return Status::OK();
181
30.7k
    }
_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.8k
        return Status::OK();
181
31.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Line
Count
Source
166
2.22k
    Status reset() override {
167
2.22k
        RETURN_IF_CATCH_EXCEPTION({
168
2.22k
            size_t block_size = _options.data_page_size;
169
2.22k
            _count = 0;
170
2.22k
            _raw_data_size = 0;
171
2.22k
            _data.clear();
172
2.22k
            _data.reserve(block_size);
173
2.22k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
2.22k
                    << "buffer must be naturally-aligned";
175
2.22k
            _buffer.clear();
176
2.22k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
2.22k
            _finished = false;
178
2.22k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
2.22k
        });
180
2.22k
        return Status::OK();
181
2.22k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Line
Count
Source
166
1.48k
    Status reset() override {
167
1.48k
        RETURN_IF_CATCH_EXCEPTION({
168
1.48k
            size_t block_size = _options.data_page_size;
169
1.48k
            _count = 0;
170
1.48k
            _raw_data_size = 0;
171
1.48k
            _data.clear();
172
1.48k
            _data.reserve(block_size);
173
1.48k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.48k
                    << "buffer must be naturally-aligned";
175
1.48k
            _buffer.clear();
176
1.48k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.48k
            _finished = false;
178
1.48k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.48k
        });
180
1.48k
        return Status::OK();
181
1.48k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
166
1.26k
    Status reset() override {
167
1.26k
        RETURN_IF_CATCH_EXCEPTION({
168
1.26k
            size_t block_size = _options.data_page_size;
169
1.26k
            _count = 0;
170
1.26k
            _raw_data_size = 0;
171
1.26k
            _data.clear();
172
1.26k
            _data.reserve(block_size);
173
1.26k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.26k
                    << "buffer must be naturally-aligned";
175
1.26k
            _buffer.clear();
176
1.26k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.26k
            _finished = false;
178
1.26k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.26k
        });
180
1.27k
        return Status::OK();
181
1.26k
    }
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
33.2k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
17.4k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
185
2.86k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
185
996
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
2.89k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
1.52k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
744
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
726
    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.58k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
2.12k
    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
129
    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.07k
    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
452k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
63.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
53.7k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
9.34k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
90.9k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
187
12.8k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
64.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
187
11.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
13.9k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE17get_raw_data_sizeEv
Line
Count
Source
187
196
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
187
37.2k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
187
40.4k
    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.13k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
187
106
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
187
9.54k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
18.9k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
187
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
699
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
187
597
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
717k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
335k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
55.1k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
10.1k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
88.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
12.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
64.3k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
11.8k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
14.1k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
184
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
36.3k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
41.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
283
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
6.86k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
193
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.54k
            : _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
673
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
192
193
713k
    OwnedSlice _finish(int final_size_of_type) {
194
713k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
713k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
713k
        int padding_elems = num_elems_after_padding - _count;
199
713k
        int padding_bytes = padding_elems * final_size_of_type;
200
20.2M
        for (int i = 0; i < padding_bytes; i++) {
201
19.5M
            _data.push_back(0);
202
19.5M
        }
203
204
        // reserve enough place for compression
205
713k
        _buffer.resize(
206
713k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
713k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
713k
        int64_t bytes =
210
713k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
713k
                                         num_elems_after_padding, final_size_of_type, 0);
212
713k
        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
713k
        encode_fixed32_le(&_buffer[0], _count);
222
713k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
713k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
713k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
713k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
713k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
713k
        return _buffer.build();
229
713k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
324k
    OwnedSlice _finish(int final_size_of_type) {
194
324k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
324k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
324k
        int padding_elems = num_elems_after_padding - _count;
199
324k
        int padding_bytes = padding_elems * final_size_of_type;
200
6.26M
        for (int i = 0; i < padding_bytes; i++) {
201
5.94M
            _data.push_back(0);
202
5.94M
        }
203
204
        // reserve enough place for compression
205
324k
        _buffer.resize(
206
324k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
324k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
324k
        int64_t bytes =
210
324k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
324k
                                         num_elems_after_padding, final_size_of_type, 0);
212
324k
        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
324k
        encode_fixed32_le(&_buffer[0], _count);
222
324k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
324k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
324k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
324k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
324k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
324k
        return _buffer.build();
229
324k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
53.7k
    OwnedSlice _finish(int final_size_of_type) {
194
53.7k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
53.7k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
53.7k
        int padding_elems = num_elems_after_padding - _count;
199
53.7k
        int padding_bytes = padding_elems * final_size_of_type;
200
359k
        for (int i = 0; i < padding_bytes; i++) {
201
306k
            _data.push_back(0);
202
306k
        }
203
204
        // reserve enough place for compression
205
53.7k
        _buffer.resize(
206
53.7k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
53.7k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
53.7k
        int64_t bytes =
210
53.7k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
53.7k
                                         num_elems_after_padding, final_size_of_type, 0);
212
53.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
53.7k
        encode_fixed32_le(&_buffer[0], _count);
222
53.7k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
53.7k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
53.7k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
53.7k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
53.7k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
53.7k
        return _buffer.build();
229
53.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
9.34k
    OwnedSlice _finish(int final_size_of_type) {
194
9.34k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
9.34k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
9.34k
        int padding_elems = num_elems_after_padding - _count;
199
9.34k
        int padding_bytes = padding_elems * final_size_of_type;
200
95.6k
        for (int i = 0; i < padding_bytes; i++) {
201
86.2k
            _data.push_back(0);
202
86.2k
        }
203
204
        // reserve enough place for compression
205
9.34k
        _buffer.resize(
206
9.34k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
9.34k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
9.34k
        int64_t bytes =
210
9.34k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
9.34k
                                         num_elems_after_padding, final_size_of_type, 0);
212
9.34k
        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.34k
        encode_fixed32_le(&_buffer[0], _count);
222
9.34k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
9.34k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
9.34k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
9.34k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
9.34k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
9.34k
        return _buffer.build();
229
9.34k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
90.9k
    OwnedSlice _finish(int final_size_of_type) {
194
90.9k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
90.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
90.9k
        int padding_elems = num_elems_after_padding - _count;
199
90.9k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.91M
        for (int i = 0; i < padding_bytes; i++) {
201
3.82M
            _data.push_back(0);
202
3.82M
        }
203
204
        // reserve enough place for compression
205
90.9k
        _buffer.resize(
206
90.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
90.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
90.9k
        int64_t bytes =
210
90.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
90.9k
                                         num_elems_after_padding, final_size_of_type, 0);
212
90.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
90.9k
        encode_fixed32_le(&_buffer[0], _count);
222
90.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
90.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
90.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
90.9k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
90.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
90.9k
        return _buffer.build();
229
90.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
12.8k
    OwnedSlice _finish(int final_size_of_type) {
194
12.8k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
12.8k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
12.8k
        int padding_elems = num_elems_after_padding - _count;
199
12.8k
        int padding_bytes = padding_elems * final_size_of_type;
200
830k
        for (int i = 0; i < padding_bytes; i++) {
201
817k
            _data.push_back(0);
202
817k
        }
203
204
        // reserve enough place for compression
205
12.8k
        _buffer.resize(
206
12.8k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
12.8k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
12.8k
        int64_t bytes =
210
12.8k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
12.8k
                                         num_elems_after_padding, final_size_of_type, 0);
212
12.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
12.8k
        encode_fixed32_le(&_buffer[0], _count);
222
12.8k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
12.8k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
12.8k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
12.8k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
12.8k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
12.8k
        return _buffer.build();
229
12.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
64.3k
    OwnedSlice _finish(int final_size_of_type) {
194
64.3k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
64.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
64.3k
        int padding_elems = num_elems_after_padding - _count;
199
64.3k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.13M
        for (int i = 0; i < padding_bytes; i++) {
201
3.06M
            _data.push_back(0);
202
3.06M
        }
203
204
        // reserve enough place for compression
205
64.3k
        _buffer.resize(
206
64.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
64.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
64.3k
        int64_t bytes =
210
64.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
64.3k
                                         num_elems_after_padding, final_size_of_type, 0);
212
64.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
64.3k
        encode_fixed32_le(&_buffer[0], _count);
222
64.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
64.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
64.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
64.3k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
64.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
64.3k
        return _buffer.build();
229
64.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
11.0k
    OwnedSlice _finish(int final_size_of_type) {
194
11.0k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
11.0k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
11.0k
        int padding_elems = num_elems_after_padding - _count;
199
11.0k
        int padding_bytes = padding_elems * final_size_of_type;
200
239k
        for (int i = 0; i < padding_bytes; i++) {
201
228k
            _data.push_back(0);
202
228k
        }
203
204
        // reserve enough place for compression
205
11.0k
        _buffer.resize(
206
11.0k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
11.0k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
11.0k
        int64_t bytes =
210
11.0k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
11.0k
                                         num_elems_after_padding, final_size_of_type, 0);
212
11.0k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
11.0k
        encode_fixed32_le(&_buffer[0], _count);
222
11.0k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
11.0k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
11.0k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
11.0k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
11.0k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
11.0k
        return _buffer.build();
229
11.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
13.9k
    OwnedSlice _finish(int final_size_of_type) {
194
13.9k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
13.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
13.9k
        int padding_elems = num_elems_after_padding - _count;
199
13.9k
        int padding_bytes = padding_elems * final_size_of_type;
200
586k
        for (int i = 0; i < padding_bytes; i++) {
201
572k
            _data.push_back(0);
202
572k
        }
203
204
        // reserve enough place for compression
205
13.9k
        _buffer.resize(
206
13.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
13.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
13.9k
        int64_t bytes =
210
13.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
13.9k
                                         num_elems_after_padding, final_size_of_type, 0);
212
13.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
13.9k
        encode_fixed32_le(&_buffer[0], _count);
222
13.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
13.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
13.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
13.9k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
13.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
13.9k
        return _buffer.build();
229
13.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
196
    OwnedSlice _finish(int final_size_of_type) {
194
196
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
196
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
196
        int padding_elems = num_elems_after_padding - _count;
199
196
        int padding_bytes = padding_elems * final_size_of_type;
200
2.68k
        for (int i = 0; i < padding_bytes; i++) {
201
2.49k
            _data.push_back(0);
202
2.49k
        }
203
204
        // reserve enough place for compression
205
196
        _buffer.resize(
206
196
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
196
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
196
        int64_t bytes =
210
196
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
196
                                         num_elems_after_padding, final_size_of_type, 0);
212
196
        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
196
        encode_fixed32_le(&_buffer[0], _count);
222
196
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
196
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
196
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
196
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
196
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
196
        return _buffer.build();
229
196
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
193
37.2k
    OwnedSlice _finish(int final_size_of_type) {
194
37.2k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
37.2k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
37.2k
        int padding_elems = num_elems_after_padding - _count;
199
37.2k
        int padding_bytes = padding_elems * final_size_of_type;
200
796k
        for (int i = 0; i < padding_bytes; i++) {
201
759k
            _data.push_back(0);
202
759k
        }
203
204
        // reserve enough place for compression
205
37.2k
        _buffer.resize(
206
37.2k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
37.2k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
37.2k
        int64_t bytes =
210
37.2k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
37.2k
                                         num_elems_after_padding, final_size_of_type, 0);
212
37.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
37.2k
        encode_fixed32_le(&_buffer[0], _count);
222
37.2k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
37.2k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
37.2k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
37.2k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
37.2k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
37.2k
        return _buffer.build();
229
37.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
193
40.4k
    OwnedSlice _finish(int final_size_of_type) {
194
40.4k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
40.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
40.4k
        int padding_elems = num_elems_after_padding - _count;
199
40.4k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.70M
        for (int i = 0; i < padding_bytes; i++) {
201
1.66M
            _data.push_back(0);
202
1.66M
        }
203
204
        // reserve enough place for compression
205
40.4k
        _buffer.resize(
206
40.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
40.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
40.4k
        int64_t bytes =
210
40.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
40.4k
                                         num_elems_after_padding, final_size_of_type, 0);
212
40.4k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
40.4k
        encode_fixed32_le(&_buffer[0], _count);
222
40.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
40.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
40.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
40.4k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
40.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
40.4k
        return _buffer.build();
229
40.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
193
437
    OwnedSlice _finish(int final_size_of_type) {
194
437
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
437
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
437
        int padding_elems = num_elems_after_padding - _count;
199
437
        int padding_bytes = padding_elems * final_size_of_type;
200
6.98k
        for (int i = 0; i < padding_bytes; i++) {
201
6.54k
            _data.push_back(0);
202
6.54k
        }
203
204
        // reserve enough place for compression
205
437
        _buffer.resize(
206
437
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
437
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
437
        int64_t bytes =
210
437
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
437
                                         num_elems_after_padding, final_size_of_type, 0);
212
437
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
437
        encode_fixed32_le(&_buffer[0], _count);
222
437
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
437
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
437
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
437
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
437
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
437
        return _buffer.build();
229
437
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
Line
Count
Source
193
7.13k
    OwnedSlice _finish(int final_size_of_type) {
194
7.13k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.13k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.13k
        int padding_elems = num_elems_after_padding - _count;
199
7.13k
        int padding_bytes = padding_elems * final_size_of_type;
200
373k
        for (int i = 0; i < padding_bytes; i++) {
201
366k
            _data.push_back(0);
202
366k
        }
203
204
        // reserve enough place for compression
205
7.13k
        _buffer.resize(
206
7.13k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.13k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.13k
        int64_t bytes =
210
7.13k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.13k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.13k
        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.13k
        encode_fixed32_le(&_buffer[0], _count);
222
7.13k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.13k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.13k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.13k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.13k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.13k
        return _buffer.build();
229
7.13k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
193
106
    OwnedSlice _finish(int final_size_of_type) {
194
106
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
106
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
106
        int padding_elems = num_elems_after_padding - _count;
199
106
        int padding_bytes = padding_elems * final_size_of_type;
200
6.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
106
        _buffer.resize(
206
106
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
106
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
106
        int64_t bytes =
210
106
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
106
                                         num_elems_after_padding, final_size_of_type, 0);
212
106
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
106
        encode_fixed32_le(&_buffer[0], _count);
222
106
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
106
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
106
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
106
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
106
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
106
        return _buffer.build();
229
106
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
193
9.54k
    OwnedSlice _finish(int final_size_of_type) {
194
9.54k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
9.54k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
9.54k
        int padding_elems = num_elems_after_padding - _count;
199
9.54k
        int padding_bytes = padding_elems * final_size_of_type;
200
113k
        for (int i = 0; i < padding_bytes; i++) {
201
104k
            _data.push_back(0);
202
104k
        }
203
204
        // reserve enough place for compression
205
9.54k
        _buffer.resize(
206
9.54k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
9.54k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
9.54k
        int64_t bytes =
210
9.54k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
9.54k
                                         num_elems_after_padding, final_size_of_type, 0);
212
9.54k
        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.54k
        encode_fixed32_le(&_buffer[0], _count);
222
9.54k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
9.54k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
9.54k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
9.54k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
9.54k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
9.54k
        return _buffer.build();
229
9.54k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
18.9k
    OwnedSlice _finish(int final_size_of_type) {
194
18.9k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
18.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
18.9k
        int padding_elems = num_elems_after_padding - _count;
199
18.9k
        int padding_bytes = padding_elems * final_size_of_type;
200
478k
        for (int i = 0; i < padding_bytes; i++) {
201
459k
            _data.push_back(0);
202
459k
        }
203
204
        // reserve enough place for compression
205
18.9k
        _buffer.resize(
206
18.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
18.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
18.9k
        int64_t bytes =
210
18.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
18.9k
                                         num_elems_after_padding, final_size_of_type, 0);
212
18.9k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
18.9k
        encode_fixed32_le(&_buffer[0], _count);
222
18.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
18.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
18.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
18.9k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
18.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
18.9k
        return _buffer.build();
229
18.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
193
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.09M
        for (int i = 0; i < padding_bytes; i++) {
201
1.07M
            _data.push_back(0);
202
1.07M
        }
203
204
        // reserve enough place for compression
205
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
162k
        for (int i = 0; i < padding_bytes; i++) {
201
161k
            _data.push_back(0);
202
161k
        }
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
699
    OwnedSlice _finish(int final_size_of_type) {
194
699
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
699
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
699
        int padding_elems = num_elems_after_padding - _count;
199
699
        int padding_bytes = padding_elems * final_size_of_type;
200
14.7k
        for (int i = 0; i < padding_bytes; i++) {
201
14.0k
            _data.push_back(0);
202
14.0k
        }
203
204
        // reserve enough place for compression
205
699
        _buffer.resize(
206
699
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
699
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
699
        int64_t bytes =
210
699
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
699
                                         num_elems_after_padding, final_size_of_type, 0);
212
699
        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
699
        encode_fixed32_le(&_buffer[0], _count);
222
699
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
699
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
699
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
699
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
699
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
699
        return _buffer.build();
229
699
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
193
597
    OwnedSlice _finish(int final_size_of_type) {
194
597
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
597
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
597
        int padding_elems = num_elems_after_padding - _count;
199
597
        int padding_bytes = padding_elems * final_size_of_type;
200
47.5k
        for (int i = 0; i < padding_bytes; i++) {
201
46.9k
            _data.push_back(0);
202
46.9k
        }
203
204
        // reserve enough place for compression
205
597
        _buffer.resize(
206
597
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
597
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
597
        int64_t bytes =
210
597
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
597
                                         num_elems_after_padding, final_size_of_type, 0);
212
597
        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
597
        encode_fixed32_le(&_buffer[0], _count);
222
597
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
597
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
597
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
597
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
597
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
597
        return _buffer.build();
229
597
    }
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.24M
                                       int& size_of_element) {
253
2.24M
    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.24M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
2.24M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
2.24M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
2.24M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
2.24M
    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.24M
    switch (size_of_element) {
271
208k
    case 1:
272
252k
    case 2:
273
255k
    case 3:
274
1.44M
    case 4:
275
2.13M
    case 8:
276
2.13M
    case 12:
277
2.23M
    case 16:
278
2.24M
    case 32:
279
2.24M
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
2.24M
    }
283
2.24M
    return Status::OK();
284
2.24M
}
285
286
template <FieldType Type>
287
class BitShufflePageDecoder : public PageDecoder {
288
public:
289
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
290
1.12M
            : _data(data),
291
1.12M
              _options(options),
292
1.12M
              _parsed(false),
293
1.12M
              _num_elements(0),
294
1.12M
              _num_element_after_padding(0),
295
1.12M
              _size_of_element(0),
296
1.12M
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
500k
            : _data(data),
291
500k
              _options(options),
292
500k
              _parsed(false),
293
500k
              _num_elements(0),
294
500k
              _num_element_after_padding(0),
295
500k
              _size_of_element(0),
296
500k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
104k
            : _data(data),
291
104k
              _options(options),
292
104k
              _parsed(false),
293
104k
              _num_elements(0),
294
104k
              _num_element_after_padding(0),
295
104k
              _size_of_element(0),
296
104k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
21.7k
            : _data(data),
291
21.7k
              _options(options),
292
21.7k
              _parsed(false),
293
21.7k
              _num_elements(0),
294
21.7k
              _num_element_after_padding(0),
295
21.7k
              _size_of_element(0),
296
21.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
105k
            : _data(data),
291
105k
              _options(options),
292
105k
              _parsed(false),
293
105k
              _num_elements(0),
294
105k
              _num_element_after_padding(0),
295
105k
              _size_of_element(0),
296
105k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
20.9k
            : _data(data),
291
20.9k
              _options(options),
292
20.9k
              _parsed(false),
293
20.9k
              _num_elements(0),
294
20.9k
              _num_element_after_padding(0),
295
20.9k
              _size_of_element(0),
296
20.9k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
91.1k
            : _data(data),
291
91.1k
              _options(options),
292
91.1k
              _parsed(false),
293
91.1k
              _num_elements(0),
294
91.1k
              _num_element_after_padding(0),
295
91.1k
              _size_of_element(0),
296
91.1k
              _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.9k
            : _data(data),
291
27.9k
              _options(options),
292
27.9k
              _parsed(false),
293
27.9k
              _num_elements(0),
294
27.9k
              _num_element_after_padding(0),
295
27.9k
              _size_of_element(0),
296
27.9k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.72k
            : _data(data),
291
1.72k
              _options(options),
292
1.72k
              _parsed(false),
293
1.72k
              _num_elements(0),
294
1.72k
              _num_element_after_padding(0),
295
1.72k
              _size_of_element(0),
296
1.72k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
58.4k
            : _data(data),
291
58.4k
              _options(options),
292
58.4k
              _parsed(false),
293
58.4k
              _num_elements(0),
294
58.4k
              _num_element_after_padding(0),
295
58.4k
              _size_of_element(0),
296
58.4k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
64.4k
            : _data(data),
291
64.4k
              _options(options),
292
64.4k
              _parsed(false),
293
64.4k
              _num_elements(0),
294
64.4k
              _num_element_after_padding(0),
295
64.4k
              _size_of_element(0),
296
64.4k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
2.48k
            : _data(data),
291
2.48k
              _options(options),
292
2.48k
              _parsed(false),
293
2.48k
              _num_elements(0),
294
2.48k
              _num_element_after_padding(0),
295
2.48k
              _size_of_element(0),
296
2.48k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
14.7k
            : _data(data),
291
14.7k
              _options(options),
292
14.7k
              _parsed(false),
293
14.7k
              _num_elements(0),
294
14.7k
              _num_element_after_padding(0),
295
14.7k
              _size_of_element(0),
296
14.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.37k
            : _data(data),
291
1.37k
              _options(options),
292
1.37k
              _parsed(false),
293
1.37k
              _num_elements(0),
294
1.37k
              _num_element_after_padding(0),
295
1.37k
              _size_of_element(0),
296
1.37k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
14.7k
            : _data(data),
291
14.7k
              _options(options),
292
14.7k
              _parsed(false),
293
14.7k
              _num_elements(0),
294
14.7k
              _num_element_after_padding(0),
295
14.7k
              _size_of_element(0),
296
14.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
38.4k
            : _data(data),
291
38.4k
              _options(options),
292
38.4k
              _parsed(false),
293
38.4k
              _num_elements(0),
294
38.4k
              _num_element_after_padding(0),
295
38.4k
              _size_of_element(0),
296
38.4k
              _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.76k
            : _data(data),
291
1.76k
              _options(options),
292
1.76k
              _parsed(false),
293
1.76k
              _num_elements(0),
294
1.76k
              _num_element_after_padding(0),
295
1.76k
              _size_of_element(0),
296
1.76k
              _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.07k
            : _data(data),
291
1.07k
              _options(options),
292
1.07k
              _parsed(false),
293
1.07k
              _num_elements(0),
294
1.07k
              _num_element_after_padding(0),
295
1.07k
              _size_of_element(0),
296
1.07k
              _cur_index(0) {}
297
298
1.11M
    Status init() override {
299
1.11M
        CHECK(!_parsed);
300
1.11M
        size_t unused;
301
1.11M
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.11M
                                                 _num_element_after_padding, _size_of_element));
303
304
1.11M
        if (_data.size !=
305
1.11M
            _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.11M
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.11M
                     _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.11M
        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.11M
        _parsed = true;
325
1.11M
        return Status::OK();
326
1.11M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
298
500k
    Status init() override {
299
500k
        CHECK(!_parsed);
300
500k
        size_t unused;
301
500k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
500k
                                                 _num_element_after_padding, _size_of_element));
303
304
500k
        if (_data.size !=
305
500k
            _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
500k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
500k
                     _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
500k
        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
500k
        _parsed = true;
325
500k
        return Status::OK();
326
500k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
104k
    Status init() override {
299
104k
        CHECK(!_parsed);
300
104k
        size_t unused;
301
104k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
104k
                                                 _num_element_after_padding, _size_of_element));
303
304
104k
        if (_data.size !=
305
104k
            _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
104k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
104k
                     _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
104k
        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
104k
        _parsed = true;
325
104k
        return Status::OK();
326
104k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
21.6k
    Status init() override {
299
21.6k
        CHECK(!_parsed);
300
21.6k
        size_t unused;
301
21.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
21.6k
                                                 _num_element_after_padding, _size_of_element));
303
304
21.6k
        if (_data.size !=
305
21.6k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
21.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
21.6k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
21.6k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
21.6k
        _parsed = true;
325
21.6k
        return Status::OK();
326
21.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
105k
    Status init() override {
299
105k
        CHECK(!_parsed);
300
105k
        size_t unused;
301
105k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
105k
                                                 _num_element_after_padding, _size_of_element));
303
304
105k
        if (_data.size !=
305
105k
            _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
105k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
105k
                     _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
105k
        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
105k
        _parsed = true;
325
105k
        return Status::OK();
326
105k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
298
20.9k
    Status init() override {
299
20.9k
        CHECK(!_parsed);
300
20.9k
        size_t unused;
301
20.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
20.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
20.9k
        if (_data.size !=
305
20.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
20.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
20.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
20.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
20.9k
        _parsed = true;
325
20.9k
        return Status::OK();
326
20.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
298
90.9k
    Status init() override {
299
90.9k
        CHECK(!_parsed);
300
90.9k
        size_t unused;
301
90.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
90.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
90.9k
        if (_data.size !=
305
90.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
90.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
90.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
90.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
90.9k
        _parsed = true;
325
90.9k
        return Status::OK();
326
90.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.9k
    Status init() override {
299
27.9k
        CHECK(!_parsed);
300
27.9k
        size_t unused;
301
27.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
27.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
27.9k
        if (_data.size !=
305
27.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
27.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
27.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
27.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
27.9k
        _parsed = true;
325
27.9k
        return Status::OK();
326
27.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
1.72k
    Status init() override {
299
1.72k
        CHECK(!_parsed);
300
1.72k
        size_t unused;
301
1.72k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.72k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.72k
        if (_data.size !=
305
1.72k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.72k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.72k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.72k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.72k
        _parsed = true;
325
1.72k
        return Status::OK();
326
1.72k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
58.2k
    Status init() override {
299
58.2k
        CHECK(!_parsed);
300
58.2k
        size_t unused;
301
58.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
58.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
58.2k
        if (_data.size !=
305
58.2k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
58.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
58.2k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
58.2k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
58.2k
        _parsed = true;
325
58.2k
        return Status::OK();
326
58.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
298
64.3k
    Status init() override {
299
64.3k
        CHECK(!_parsed);
300
64.3k
        size_t unused;
301
64.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
64.3k
                                                 _num_element_after_padding, _size_of_element));
303
304
64.3k
        if (_data.size !=
305
64.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
64.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
64.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
64.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
64.3k
        _parsed = true;
325
64.3k
        return Status::OK();
326
64.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
298
2.48k
    Status init() override {
299
2.48k
        CHECK(!_parsed);
300
2.48k
        size_t unused;
301
2.48k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
2.48k
                                                 _num_element_after_padding, _size_of_element));
303
304
2.48k
        if (_data.size !=
305
2.48k
            _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.48k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
2.48k
                     _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.48k
        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.48k
        _parsed = true;
325
2.48k
        return Status::OK();
326
2.48k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
298
14.7k
    Status init() override {
299
14.7k
        CHECK(!_parsed);
300
14.7k
        size_t unused;
301
14.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
14.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
14.7k
        if (_data.size !=
305
14.7k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
14.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
14.7k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
14.7k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
14.7k
        _parsed = true;
325
14.7k
        return Status::OK();
326
14.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
298
1.35k
    Status init() override {
299
1.35k
        CHECK(!_parsed);
300
1.35k
        size_t unused;
301
1.35k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.35k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.35k
        if (_data.size !=
305
1.35k
            _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.35k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.35k
                     _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.35k
        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.35k
        _parsed = true;
325
1.35k
        return Status::OK();
326
1.35k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
298
14.7k
    Status init() override {
299
14.7k
        CHECK(!_parsed);
300
14.7k
        size_t unused;
301
14.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
14.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
14.7k
        if (_data.size !=
305
14.7k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
14.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
14.7k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
14.7k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
14.7k
        _parsed = true;
325
14.7k
        return Status::OK();
326
14.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
298
38.4k
    Status init() override {
299
38.4k
        CHECK(!_parsed);
300
38.4k
        size_t unused;
301
38.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
38.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
38.4k
        if (_data.size !=
305
38.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
38.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
38.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
38.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
38.4k
        _parsed = true;
325
38.4k
        return Status::OK();
326
38.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
298
29.2k
    Status init() override {
299
29.2k
        CHECK(!_parsed);
300
29.2k
        size_t unused;
301
29.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
29.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
29.2k
        if (_data.size !=
305
29.2k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
29.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
29.2k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
29.2k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
29.2k
        _parsed = true;
325
29.2k
        return Status::OK();
326
29.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
298
1.76k
    Status init() override {
299
1.76k
        CHECK(!_parsed);
300
1.76k
        size_t unused;
301
1.76k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.76k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.76k
        if (_data.size !=
305
1.76k
            _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.76k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.76k
                     _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.76k
        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.76k
        _parsed = true;
325
1.76k
        return Status::OK();
326
1.76k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
298
1.17k
    Status init() override {
299
1.17k
        CHECK(!_parsed);
300
1.17k
        size_t unused;
301
1.17k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.17k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.17k
        if (_data.size !=
305
1.17k
            _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.17k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.17k
                     _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.17k
        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.17k
        _parsed = true;
325
1.17k
        return Status::OK();
326
1.17k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
298
1.07k
    Status init() override {
299
1.07k
        CHECK(!_parsed);
300
1.07k
        size_t unused;
301
1.07k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.07k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.07k
        if (_data.size !=
305
1.07k
            _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.07k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.07k
                     _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.07k
        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.07k
        _parsed = true;
325
1.07k
        return Status::OK();
326
1.07k
    }
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.10M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
4.10M
        if (_num_elements == 0) [[unlikely]] {
337
4.88k
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
4.88k
        }
342
343
4.10M
        DCHECK_LE(pos, _num_elements);
344
4.10M
        _cur_index = pos;
345
4.10M
        return Status::OK();
346
4.10M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.72M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
1.72M
        if (_num_elements == 0) [[unlikely]] {
337
1.79k
            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.79k
        }
342
343
1.72M
        DCHECK_LE(pos, _num_elements);
344
1.72M
        _cur_index = pos;
345
1.72M
        return Status::OK();
346
1.72M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
308k
    Status seek_to_position_in_page(size_t pos) override {
335
308k
        DCHECK(_parsed) << "Must call init()";
336
308k
        if (_num_elements == 0) [[unlikely]] {
337
443
            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
443
        }
342
343
308k
        DCHECK_LE(pos, _num_elements);
344
308k
        _cur_index = pos;
345
308k
        return Status::OK();
346
308k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
221k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
221k
        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
221k
        DCHECK_LE(pos, _num_elements);
344
221k
        _cur_index = pos;
345
221k
        return Status::OK();
346
221k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
155k
    Status seek_to_position_in_page(size_t pos) override {
335
155k
        DCHECK(_parsed) << "Must call init()";
336
155k
        if (_num_elements == 0) [[unlikely]] {
337
733
            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
733
        }
342
343
155k
        DCHECK_LE(pos, _num_elements);
344
155k
        _cur_index = pos;
345
155k
        return Status::OK();
346
155k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
334
118k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
118k
        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
118k
        DCHECK_LE(pos, _num_elements);
344
118k
        _cur_index = pos;
345
118k
        return Status::OK();
346
118k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
334
14.0k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
14.0k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
14.0k
        DCHECK_LE(pos, _num_elements);
344
14.0k
        _cur_index = pos;
345
14.0k
        return Status::OK();
346
14.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
224k
    Status seek_to_position_in_page(size_t pos) override {
335
224k
        DCHECK(_parsed) << "Must call init()";
336
224k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
224k
        DCHECK_LE(pos, _num_elements);
344
224k
        _cur_index = pos;
345
224k
        return Status::OK();
346
224k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
334
200k
    Status seek_to_position_in_page(size_t pos) override {
335
200k
        DCHECK(_parsed) << "Must call init()";
336
200k
        if (_num_elements == 0) [[unlikely]] {
337
5
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
5
        }
342
343
200k
        DCHECK_LE(pos, _num_elements);
344
200k
        _cur_index = pos;
345
200k
        return Status::OK();
346
200k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
334
211k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
211k
        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
211k
        DCHECK_LE(pos, _num_elements);
344
211k
        _cur_index = pos;
345
211k
        return Status::OK();
346
211k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
334
506k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
506k
        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
506k
        DCHECK_LE(pos, _num_elements);
344
506k
        _cur_index = pos;
345
506k
        return Status::OK();
346
506k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
334
78.5k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
78.5k
        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
78.5k
        DCHECK_LE(pos, _num_elements);
344
78.5k
        _cur_index = pos;
345
78.5k
        return Status::OK();
346
78.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
199k
    Status seek_to_position_in_page(size_t pos) override {
335
199k
        DCHECK(_parsed) << "Must call init()";
336
199k
        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
199k
        DCHECK_LE(pos, _num_elements);
344
199k
        _cur_index = pos;
345
199k
        return Status::OK();
346
199k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
334
6.62k
    Status seek_to_position_in_page(size_t pos) override {
335
6.62k
        DCHECK(_parsed) << "Must call init()";
336
6.62k
        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.62k
        DCHECK_LE(pos, _num_elements);
344
6.62k
        _cur_index = pos;
345
6.62k
        return Status::OK();
346
6.62k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
Line
Count
Source
334
82
    Status seek_to_position_in_page(size_t pos) override {
335
82
        DCHECK(_parsed) << "Must call init()";
336
82
        if (_num_elements == 0) [[unlikely]] {
337
8
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
8
        }
342
343
82
        DCHECK_LE(pos, _num_elements);
344
82
        _cur_index = pos;
345
82
        return Status::OK();
346
82
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Line
Count
Source
334
860
    Status seek_to_position_in_page(size_t pos) override {
335
860
        DCHECK(_parsed) << "Must call init()";
336
860
        if (_num_elements == 0) [[unlikely]] {
337
27
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
27
        }
342
343
860
        DCHECK_LE(pos, _num_elements);
344
860
        _cur_index = pos;
345
860
        return Status::OK();
346
860
    }
_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
12
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
12
        }
342
343
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
114k
    Status seek_to_position_in_page(size_t pos) override {
335
114k
        DCHECK(_parsed) << "Must call init()";
336
114k
        if (_num_elements == 0) [[unlikely]] {
337
10
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
10
        }
342
343
114k
        DCHECK_LE(pos, _num_elements);
344
114k
        _cur_index = pos;
345
114k
        return Status::OK();
346
114k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.98k
    Status seek_to_position_in_page(size_t pos) override {
335
1.98k
        DCHECK(_parsed) << "Must call init()";
336
1.98k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
1.98k
        DCHECK_LE(pos, _num_elements);
344
1.98k
        _cur_index = pos;
345
1.98k
        return Status::OK();
346
1.98k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE24seek_to_position_in_pageEm
Line
Count
Source
334
47
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
47
        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
47
        DCHECK_LE(pos, _num_elements);
344
47
        _cur_index = pos;
345
47
        return Status::OK();
346
47
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE24seek_to_position_in_pageEm
Line
Count
Source
334
89
    Status seek_to_position_in_page(size_t pos) override {
335
89
        DCHECK(_parsed) << "Must call init()";
336
89
        if (_num_elements == 0) [[unlikely]] {
337
1
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
1
        }
342
343
89
        DCHECK_LE(pos, _num_elements);
344
89
        _cur_index = pos;
345
89
        return Status::OK();
346
89
    }
347
348
0
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
349
0
        DCHECK(_parsed) << "Must call init() firstly";
350
351
0
        if (_num_elements == 0) {
352
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
353
0
        }
354
355
0
        size_t left = 0;
356
0
        size_t right = _num_elements;
357
358
0
        void* mid_value = nullptr;
359
360
        // find the first value >= target. after loop,
361
        // - left == index of first value >= target when found
362
        // - left == _num_elements when not found (all values < target)
363
0
        while (left < right) {
364
0
            size_t mid = left + (right - left) / 2;
365
0
            mid_value = get_data(mid);
366
0
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
367
0
                left = mid + 1;
368
0
            } else {
369
0
                right = mid;
370
0
            }
371
0
        }
372
0
        if (left >= _num_elements) {
373
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
374
0
        }
375
0
        void* find_value = get_data(left);
376
0
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
377
0
            *exact_match = true;
378
0
        } else {
379
0
            *exact_match = false;
380
0
        }
381
382
0
        _cur_index = left;
383
0
        return Status::OK();
384
0
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE22seek_at_or_after_valueEPKvPb
385
386
    template <bool forward_index = true>
387
1.75M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.75M
        DCHECK(_parsed);
389
1.75M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.75M
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.75M
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.75M
        *n = max_fetch;
398
1.75M
        if constexpr (forward_index) {
399
1.59M
            _cur_index += max_fetch;
400
1.59M
        }
401
402
1.75M
        return Status::OK();
403
1.75M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
493k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
493k
        DCHECK(_parsed);
389
493k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
493k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
493k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
493k
        *n = max_fetch;
398
493k
        if constexpr (forward_index) {
399
493k
            _cur_index += max_fetch;
400
493k
        }
401
402
493k
        return Status::OK();
403
493k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
219k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
219k
        DCHECK(_parsed);
389
219k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
219k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
219k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
219k
        *n = max_fetch;
398
219k
        if constexpr (forward_index) {
399
219k
            _cur_index += max_fetch;
400
219k
        }
401
402
219k
        return Status::OK();
403
219k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
19.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
19.0k
        DCHECK(_parsed);
389
19.0k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
19.0k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
19.0k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
19.0k
        *n = max_fetch;
398
19.0k
        if constexpr (forward_index) {
399
19.0k
            _cur_index += max_fetch;
400
19.0k
        }
401
402
19.0k
        return Status::OK();
403
19.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
98.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
98.5k
        DCHECK(_parsed);
389
98.5k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
98.5k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
98.5k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
98.5k
        *n = max_fetch;
398
98.5k
        if constexpr (forward_index) {
399
98.5k
            _cur_index += max_fetch;
400
98.5k
        }
401
402
98.5k
        return Status::OK();
403
98.5k
    }
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.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
31.7k
        DCHECK(_parsed);
389
31.7k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
31.7k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
31.7k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
31.7k
        *n = max_fetch;
398
31.7k
        if constexpr (forward_index) {
399
31.7k
            _cur_index += max_fetch;
400
31.7k
        }
401
402
31.7k
        return Status::OK();
403
31.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
130k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
130k
        DCHECK(_parsed);
389
130k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
130k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
130k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
130k
        *n = max_fetch;
398
130k
        if constexpr (forward_index) {
399
130k
            _cur_index += max_fetch;
400
130k
        }
401
402
130k
        return Status::OK();
403
130k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
162k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
162k
        DCHECK(_parsed);
389
162k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
162k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
162k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
162k
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
162k
        return Status::OK();
403
162k
    }
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.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
13.6k
        DCHECK(_parsed);
389
13.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
13.6k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
13.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
13.6k
        *n = max_fetch;
398
13.6k
        if constexpr (forward_index) {
399
13.6k
            _cur_index += max_fetch;
400
13.6k
        }
401
402
13.6k
        return Status::OK();
403
13.6k
    }
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
4.24k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
4.24k
        DCHECK(_parsed);
389
4.24k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
4.24k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
4.24k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
4.24k
        *n = max_fetch;
398
4.24k
        if constexpr (forward_index) {
399
4.24k
            _cur_index += max_fetch;
400
4.24k
        }
401
402
4.24k
        return Status::OK();
403
4.24k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
397k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
397k
        DCHECK(_parsed);
389
397k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
397k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
397k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
397k
        *n = max_fetch;
398
397k
        if constexpr (forward_index) {
399
397k
            _cur_index += max_fetch;
400
397k
        }
401
402
397k
        return Status::OK();
403
397k
    }
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.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
78.6k
        DCHECK(_parsed);
389
78.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
78.6k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
78.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
78.6k
        *n = max_fetch;
398
78.6k
        if constexpr (forward_index) {
399
78.6k
            _cur_index += max_fetch;
400
78.6k
        }
401
402
78.6k
        return Status::OK();
403
78.6k
    }
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.38k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.38k
        DCHECK(_parsed);
389
1.38k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.38k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.38k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.38k
        *n = max_fetch;
398
1.38k
        if constexpr (forward_index) {
399
1.38k
            _cur_index += max_fetch;
400
1.38k
        }
401
402
1.38k
        return Status::OK();
403
1.38k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
7.48k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
7.48k
        DCHECK(_parsed);
389
7.48k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
7.48k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
7.48k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
7.48k
        *n = max_fetch;
398
7.48k
        if constexpr (forward_index) {
399
7.48k
            _cur_index += max_fetch;
400
7.48k
        }
401
402
7.48k
        return Status::OK();
403
7.48k
    }
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.26k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.26k
        DCHECK(_parsed);
389
1.26k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.26k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.26k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.26k
        *n = max_fetch;
398
1.26k
        if constexpr (forward_index) {
399
1.26k
            _cur_index += max_fetch;
400
1.26k
        }
401
402
1.26k
        return Status::OK();
403
1.26k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
7.88k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
7.88k
        DCHECK(_parsed);
389
7.88k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
7.88k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
7.88k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
7.88k
        *n = max_fetch;
398
7.88k
        if constexpr (forward_index) {
399
7.88k
            _cur_index += max_fetch;
400
7.88k
        }
401
402
7.88k
        return Status::OK();
403
7.88k
    }
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.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
30.2k
        DCHECK(_parsed);
389
30.2k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
30.2k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
30.2k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
30.2k
        *n = max_fetch;
398
30.2k
        if constexpr (forward_index) {
399
30.2k
            _cur_index += max_fetch;
400
30.2k
        }
401
402
30.2k
        return Status::OK();
403
30.2k
    }
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.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
25.6k
        DCHECK(_parsed);
389
25.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
25.6k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
25.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
25.6k
        *n = max_fetch;
398
25.6k
        if constexpr (forward_index) {
399
25.6k
            _cur_index += max_fetch;
400
25.6k
        }
401
402
25.6k
        return Status::OK();
403
25.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.20k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.20k
        DCHECK(_parsed);
389
3.20k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.20k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.20k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.20k
        *n = max_fetch;
398
3.20k
        if constexpr (forward_index) {
399
3.20k
            _cur_index += max_fetch;
400
3.20k
        }
401
402
3.20k
        return Status::OK();
403
3.20k
    }
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.23k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.23k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.23k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.23k
        *n = max_fetch;
398
3.23k
        if constexpr (forward_index) {
399
3.23k
            _cur_index += max_fetch;
400
3.23k
        }
401
402
3.23k
        return Status::OK();
403
3.23k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
5.74k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
5.74k
        DCHECK(_parsed);
389
5.74k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
5.74k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
5.74k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
5.74k
        *n = max_fetch;
398
5.74k
        if constexpr (forward_index) {
399
5.74k
            _cur_index += max_fetch;
400
5.74k
        }
401
402
5.74k
        return Status::OK();
403
5.74k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
404
405
1.59M
    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
493k
    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
219k
    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
19.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
98.5k
    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.7k
    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
130k
    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.6k
    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
4.24k
    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
397k
    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.7k
    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.38k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
7.49k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
1.27k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
7.89k
    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.3k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
25.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
3.20k
    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.74k
    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
375k
                          MutableColumnPtr& dst) override {
409
375k
        DCHECK(_parsed);
410
375k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
375k
        auto total = *n;
416
375k
        auto read_count = 0;
417
375k
        _buffer.resize(total);
418
130M
        for (size_t i = 0; i < total; ++i) {
419
130M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
130M
            if (UNLIKELY(ord >= _num_elements)) {
421
12.8k
                break;
422
12.8k
            }
423
424
130M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
130M
        }
426
427
375k
        if (LIKELY(read_count > 0)) {
428
375k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
375k
        }
430
431
375k
        *n = read_count;
432
375k
        return Status::OK();
433
375k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
79.1k
                          MutableColumnPtr& dst) override {
409
79.1k
        DCHECK(_parsed);
410
79.1k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
79.1k
        auto total = *n;
416
79.1k
        auto read_count = 0;
417
79.1k
        _buffer.resize(total);
418
39.1M
        for (size_t i = 0; i < total; ++i) {
419
39.1M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
39.1M
            if (UNLIKELY(ord >= _num_elements)) {
421
590
                break;
422
590
            }
423
424
39.1M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
39.1M
        }
426
427
79.2k
        if (LIKELY(read_count > 0)) {
428
79.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
79.2k
        }
430
431
79.1k
        *n = read_count;
432
79.1k
        return Status::OK();
433
79.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
31.2k
                          MutableColumnPtr& dst) override {
409
31.2k
        DCHECK(_parsed);
410
31.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
31.2k
        auto total = *n;
416
31.2k
        auto read_count = 0;
417
31.2k
        _buffer.resize(total);
418
1.73M
        for (size_t i = 0; i < total; ++i) {
419
1.70M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.70M
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
1.70M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.70M
        }
426
427
31.3k
        if (LIKELY(read_count > 0)) {
428
31.3k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
31.3k
        }
430
431
31.2k
        *n = read_count;
432
31.2k
        return Status::OK();
433
31.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
10.1k
                          MutableColumnPtr& dst) override {
409
10.1k
        DCHECK(_parsed);
410
10.1k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
10.1k
        auto total = *n;
416
10.1k
        auto read_count = 0;
417
10.1k
        _buffer.resize(total);
418
627k
        for (size_t i = 0; i < total; ++i) {
419
617k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
617k
            if (UNLIKELY(ord >= _num_elements)) {
421
14
                break;
422
14
            }
423
424
617k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
617k
        }
426
427
10.1k
        if (LIKELY(read_count > 0)) {
428
10.1k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
10.1k
        }
430
431
10.1k
        *n = read_count;
432
10.1k
        return Status::OK();
433
10.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
65.8k
                          MutableColumnPtr& dst) override {
409
65.8k
        DCHECK(_parsed);
410
65.8k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
65.8k
        auto total = *n;
416
65.8k
        auto read_count = 0;
417
65.8k
        _buffer.resize(total);
418
27.4M
        for (size_t i = 0; i < total; ++i) {
419
27.3M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
27.3M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.25k
                break;
422
1.25k
            }
423
424
27.3M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
27.3M
        }
426
427
65.8k
        if (LIKELY(read_count > 0)) {
428
65.8k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
65.8k
        }
430
431
65.8k
        *n = read_count;
432
65.8k
        return Status::OK();
433
65.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
9.52k
                          MutableColumnPtr& dst) override {
409
9.52k
        DCHECK(_parsed);
410
9.52k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
9.52k
        auto total = *n;
416
9.52k
        auto read_count = 0;
417
9.52k
        _buffer.resize(total);
418
1.14M
        for (size_t i = 0; i < total; ++i) {
419
1.13M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.13M
            if (UNLIKELY(ord >= _num_elements)) {
421
559
                break;
422
559
            }
423
424
1.13M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.13M
        }
426
427
9.52k
        if (LIKELY(read_count > 0)) {
428
9.52k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
9.52k
        }
430
431
9.52k
        *n = read_count;
432
9.52k
        return Status::OK();
433
9.52k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
33.2k
                          MutableColumnPtr& dst) override {
409
33.2k
        DCHECK(_parsed);
410
33.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
33.2k
        auto total = *n;
416
33.2k
        auto read_count = 0;
417
33.2k
        _buffer.resize(total);
418
7.11M
        for (size_t i = 0; i < total; ++i) {
419
7.08M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
7.08M
            if (UNLIKELY(ord >= _num_elements)) {
421
2.43k
                break;
422
2.43k
            }
423
424
7.08M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
7.08M
        }
426
427
33.3k
        if (LIKELY(read_count > 0)) {
428
33.3k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
33.3k
        }
430
431
33.2k
        *n = read_count;
432
33.2k
        return Status::OK();
433
33.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
10.0k
                          MutableColumnPtr& dst) override {
409
10.0k
        DCHECK(_parsed);
410
10.0k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
10.0k
        auto total = *n;
416
10.0k
        auto read_count = 0;
417
10.0k
        _buffer.resize(total);
418
1.23M
        for (size_t i = 0; i < total; ++i) {
419
1.22M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.22M
            if (UNLIKELY(ord >= _num_elements)) {
421
32
                break;
422
32
            }
423
424
1.22M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.22M
        }
426
427
10.0k
        if (LIKELY(read_count > 0)) {
428
10.0k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
10.0k
        }
430
431
10.0k
        *n = read_count;
432
10.0k
        return Status::OK();
433
10.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.9k
                          MutableColumnPtr& dst) override {
409
13.9k
        DCHECK(_parsed);
410
13.9k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.9k
        auto total = *n;
416
13.9k
        auto read_count = 0;
417
13.9k
        _buffer.resize(total);
418
2.01M
        for (size_t i = 0; i < total; ++i) {
419
2.00M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
2.00M
            if (UNLIKELY(ord >= _num_elements)) {
421
431
                break;
422
431
            }
423
424
1.99M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.99M
        }
426
427
13.9k
        if (LIKELY(read_count > 0)) {
428
13.9k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.9k
        }
430
431
13.9k
        *n = read_count;
432
13.9k
        return Status::OK();
433
13.9k
    }
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.45k
                          MutableColumnPtr& dst) override {
409
1.45k
        DCHECK(_parsed);
410
1.45k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.45k
        auto total = *n;
416
1.45k
        auto read_count = 0;
417
1.45k
        _buffer.resize(total);
418
505k
        for (size_t i = 0; i < total; ++i) {
419
503k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
503k
            if (UNLIKELY(ord >= _num_elements)) {
421
11
                break;
422
11
            }
423
424
503k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
503k
        }
426
427
1.45k
        if (LIKELY(read_count > 0)) {
428
1.45k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.45k
        }
430
431
1.45k
        *n = read_count;
432
1.45k
        return Status::OK();
433
1.45k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
28.7k
                          MutableColumnPtr& dst) override {
409
28.7k
        DCHECK(_parsed);
410
28.7k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
28.7k
        auto total = *n;
416
28.7k
        auto read_count = 0;
417
28.7k
        _buffer.resize(total);
418
7.33M
        for (size_t i = 0; i < total; ++i) {
419
7.31M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
7.31M
            if (UNLIKELY(ord >= _num_elements)) {
421
551
                break;
422
551
            }
423
424
7.31M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
7.31M
        }
426
427
28.7k
        if (LIKELY(read_count > 0)) {
428
28.7k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
28.7k
        }
430
431
28.7k
        *n = read_count;
432
28.7k
        return Status::OK();
433
28.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
31.2k
                          MutableColumnPtr& dst) override {
409
31.2k
        DCHECK(_parsed);
410
31.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
31.2k
        auto total = *n;
416
31.2k
        auto read_count = 0;
417
31.2k
        _buffer.resize(total);
418
9.48M
        for (size_t i = 0; i < total; ++i) {
419
9.45M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.45M
            if (UNLIKELY(ord >= _num_elements)) {
421
203
                break;
422
203
            }
423
424
9.45M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.45M
        }
426
427
31.2k
        if (LIKELY(read_count > 0)) {
428
31.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
31.2k
        }
430
431
31.2k
        *n = read_count;
432
31.2k
        return Status::OK();
433
31.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1.86k
                          MutableColumnPtr& dst) override {
409
1.86k
        DCHECK(_parsed);
410
1.86k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.86k
        auto total = *n;
416
1.86k
        auto read_count = 0;
417
1.86k
        _buffer.resize(total);
418
504k
        for (size_t i = 0; i < total; ++i) {
419
502k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
502k
            if (UNLIKELY(ord >= _num_elements)) {
421
239
                break;
422
239
            }
423
424
502k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
502k
        }
426
427
1.86k
        if (LIKELY(read_count > 0)) {
428
1.86k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.86k
        }
430
431
1.86k
        *n = read_count;
432
1.86k
        return Status::OK();
433
1.86k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
11.6k
                          MutableColumnPtr& dst) override {
409
11.6k
        DCHECK(_parsed);
410
11.6k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
11.6k
        auto total = *n;
416
11.6k
        auto read_count = 0;
417
11.6k
        _buffer.resize(total);
418
24.8k
        for (size_t i = 0; i < total; ++i) {
419
13.1k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
13.1k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
13.1k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
13.1k
        }
426
427
11.6k
        if (LIKELY(read_count > 0)) {
428
11.6k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
11.6k
        }
430
431
11.6k
        *n = read_count;
432
11.6k
        return Status::OK();
433
11.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
164
                          MutableColumnPtr& dst) override {
409
164
        DCHECK(_parsed);
410
164
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
164
        auto total = *n;
416
164
        auto read_count = 0;
417
164
        _buffer.resize(total);
418
334
        for (size_t i = 0; i < total; ++i) {
419
170
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
170
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
170
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
170
        }
426
427
164
        if (LIKELY(read_count > 0)) {
428
164
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
164
        }
430
431
164
        *n = read_count;
432
164
        return Status::OK();
433
164
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4.48k
                          MutableColumnPtr& dst) override {
409
4.48k
        DCHECK(_parsed);
410
4.48k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.48k
        auto total = *n;
416
4.48k
        auto read_count = 0;
417
4.48k
        _buffer.resize(total);
418
18.9k
        for (size_t i = 0; i < total; ++i) {
419
14.4k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.4k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
14.4k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.4k
        }
426
427
4.48k
        if (LIKELY(read_count > 0)) {
428
4.48k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.48k
        }
430
431
4.48k
        *n = read_count;
432
4.48k
        return Status::OK();
433
4.48k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
26.9k
                          MutableColumnPtr& dst) override {
409
26.9k
        DCHECK(_parsed);
410
26.9k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
26.9k
        auto total = *n;
416
26.9k
        auto read_count = 0;
417
26.9k
        _buffer.resize(total);
418
23.1M
        for (size_t i = 0; i < total; ++i) {
419
23.1M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
23.1M
            if (UNLIKELY(ord >= _num_elements)) {
421
5.80k
                break;
422
5.80k
            }
423
424
23.1M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
23.1M
        }
426
427
26.9k
        if (LIKELY(read_count > 0)) {
428
26.9k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
26.9k
        }
430
431
26.9k
        *n = read_count;
432
26.9k
        return Status::OK();
433
26.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.5k
                          MutableColumnPtr& dst) override {
409
13.5k
        DCHECK(_parsed);
410
13.5k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.5k
        auto total = *n;
416
13.5k
        auto read_count = 0;
417
13.5k
        _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
707
                break;
422
707
            }
423
424
8.93M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
8.93M
        }
426
427
13.5k
        if (LIKELY(read_count > 0)) {
428
13.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.5k
        }
430
431
13.5k
        *n = read_count;
432
13.5k
        return Status::OK();
433
13.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
962
                          MutableColumnPtr& dst) override {
409
962
        DCHECK(_parsed);
410
962
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
962
        auto total = *n;
416
962
        auto read_count = 0;
417
962
        _buffer.resize(total);
418
2.77k
        for (size_t i = 0; i < total; ++i) {
419
1.81k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.81k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
1.81k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.81k
        }
426
427
963
        if (LIKELY(read_count > 0)) {
428
963
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
963
        }
430
431
962
        *n = read_count;
432
962
        return Status::OK();
433
962
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
446
                          MutableColumnPtr& dst) override {
409
446
        DCHECK(_parsed);
410
446
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
446
        auto total = *n;
416
446
        auto read_count = 0;
417
446
        _buffer.resize(total);
418
1.15k
        for (size_t i = 0; i < total; ++i) {
419
706
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
706
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
706
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
706
        }
426
427
448
        if (LIKELY(read_count > 0)) {
428
448
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
448
        }
430
431
446
        *n = read_count;
432
446
        return Status::OK();
433
446
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
347
                          MutableColumnPtr& dst) override {
409
347
        DCHECK(_parsed);
410
347
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
347
        auto total = *n;
416
347
        auto read_count = 0;
417
347
        _buffer.resize(total);
418
1.21k
        for (size_t i = 0; i < total; ++i) {
419
863
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
863
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
863
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
863
        }
426
427
349
        if (LIKELY(read_count > 0)) {
428
349
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
349
        }
430
431
347
        *n = read_count;
432
347
        return Status::OK();
433
347
    }
434
435
162k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
162k
        return next_batch<false>(n, dst);
437
162k
    }
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
162k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
162k
        return next_batch<false>(n, dst);
437
162k
    }
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.84M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
968k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
441
218k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
441
217k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
113k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
441
112k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE13current_indexEv
Line
Count
Source
441
222k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
199k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
441
206k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
441
222k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
441
50.9k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
441
197k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Line
Count
Source
441
1.00k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE13current_indexEv
Line
Count
Source
441
10
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE13current_indexEv
Line
Count
Source
441
3.42k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
441
571
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
441
110k
    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
46
    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
132M
    char* get_data(size_t index) const {
444
132M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
132M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
40.5M
    char* get_data(size_t index) const {
444
40.5M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
40.5M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
1.92M
    char* get_data(size_t index) const {
444
1.92M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.92M
    }
_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
27.4M
    char* get_data(size_t index) const {
444
27.4M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
27.4M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
1.16M
    char* get_data(size_t index) const {
444
1.16M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.16M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
7.37M
    char* get_data(size_t index) const {
444
7.37M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
7.37M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
1.23M
    char* get_data(size_t index) const {
444
1.23M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.23M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
2.01M
    char* get_data(size_t index) const {
444
2.01M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
2.01M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
508k
    char* get_data(size_t index) const {
444
508k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
508k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
7.70M
    char* get_data(size_t index) const {
444
7.70M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
7.70M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
443
9.52M
    char* get_data(size_t index) const {
444
9.52M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.52M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
443
503k
    char* get_data(size_t index) const {
444
503k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
503k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
443
20.6k
    char* get_data(size_t index) const {
444
20.6k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20.6k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
443
1.43k
    char* get_data(size_t index) const {
444
1.43k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.43k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
443
22.3k
    char* get_data(size_t index) const {
444
22.3k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
22.3k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
443
23.1M
    char* get_data(size_t index) const {
444
23.1M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
23.1M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
8.95M
    char* get_data(size_t index) const {
444
8.95M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
8.95M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
443
5.01k
    char* get_data(size_t index) const {
444
5.01k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
5.01k
    }
_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.60k
    char* get_data(size_t index) const {
444
6.60k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
6.60k
    }
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