Coverage Report

Created: 2026-11-02 17: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/storage_layout.h"
42
#include "storage/types.h"
43
#include "util/alignment.h"
44
#include "util/coding.h"
45
#include "util/faststring.h"
46
#include "util/slice.h"
47
48
namespace doris {
49
namespace segment_v2 {
50
51
static constexpr size_t BITSHUFFLE_PAGE_HEADER_SIZE = 16;
52
53
void warn_with_bitshuffle_error(int64_t val);
54
55
// BitshufflePageBuilder bitshuffles and compresses the bits of fixed
56
// size type blocks with lz4.
57
//
58
// The page format is as follows:
59
//
60
// 1. Header: (16 bytes total)
61
//
62
//    <num_elements> [32-bit]
63
//      The number of elements encoded in the page.
64
//
65
//    <compressed_size> [32-bit]
66
//      The post-compression size of the page, including this header.
67
//
68
//    <padded_num_elements> [32-bit]
69
//      Padding is needed to meet the requirements of the bitshuffle
70
//      library such that the input/output is a multiple of 8. Some
71
//      ignored elements are appended to the end of the page if necessary
72
//      to meet this requirement.
73
//
74
//      This header field is the post-padding element count.
75
//
76
//    <elem_size_bytes> [32-bit]
77
//      The size of the elements, in bytes, as actually encoded. In the
78
//      case that all of the data in a page can fit into a smaller
79
//      integer type, then we may choose to encode that smaller type
80
//      to save CPU costs.
81
//
82
//      This is currently only implemented in the UINT32 page type.
83
//
84
//   NOTE: all on-disk ints are encoded little-endian
85
//
86
// 2. Element data
87
//
88
//    The header is followed by the bitshuffle-compressed element data.
89
//
90
template <FieldType Type>
91
class BitshufflePageBuilder : public PageBuilderHelper<BitshufflePageBuilder<Type>> {
92
public:
93
    using Self = BitshufflePageBuilder<Type>;
94
    friend class PageBuilderHelper<Self>;
95
96
774k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
96
55.4k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
96
9.06k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
96
347k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
96
137k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
96
11.1k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
96
65.0k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
Line
Count
Source
96
1
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
96
7.09k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
96
8.19k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
Line
Count
Source
96
2
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
96
344
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
96
37.4k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
96
44.4k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE4initEv
Line
Count
Source
96
342
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
96
440
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
96
7.70k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
96
340
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
96
9.72k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
96
12.0k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
96
17.0k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
96
1.21k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
96
674
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
96
668
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE4initEv
Line
Count
Source
96
584
    Status init() override { return reset(); }
97
98
148M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
98
56.9k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
98
8.41k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
98
147M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
98
476k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
98
10.1k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
98
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
98
6.33k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
98
9.59k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12is_page_fullEv
Line
Count
Source
98
194
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12is_page_fullEv
Line
Count
Source
98
450
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
98
44.0k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
98
44.2k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE12is_page_fullEv
Line
Count
Source
98
337
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
98
570
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
Line
Count
Source
98
7.69k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
98
312
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
98
5.24k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
98
26.4k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
98
18.0k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Line
Count
Source
98
1.47k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Line
Count
Source
98
628
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
98
650
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE12is_page_fullEv
Line
Count
Source
98
26.5k
    bool is_page_full() override { return _remain_element_capacity == 0; }
99
100
1.54M
    Status add(const uint8_t* vals, size_t* count) override {
101
1.54M
        return add_internal<false>(vals, count);
102
1.54M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
100
56.9k
    Status add(const uint8_t* vals, size_t* count) override {
101
56.9k
        return add_internal<false>(vals, count);
102
56.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
100
8.41k
    Status add(const uint8_t* vals, size_t* count) override {
101
8.41k
        return add_internal<false>(vals, count);
102
8.41k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
100
736k
    Status add(const uint8_t* vals, size_t* count) override {
101
736k
        return add_internal<false>(vals, count);
102
736k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
100
476k
    Status add(const uint8_t* vals, size_t* count) override {
101
476k
        return add_internal<false>(vals, count);
102
476k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
100
10.1k
    Status add(const uint8_t* vals, size_t* count) override {
101
10.1k
        return add_internal<false>(vals, count);
102
10.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
100
65.0k
    Status add(const uint8_t* vals, size_t* count) override {
101
65.0k
        return add_internal<false>(vals, count);
102
65.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
100
6.33k
    Status add(const uint8_t* vals, size_t* count) override {
101
6.33k
        return add_internal<false>(vals, count);
102
6.33k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
100
9.59k
    Status add(const uint8_t* vals, size_t* count) override {
101
9.59k
        return add_internal<false>(vals, count);
102
9.59k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
Line
Count
Source
100
194
    Status add(const uint8_t* vals, size_t* count) override {
101
194
        return add_internal<false>(vals, count);
102
194
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
100
452
    Status add(const uint8_t* vals, size_t* count) override {
101
452
        return add_internal<false>(vals, count);
102
452
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
100
44.0k
    Status add(const uint8_t* vals, size_t* count) override {
101
44.0k
        return add_internal<false>(vals, count);
102
44.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
100
44.2k
    Status add(const uint8_t* vals, size_t* count) override {
101
44.2k
        return add_internal<false>(vals, count);
102
44.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE3addEPKhPm
Line
Count
Source
100
337
    Status add(const uint8_t* vals, size_t* count) override {
101
337
        return add_internal<false>(vals, count);
102
337
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
100
570
    Status add(const uint8_t* vals, size_t* count) override {
101
570
        return add_internal<false>(vals, count);
102
570
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
Line
Count
Source
100
7.69k
    Status add(const uint8_t* vals, size_t* count) override {
101
7.69k
        return add_internal<false>(vals, count);
102
7.69k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
100
313
    Status add(const uint8_t* vals, size_t* count) override {
101
313
        return add_internal<false>(vals, count);
102
313
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
100
5.24k
    Status add(const uint8_t* vals, size_t* count) override {
101
5.24k
        return add_internal<false>(vals, count);
102
5.24k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
100
26.4k
    Status add(const uint8_t* vals, size_t* count) override {
101
26.4k
        return add_internal<false>(vals, count);
102
26.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
100
18.0k
    Status add(const uint8_t* vals, size_t* count) override {
101
18.0k
        return add_internal<false>(vals, count);
102
18.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Line
Count
Source
100
1.47k
    Status add(const uint8_t* vals, size_t* count) override {
101
1.47k
        return add_internal<false>(vals, count);
102
1.47k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Line
Count
Source
100
628
    Status add(const uint8_t* vals, size_t* count) override {
101
628
        return add_internal<false>(vals, count);
102
628
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
100
649
    Status add(const uint8_t* vals, size_t* count) override {
101
649
        return add_internal<false>(vals, count);
102
649
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE3addEPKhPm
Line
Count
Source
100
26.4k
    Status add(const uint8_t* vals, size_t* count) override {
101
26.4k
        return add_internal<false>(vals, count);
102
26.4k
    }
103
104
144M
    Status single_add(const uint8_t* vals, size_t* count) {
105
144M
        return add_internal<true>(vals, count);
106
144M
    }
107
108
    template <bool single>
109
142M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
142M
        DCHECK(!_finished);
111
142M
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
142M
        uint32_t to_add = cast_set<UInt32>(
127
142M
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
142M
        int to_add_size = to_add * SIZE_OF_TYPE;
130
142M
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
142M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
146M
        _count += to_add;
135
146M
        _remain_element_capacity -= to_add;
136
146M
        _raw_data_size += to_add_size;
137
        // return added number through count
138
146M
        *num_written = to_add;
139
146M
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
144M
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
144M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
144M
                        *reinterpret_cast<const uint32_t*>(vals);
150
144M
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
144M
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
0
        memcpy(&_data[orig_size], vals, to_add_size);
159
146M
        return Status::OK();
160
142M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
56.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
56.9k
        DCHECK(!_finished);
111
56.9k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
56.9k
        uint32_t to_add = cast_set<UInt32>(
127
56.9k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
56.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
56.9k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
56.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
56.9k
        _count += to_add;
135
56.9k
        _remain_element_capacity -= to_add;
136
56.9k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
56.9k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
56.9k
        memcpy(&_data[orig_size], vals, to_add_size);
159
56.9k
        return Status::OK();
160
56.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
8.41k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
8.41k
        DCHECK(!_finished);
111
8.41k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
8.41k
        uint32_t to_add = cast_set<UInt32>(
127
8.41k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
8.41k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
8.41k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
8.41k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
8.41k
        _count += to_add;
135
8.41k
        _remain_element_capacity -= to_add;
136
8.41k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
8.41k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
8.41k
        memcpy(&_data[orig_size], vals, to_add_size);
159
8.41k
        return Status::OK();
160
8.41k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
736k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
736k
        DCHECK(!_finished);
111
736k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
736k
        uint32_t to_add = cast_set<UInt32>(
127
736k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
736k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
736k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
736k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
736k
        _count += to_add;
135
736k
        _remain_element_capacity -= to_add;
136
736k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
736k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
736k
        memcpy(&_data[orig_size], vals, to_add_size);
159
736k
        return Status::OK();
160
736k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
476k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
476k
        DCHECK(!_finished);
111
476k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
476k
        uint32_t to_add = cast_set<UInt32>(
127
476k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
476k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
476k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
476k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
476k
        _count += to_add;
135
476k
        _remain_element_capacity -= to_add;
136
476k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
476k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
476k
        memcpy(&_data[orig_size], vals, to_add_size);
159
476k
        return Status::OK();
160
476k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
10.1k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
10.1k
        DCHECK(!_finished);
111
10.1k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
10.1k
        uint32_t to_add = cast_set<UInt32>(
127
10.1k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
10.1k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
10.1k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
10.1k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
10.1k
        _count += to_add;
135
10.1k
        _remain_element_capacity -= to_add;
136
10.1k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
10.1k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
10.1k
        memcpy(&_data[orig_size], vals, to_add_size);
159
10.1k
        return Status::OK();
160
10.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
65.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
65.0k
        DCHECK(!_finished);
111
65.0k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
65.0k
        uint32_t to_add = cast_set<UInt32>(
127
65.0k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
65.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
65.0k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
65.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
65.0k
        _count += to_add;
135
65.0k
        _remain_element_capacity -= to_add;
136
65.0k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
65.0k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
65.0k
        memcpy(&_data[orig_size], vals, to_add_size);
159
65.0k
        return Status::OK();
160
65.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
6.33k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
6.33k
        DCHECK(!_finished);
111
6.33k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
6.33k
        uint32_t to_add = cast_set<UInt32>(
127
6.33k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
6.33k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
6.33k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
6.33k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
6.33k
        _count += to_add;
135
6.33k
        _remain_element_capacity -= to_add;
136
6.33k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
6.33k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
6.33k
        memcpy(&_data[orig_size], vals, to_add_size);
159
6.33k
        return Status::OK();
160
6.33k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
9.59k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
9.59k
        DCHECK(!_finished);
111
9.59k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
9.59k
        uint32_t to_add = cast_set<UInt32>(
127
9.59k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
9.59k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
9.59k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
9.59k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
9.59k
        _count += to_add;
135
9.59k
        _remain_element_capacity -= to_add;
136
9.59k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
9.59k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
9.59k
        memcpy(&_data[orig_size], vals, to_add_size);
159
9.59k
        return Status::OK();
160
9.59k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
194
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
194
        DCHECK(!_finished);
111
194
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
194
        uint32_t to_add = cast_set<UInt32>(
127
194
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
194
        int to_add_size = to_add * SIZE_OF_TYPE;
130
194
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
194
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
194
        _count += to_add;
135
194
        _remain_element_capacity -= to_add;
136
194
        _raw_data_size += to_add_size;
137
        // return added number through count
138
194
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
194
        memcpy(&_data[orig_size], vals, to_add_size);
159
194
        return Status::OK();
160
194
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
452
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
452
        DCHECK(!_finished);
111
452
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
452
        uint32_t to_add = cast_set<UInt32>(
127
452
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
452
        int to_add_size = to_add * SIZE_OF_TYPE;
130
452
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
452
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
452
        _count += to_add;
135
452
        _remain_element_capacity -= to_add;
136
452
        _raw_data_size += to_add_size;
137
        // return added number through count
138
452
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
452
        memcpy(&_data[orig_size], vals, to_add_size);
159
452
        return Status::OK();
160
452
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
44.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
44.0k
        DCHECK(!_finished);
111
44.0k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
44.0k
        uint32_t to_add = cast_set<UInt32>(
127
44.0k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
44.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
44.0k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
44.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
44.0k
        _count += to_add;
135
44.0k
        _remain_element_capacity -= to_add;
136
44.0k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
44.0k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
44.0k
        memcpy(&_data[orig_size], vals, to_add_size);
159
44.0k
        return Status::OK();
160
44.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
44.2k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
44.2k
        DCHECK(!_finished);
111
44.2k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
44.2k
        uint32_t to_add = cast_set<UInt32>(
127
44.2k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
44.2k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
44.2k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
44.2k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
44.2k
        _count += to_add;
135
44.2k
        _remain_element_capacity -= to_add;
136
44.2k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
44.2k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
44.2k
        memcpy(&_data[orig_size], vals, to_add_size);
159
44.2k
        return Status::OK();
160
44.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
337
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
337
        DCHECK(!_finished);
111
337
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
337
        uint32_t to_add = cast_set<UInt32>(
127
337
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
337
        int to_add_size = to_add * SIZE_OF_TYPE;
130
337
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
337
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
337
        _count += to_add;
135
337
        _remain_element_capacity -= to_add;
136
337
        _raw_data_size += to_add_size;
137
        // return added number through count
138
337
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
337
        memcpy(&_data[orig_size], vals, to_add_size);
159
337
        return Status::OK();
160
337
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
570
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
570
        DCHECK(!_finished);
111
570
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
570
        uint32_t to_add = cast_set<UInt32>(
127
570
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
570
        int to_add_size = to_add * SIZE_OF_TYPE;
130
570
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
570
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
570
        _count += to_add;
135
570
        _remain_element_capacity -= to_add;
136
570
        _raw_data_size += to_add_size;
137
        // return added number through count
138
570
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
570
        memcpy(&_data[orig_size], vals, to_add_size);
159
570
        return Status::OK();
160
570
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
7.69k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
7.69k
        DCHECK(!_finished);
111
7.69k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
7.69k
        uint32_t to_add = cast_set<UInt32>(
127
7.69k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
7.69k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
7.69k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
7.69k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
7.69k
        _count += to_add;
135
7.69k
        _remain_element_capacity -= to_add;
136
7.69k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
7.69k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
7.69k
        memcpy(&_data[orig_size], vals, to_add_size);
159
7.69k
        return Status::OK();
160
7.69k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
313
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
313
        DCHECK(!_finished);
111
313
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
313
        uint32_t to_add = cast_set<UInt32>(
127
313
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
313
        int to_add_size = to_add * SIZE_OF_TYPE;
130
313
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
313
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
313
        _count += to_add;
135
313
        _remain_element_capacity -= to_add;
136
313
        _raw_data_size += to_add_size;
137
        // return added number through count
138
313
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
313
        memcpy(&_data[orig_size], vals, to_add_size);
159
313
        return Status::OK();
160
313
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
5.24k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
5.24k
        DCHECK(!_finished);
111
5.24k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
5.24k
        uint32_t to_add = cast_set<UInt32>(
127
5.24k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
5.24k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
5.24k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
5.24k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
5.24k
        _count += to_add;
135
5.24k
        _remain_element_capacity -= to_add;
136
5.24k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
5.24k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
5.24k
        memcpy(&_data[orig_size], vals, to_add_size);
159
5.24k
        return Status::OK();
160
5.24k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
26.4k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
26.4k
        DCHECK(!_finished);
111
26.4k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
26.4k
        uint32_t to_add = cast_set<UInt32>(
127
26.4k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
26.4k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
26.4k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
26.4k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
26.4k
        _count += to_add;
135
26.4k
        _remain_element_capacity -= to_add;
136
26.4k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
26.4k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
26.4k
        memcpy(&_data[orig_size], vals, to_add_size);
159
26.4k
        return Status::OK();
160
26.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
18.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
18.0k
        DCHECK(!_finished);
111
18.0k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
18.0k
        uint32_t to_add = cast_set<UInt32>(
127
18.0k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
18.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
18.0k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
18.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
18.0k
        _count += to_add;
135
18.0k
        _remain_element_capacity -= to_add;
136
18.0k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
18.0k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
18.0k
        memcpy(&_data[orig_size], vals, to_add_size);
159
18.0k
        return Status::OK();
160
18.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
1.47k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
1.47k
        DCHECK(!_finished);
111
1.47k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
1.47k
        uint32_t to_add = cast_set<UInt32>(
127
1.47k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
1.47k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
1.47k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
1.47k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
1.47k
        _count += to_add;
135
1.47k
        _remain_element_capacity -= to_add;
136
1.47k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
1.47k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
1.47k
        memcpy(&_data[orig_size], vals, to_add_size);
159
1.47k
        return Status::OK();
160
1.47k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
628
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
628
        DCHECK(!_finished);
111
628
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
628
        uint32_t to_add = cast_set<UInt32>(
127
628
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
628
        int to_add_size = to_add * SIZE_OF_TYPE;
130
628
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
628
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
628
        _count += to_add;
135
628
        _remain_element_capacity -= to_add;
136
628
        _raw_data_size += to_add_size;
137
        // return added number through count
138
628
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
628
        memcpy(&_data[orig_size], vals, to_add_size);
159
628
        return Status::OK();
160
628
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
649
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
649
        DCHECK(!_finished);
111
649
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
649
        uint32_t to_add = cast_set<UInt32>(
127
649
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
649
        int to_add_size = to_add * SIZE_OF_TYPE;
130
649
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
649
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
650
        _count += to_add;
135
650
        _remain_element_capacity -= to_add;
136
650
        _raw_data_size += to_add_size;
137
        // return added number through count
138
650
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
650
        memcpy(&_data[orig_size], vals, to_add_size);
159
650
        return Status::OK();
160
649
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
26.4k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
26.4k
        DCHECK(!_finished);
111
26.4k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
26.4k
        uint32_t to_add = cast_set<UInt32>(
127
26.4k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
26.4k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
26.4k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
26.4k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
26.5k
        _count += to_add;
135
26.5k
        _remain_element_capacity -= to_add;
136
26.5k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
26.5k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
26.5k
        memcpy(&_data[orig_size], vals, to_add_size);
159
26.5k
        return Status::OK();
160
26.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
109
141M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
141M
        DCHECK(!_finished);
111
141M
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
141M
        uint32_t to_add = cast_set<UInt32>(
127
141M
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
141M
        int to_add_size = to_add * SIZE_OF_TYPE;
130
141M
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
141M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
144M
        _count += to_add;
135
144M
        _remain_element_capacity -= to_add;
136
144M
        _raw_data_size += to_add_size;
137
        // return added number through count
138
144M
        *num_written = to_add;
139
144M
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
144M
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
144M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
144M
                        *reinterpret_cast<const uint32_t*>(vals);
150
144M
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
144M
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
0
        memcpy(&_data[orig_size], vals, to_add_size);
159
144M
        return Status::OK();
160
141M
    }
161
162
768k
    Status finish(OwnedSlice* slice) override {
163
768k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
768k
        return Status::OK();
165
768k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
53.8k
    Status finish(OwnedSlice* slice) override {
163
53.8k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
53.8k
        return Status::OK();
165
53.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
8.13k
    Status finish(OwnedSlice* slice) override {
163
8.13k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
8.13k
        return Status::OK();
165
8.13k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
337k
    Status finish(OwnedSlice* slice) override {
163
337k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
337k
        return Status::OK();
165
337k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
139k
    Status finish(OwnedSlice* slice) override {
163
139k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
139k
        return Status::OK();
165
139k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
10.3k
    Status finish(OwnedSlice* slice) override {
163
10.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
10.3k
        return Status::OK();
165
10.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
64.7k
    Status finish(OwnedSlice* slice) override {
163
64.7k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
64.7k
        return Status::OK();
165
64.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
6.19k
    Status finish(OwnedSlice* slice) override {
163
6.19k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
6.19k
        return Status::OK();
165
6.19k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
8.67k
    Status finish(OwnedSlice* slice) override {
163
8.67k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
8.67k
        return Status::OK();
165
8.67k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
6
    Status finish(OwnedSlice* slice) override {
163
6
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
6
        return Status::OK();
165
6
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
375
    Status finish(OwnedSlice* slice) override {
163
375
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
375
        return Status::OK();
165
375
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
37.9k
    Status finish(OwnedSlice* slice) override {
163
37.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
37.9k
        return Status::OK();
165
37.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
43.4k
    Status finish(OwnedSlice* slice) override {
163
43.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
43.4k
        return Status::OK();
165
43.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
279
    Status finish(OwnedSlice* slice) override {
163
279
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
279
        return Status::OK();
165
279
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
607
    Status finish(OwnedSlice* slice) override {
163
607
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
607
        return Status::OK();
165
607
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
7.73k
    Status finish(OwnedSlice* slice) override {
163
7.73k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
7.74k
        return Status::OK();
165
7.73k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
262
    Status finish(OwnedSlice* slice) override {
163
262
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
262
        return Status::OK();
165
262
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
9.72k
    Status finish(OwnedSlice* slice) override {
163
9.72k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
9.72k
        return Status::OK();
165
9.72k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
18.4k
    Status finish(OwnedSlice* slice) override {
163
18.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
18.4k
        return Status::OK();
165
18.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
17.2k
    Status finish(OwnedSlice* slice) override {
163
17.2k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
17.2k
        return Status::OK();
165
17.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
1.15k
    Status finish(OwnedSlice* slice) override {
163
1.15k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
1.15k
        return Status::OK();
165
1.15k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
582
    Status finish(OwnedSlice* slice) override {
163
582
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
582
        return Status::OK();
165
582
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
589
    Status finish(OwnedSlice* slice) override {
163
589
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
589
        return Status::OK();
165
589
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
691
    Status finish(OwnedSlice* slice) override {
163
691
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
691
        return Status::OK();
165
691
    }
166
167
1.82M
    Status reset() override {
168
1.82M
        RETURN_IF_CATCH_EXCEPTION({
169
1.82M
            size_t block_size = _options.data_page_size;
170
1.82M
            _count = 0;
171
1.82M
            _raw_data_size = 0;
172
1.82M
            _data.clear();
173
1.82M
            _data.reserve(block_size);
174
1.82M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
1.82M
                    << "buffer must be naturally-aligned";
176
1.82M
            _buffer.clear();
177
1.82M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
1.82M
            _finished = false;
179
1.82M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
1.82M
        });
181
1.82M
        return Status::OK();
182
1.82M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
167
109k
    Status reset() override {
168
109k
        RETURN_IF_CATCH_EXCEPTION({
169
109k
            size_t block_size = _options.data_page_size;
170
109k
            _count = 0;
171
109k
            _raw_data_size = 0;
172
109k
            _data.clear();
173
109k
            _data.reserve(block_size);
174
109k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
109k
                    << "buffer must be naturally-aligned";
176
109k
            _buffer.clear();
177
109k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
109k
            _finished = false;
179
109k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
109k
        });
181
109k
        return Status::OK();
182
109k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
167
17.1k
    Status reset() override {
168
17.1k
        RETURN_IF_CATCH_EXCEPTION({
169
17.1k
            size_t block_size = _options.data_page_size;
170
17.1k
            _count = 0;
171
17.1k
            _raw_data_size = 0;
172
17.1k
            _data.clear();
173
17.1k
            _data.reserve(block_size);
174
17.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
17.1k
                    << "buffer must be naturally-aligned";
176
17.1k
            _buffer.clear();
177
17.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
17.1k
            _finished = false;
179
17.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
17.1k
        });
181
17.2k
        return Status::OK();
182
17.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
167
965k
    Status reset() override {
168
965k
        RETURN_IF_CATCH_EXCEPTION({
169
965k
            size_t block_size = _options.data_page_size;
170
965k
            _count = 0;
171
965k
            _raw_data_size = 0;
172
965k
            _data.clear();
173
965k
            _data.reserve(block_size);
174
965k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
965k
                    << "buffer must be naturally-aligned";
176
965k
            _buffer.clear();
177
965k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
965k
            _finished = false;
179
965k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
965k
        });
181
968k
        return Status::OK();
182
965k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
167
277k
    Status reset() override {
168
277k
        RETURN_IF_CATCH_EXCEPTION({
169
277k
            size_t block_size = _options.data_page_size;
170
277k
            _count = 0;
171
277k
            _raw_data_size = 0;
172
277k
            _data.clear();
173
277k
            _data.reserve(block_size);
174
277k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
277k
                    << "buffer must be naturally-aligned";
176
277k
            _buffer.clear();
177
277k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
277k
            _finished = false;
179
277k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
277k
        });
181
277k
        return Status::OK();
182
277k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
167
21.4k
    Status reset() override {
168
21.4k
        RETURN_IF_CATCH_EXCEPTION({
169
21.4k
            size_t block_size = _options.data_page_size;
170
21.4k
            _count = 0;
171
21.4k
            _raw_data_size = 0;
172
21.4k
            _data.clear();
173
21.4k
            _data.reserve(block_size);
174
21.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
21.4k
                    << "buffer must be naturally-aligned";
176
21.4k
            _buffer.clear();
177
21.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
21.4k
            _finished = false;
179
21.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
21.4k
        });
181
21.5k
        return Status::OK();
182
21.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
167
129k
    Status reset() override {
168
129k
        RETURN_IF_CATCH_EXCEPTION({
169
129k
            size_t block_size = _options.data_page_size;
170
129k
            _count = 0;
171
129k
            _raw_data_size = 0;
172
129k
            _data.clear();
173
129k
            _data.reserve(block_size);
174
129k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
129k
                    << "buffer must be naturally-aligned";
176
129k
            _buffer.clear();
177
129k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
129k
            _finished = false;
179
129k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
129k
        });
181
129k
        return Status::OK();
182
129k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
Line
Count
Source
167
1
    Status reset() override {
168
1
        RETURN_IF_CATCH_EXCEPTION({
169
1
            size_t block_size = _options.data_page_size;
170
1
            _count = 0;
171
1
            _raw_data_size = 0;
172
1
            _data.clear();
173
1
            _data.reserve(block_size);
174
1
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
1
                    << "buffer must be naturally-aligned";
176
1
            _buffer.clear();
177
1
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
1
            _finished = false;
179
1
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
1
        });
181
1
        return Status::OK();
182
1
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
167
13.2k
    Status reset() override {
168
13.2k
        RETURN_IF_CATCH_EXCEPTION({
169
13.2k
            size_t block_size = _options.data_page_size;
170
13.2k
            _count = 0;
171
13.2k
            _raw_data_size = 0;
172
13.2k
            _data.clear();
173
13.2k
            _data.reserve(block_size);
174
13.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
13.2k
                    << "buffer must be naturally-aligned";
176
13.2k
            _buffer.clear();
177
13.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
13.2k
            _finished = false;
179
13.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
13.2k
        });
181
13.2k
        return Status::OK();
182
13.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
167
16.8k
    Status reset() override {
168
16.8k
        RETURN_IF_CATCH_EXCEPTION({
169
16.8k
            size_t block_size = _options.data_page_size;
170
16.8k
            _count = 0;
171
16.8k
            _raw_data_size = 0;
172
16.8k
            _data.clear();
173
16.8k
            _data.reserve(block_size);
174
16.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
16.8k
                    << "buffer must be naturally-aligned";
176
16.8k
            _buffer.clear();
177
16.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
16.8k
            _finished = false;
179
16.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
16.8k
        });
181
16.8k
        return Status::OK();
182
16.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
Line
Count
Source
167
8
    Status reset() override {
168
8
        RETURN_IF_CATCH_EXCEPTION({
169
8
            size_t block_size = _options.data_page_size;
170
8
            _count = 0;
171
8
            _raw_data_size = 0;
172
8
            _data.clear();
173
8
            _data.reserve(block_size);
174
8
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
8
                    << "buffer must be naturally-aligned";
176
8
            _buffer.clear();
177
8
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
8
            _finished = false;
179
8
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
8
        });
181
8
        return Status::OK();
182
8
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
167
717
    Status reset() override {
168
717
        RETURN_IF_CATCH_EXCEPTION({
169
717
            size_t block_size = _options.data_page_size;
170
717
            _count = 0;
171
717
            _raw_data_size = 0;
172
717
            _data.clear();
173
717
            _data.reserve(block_size);
174
717
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
717
                    << "buffer must be naturally-aligned";
176
717
            _buffer.clear();
177
717
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
717
            _finished = false;
179
717
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
717
        });
181
717
        return Status::OK();
182
717
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
167
75.3k
    Status reset() override {
168
75.3k
        RETURN_IF_CATCH_EXCEPTION({
169
75.3k
            size_t block_size = _options.data_page_size;
170
75.3k
            _count = 0;
171
75.3k
            _raw_data_size = 0;
172
75.3k
            _data.clear();
173
75.3k
            _data.reserve(block_size);
174
75.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
75.3k
                    << "buffer must be naturally-aligned";
176
75.3k
            _buffer.clear();
177
75.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
75.3k
            _finished = false;
179
75.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
75.3k
        });
181
75.4k
        return Status::OK();
182
75.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
167
87.7k
    Status reset() override {
168
87.7k
        RETURN_IF_CATCH_EXCEPTION({
169
87.7k
            size_t block_size = _options.data_page_size;
170
87.7k
            _count = 0;
171
87.7k
            _raw_data_size = 0;
172
87.7k
            _data.clear();
173
87.7k
            _data.reserve(block_size);
174
87.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
87.7k
                    << "buffer must be naturally-aligned";
176
87.7k
            _buffer.clear();
177
87.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
87.7k
            _finished = false;
179
87.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
87.7k
        });
181
87.8k
        return Status::OK();
182
87.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE5resetEv
Line
Count
Source
167
621
    Status reset() override {
168
621
        RETURN_IF_CATCH_EXCEPTION({
169
621
            size_t block_size = _options.data_page_size;
170
621
            _count = 0;
171
621
            _raw_data_size = 0;
172
621
            _data.clear();
173
621
            _data.reserve(block_size);
174
621
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
621
                    << "buffer must be naturally-aligned";
176
621
            _buffer.clear();
177
621
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
621
            _finished = false;
179
621
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
621
        });
181
622
        return Status::OK();
182
621
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
167
1.04k
    Status reset() override {
168
1.04k
        RETURN_IF_CATCH_EXCEPTION({
169
1.04k
            size_t block_size = _options.data_page_size;
170
1.04k
            _count = 0;
171
1.04k
            _raw_data_size = 0;
172
1.04k
            _data.clear();
173
1.04k
            _data.reserve(block_size);
174
1.04k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
1.04k
                    << "buffer must be naturally-aligned";
176
1.04k
            _buffer.clear();
177
1.04k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
1.04k
            _finished = false;
179
1.04k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
1.04k
        });
181
1.04k
        return Status::OK();
182
1.04k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
Line
Count
Source
167
15.3k
    Status reset() override {
168
15.3k
        RETURN_IF_CATCH_EXCEPTION({
169
15.3k
            size_t block_size = _options.data_page_size;
170
15.3k
            _count = 0;
171
15.3k
            _raw_data_size = 0;
172
15.3k
            _data.clear();
173
15.3k
            _data.reserve(block_size);
174
15.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
15.3k
                    << "buffer must be naturally-aligned";
176
15.3k
            _buffer.clear();
177
15.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
15.3k
            _finished = false;
179
15.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
15.3k
        });
181
15.4k
        return Status::OK();
182
15.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
167
601
    Status reset() override {
168
601
        RETURN_IF_CATCH_EXCEPTION({
169
601
            size_t block_size = _options.data_page_size;
170
601
            _count = 0;
171
601
            _raw_data_size = 0;
172
601
            _data.clear();
173
601
            _data.reserve(block_size);
174
601
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
601
                    << "buffer must be naturally-aligned";
176
601
            _buffer.clear();
177
601
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
601
            _finished = false;
179
601
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
601
        });
181
601
        return Status::OK();
182
601
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
167
19.4k
    Status reset() override {
168
19.4k
        RETURN_IF_CATCH_EXCEPTION({
169
19.4k
            size_t block_size = _options.data_page_size;
170
19.4k
            _count = 0;
171
19.4k
            _raw_data_size = 0;
172
19.4k
            _data.clear();
173
19.4k
            _data.reserve(block_size);
174
19.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
19.4k
                    << "buffer must be naturally-aligned";
176
19.4k
            _buffer.clear();
177
19.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
19.4k
            _finished = false;
179
19.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
19.4k
        });
181
19.4k
        return Status::OK();
182
19.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
167
30.5k
    Status reset() override {
168
30.5k
        RETURN_IF_CATCH_EXCEPTION({
169
30.5k
            size_t block_size = _options.data_page_size;
170
30.5k
            _count = 0;
171
30.5k
            _raw_data_size = 0;
172
30.5k
            _data.clear();
173
30.5k
            _data.reserve(block_size);
174
30.5k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
30.5k
                    << "buffer must be naturally-aligned";
176
30.5k
            _buffer.clear();
177
30.5k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
30.5k
            _finished = false;
179
30.5k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
30.5k
        });
181
30.5k
        return Status::OK();
182
30.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
167
34.2k
    Status reset() override {
168
34.2k
        RETURN_IF_CATCH_EXCEPTION({
169
34.2k
            size_t block_size = _options.data_page_size;
170
34.2k
            _count = 0;
171
34.2k
            _raw_data_size = 0;
172
34.2k
            _data.clear();
173
34.2k
            _data.reserve(block_size);
174
34.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
34.2k
                    << "buffer must be naturally-aligned";
176
34.2k
            _buffer.clear();
177
34.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
34.2k
            _finished = false;
179
34.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
34.2k
        });
181
34.2k
        return Status::OK();
182
34.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Line
Count
Source
167
2.37k
    Status reset() override {
168
2.37k
        RETURN_IF_CATCH_EXCEPTION({
169
2.37k
            size_t block_size = _options.data_page_size;
170
2.37k
            _count = 0;
171
2.37k
            _raw_data_size = 0;
172
2.37k
            _data.clear();
173
2.37k
            _data.reserve(block_size);
174
2.37k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
2.37k
                    << "buffer must be naturally-aligned";
176
2.37k
            _buffer.clear();
177
2.37k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
2.37k
            _finished = false;
179
2.37k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
2.37k
        });
181
2.38k
        return Status::OK();
182
2.37k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Line
Count
Source
167
1.25k
    Status reset() override {
168
1.25k
        RETURN_IF_CATCH_EXCEPTION({
169
1.25k
            size_t block_size = _options.data_page_size;
170
1.25k
            _count = 0;
171
1.25k
            _raw_data_size = 0;
172
1.25k
            _data.clear();
173
1.25k
            _data.reserve(block_size);
174
1.25k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
1.25k
                    << "buffer must be naturally-aligned";
176
1.25k
            _buffer.clear();
177
1.25k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
1.25k
            _finished = false;
179
1.25k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
1.25k
        });
181
1.25k
        return Status::OK();
182
1.25k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
167
1.25k
    Status reset() override {
168
1.25k
        RETURN_IF_CATCH_EXCEPTION({
169
1.25k
            size_t block_size = _options.data_page_size;
170
1.25k
            _count = 0;
171
1.25k
            _raw_data_size = 0;
172
1.25k
            _data.clear();
173
1.25k
            _data.reserve(block_size);
174
1.25k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
1.25k
                    << "buffer must be naturally-aligned";
176
1.25k
            _buffer.clear();
177
1.25k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
1.25k
            _finished = false;
179
1.25k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
1.25k
        });
181
1.26k
        return Status::OK();
182
1.25k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE5resetEv
Line
Count
Source
167
1.27k
    Status reset() override {
168
1.27k
        RETURN_IF_CATCH_EXCEPTION({
169
1.27k
            size_t block_size = _options.data_page_size;
170
1.27k
            _count = 0;
171
1.27k
            _raw_data_size = 0;
172
1.27k
            _data.clear();
173
1.27k
            _data.reserve(block_size);
174
1.27k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
1.27k
                    << "buffer must be naturally-aligned";
176
1.27k
            _buffer.clear();
177
1.27k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
1.27k
            _finished = false;
179
1.27k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
1.27k
        });
181
1.27k
        return Status::OK();
182
1.27k
    }
183
184
667
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5countEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
184
8
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5countEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5countEv
Line
Count
Source
184
10
    size_t count() const override { return _count; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5countEv
Line
Count
Source
184
628
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5countEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5countEv
Line
Count
Source
184
10
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE5countEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5countEv
Line
Count
Source
184
6
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5countEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5countEv
Line
Count
Source
184
5
    size_t count() const override { return _count; }
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
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE5countEv
185
186
36.5k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
186
2.96k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
186
645
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
186
20.6k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
186
2.99k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
186
972
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
186
932
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
186
348
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
186
367
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4sizeEv
Line
Count
Source
186
112
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4sizeEv
Line
Count
Source
186
1.64k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
186
2.34k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE4sizeEv
Line
Count
Source
186
10
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4sizeEv
Line
Count
Source
186
119
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4sizeEv
Line
Count
Source
186
126
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4sizeEv
Line
Count
Source
186
104
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4sizeEv
Line
Count
Source
186
239
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
186
393
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
186
1.24k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4sizeEv
Line
Count
Source
186
106
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4sizeEv
Line
Count
Source
186
128
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4sizeEv
Line
Count
Source
186
112
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE4sizeEv
Line
Count
Source
186
12
    uint64_t size() const override { return _buffer.size(); }
187
188
496k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
188
53.8k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
188
8.13k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
188
65.9k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
188
139k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
188
10.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
188
64.7k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
188
6.17k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
188
8.04k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE17get_raw_data_sizeEv
Line
Count
Source
188
6
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE17get_raw_data_sizeEv
Line
Count
Source
188
364
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
188
37.9k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
188
43.4k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE17get_raw_data_sizeEv
Line
Count
Source
188
279
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
188
602
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
Line
Count
Source
188
7.74k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
188
257
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
188
9.72k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
188
18.4k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
188
17.2k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE17get_raw_data_sizeEv
Line
Count
Source
188
1.15k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Line
Count
Source
188
582
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
188
589
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE17get_raw_data_sizeEv
Line
Count
Source
188
691
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
189
190
private:
191
    BitshufflePageBuilder(const PageBuilderOptions& options)
192
772k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
55.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
9.06k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
345k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
137k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
11.1k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
64.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
1
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
7.09k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
8.17k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
2
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
344
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
37.3k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
44.3k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
342
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
440
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
7.65k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
340
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
9.71k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
12.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
17.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
1.21k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
672
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
670
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
585
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
193
194
768k
    OwnedSlice _finish(int final_size_of_type) {
195
768k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
768k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
768k
        int padding_elems = num_elems_after_padding - _count;
200
768k
        int padding_bytes = padding_elems * final_size_of_type;
201
23.1M
        for (int i = 0; i < padding_bytes; i++) {
202
22.3M
            _data.push_back(0);
203
22.3M
        }
204
205
        // reserve enough place for compression
206
768k
        _buffer.resize(
207
768k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
768k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
768k
        int64_t bytes =
211
768k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
768k
                                         num_elems_after_padding, final_size_of_type, 0);
213
768k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
768k
        encode_fixed32_le(&_buffer[0], _count);
223
768k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
768k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
768k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
768k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
768k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
768k
        return _buffer.build();
230
768k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
194
53.8k
    OwnedSlice _finish(int final_size_of_type) {
195
53.8k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
53.8k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
53.8k
        int padding_elems = num_elems_after_padding - _count;
200
53.8k
        int padding_bytes = padding_elems * final_size_of_type;
201
361k
        for (int i = 0; i < padding_bytes; i++) {
202
308k
            _data.push_back(0);
203
308k
        }
204
205
        // reserve enough place for compression
206
53.8k
        _buffer.resize(
207
53.8k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
53.8k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
53.8k
        int64_t bytes =
211
53.8k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
53.8k
                                         num_elems_after_padding, final_size_of_type, 0);
213
53.8k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
53.8k
        encode_fixed32_le(&_buffer[0], _count);
223
53.8k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
53.8k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
53.8k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
53.8k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
53.8k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
53.8k
        return _buffer.build();
230
53.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
194
8.13k
    OwnedSlice _finish(int final_size_of_type) {
195
8.13k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
8.13k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
8.13k
        int padding_elems = num_elems_after_padding - _count;
200
8.13k
        int padding_bytes = padding_elems * final_size_of_type;
201
88.4k
        for (int i = 0; i < padding_bytes; i++) {
202
80.2k
            _data.push_back(0);
203
80.2k
        }
204
205
        // reserve enough place for compression
206
8.13k
        _buffer.resize(
207
8.13k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
8.13k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
8.13k
        int64_t bytes =
211
8.13k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
8.13k
                                         num_elems_after_padding, final_size_of_type, 0);
213
8.13k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
8.13k
        encode_fixed32_le(&_buffer[0], _count);
223
8.13k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
8.13k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
8.13k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
8.13k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
8.13k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
8.13k
        return _buffer.build();
230
8.13k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
194
337k
    OwnedSlice _finish(int final_size_of_type) {
195
337k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
337k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
337k
        int padding_elems = num_elems_after_padding - _count;
200
337k
        int padding_bytes = padding_elems * final_size_of_type;
201
6.54M
        for (int i = 0; i < padding_bytes; i++) {
202
6.20M
            _data.push_back(0);
203
6.20M
        }
204
205
        // reserve enough place for compression
206
337k
        _buffer.resize(
207
337k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
337k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
337k
        int64_t bytes =
211
337k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
337k
                                         num_elems_after_padding, final_size_of_type, 0);
213
337k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
337k
        encode_fixed32_le(&_buffer[0], _count);
223
337k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
337k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
337k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
337k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
337k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
337k
        return _buffer.build();
230
337k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
194
139k
    OwnedSlice _finish(int final_size_of_type) {
195
139k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
139k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
139k
        int padding_elems = num_elems_after_padding - _count;
200
139k
        int padding_bytes = padding_elems * final_size_of_type;
201
6.66M
        for (int i = 0; i < padding_bytes; i++) {
202
6.52M
            _data.push_back(0);
203
6.52M
        }
204
205
        // reserve enough place for compression
206
139k
        _buffer.resize(
207
139k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
139k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
139k
        int64_t bytes =
211
139k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
139k
                                         num_elems_after_padding, final_size_of_type, 0);
213
139k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
139k
        encode_fixed32_le(&_buffer[0], _count);
223
139k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
139k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
139k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
139k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
139k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
139k
        return _buffer.build();
230
139k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
194
10.3k
    OwnedSlice _finish(int final_size_of_type) {
195
10.3k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
10.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
10.3k
        int padding_elems = num_elems_after_padding - _count;
200
10.3k
        int padding_bytes = padding_elems * final_size_of_type;
201
768k
        for (int i = 0; i < padding_bytes; i++) {
202
757k
            _data.push_back(0);
203
757k
        }
204
205
        // reserve enough place for compression
206
10.3k
        _buffer.resize(
207
10.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
10.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
10.3k
        int64_t bytes =
211
10.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
10.3k
                                         num_elems_after_padding, final_size_of_type, 0);
213
10.3k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
10.3k
        encode_fixed32_le(&_buffer[0], _count);
223
10.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
10.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
10.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
10.3k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
10.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
10.3k
        return _buffer.build();
230
10.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
194
64.7k
    OwnedSlice _finish(int final_size_of_type) {
195
64.7k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
64.7k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
64.7k
        int padding_elems = num_elems_after_padding - _count;
200
64.7k
        int padding_bytes = padding_elems * final_size_of_type;
201
3.13M
        for (int i = 0; i < padding_bytes; i++) {
202
3.06M
            _data.push_back(0);
203
3.06M
        }
204
205
        // reserve enough place for compression
206
64.7k
        _buffer.resize(
207
64.7k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
64.7k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
64.7k
        int64_t bytes =
211
64.7k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
64.7k
                                         num_elems_after_padding, final_size_of_type, 0);
213
64.7k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
64.7k
        encode_fixed32_le(&_buffer[0], _count);
223
64.7k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
64.7k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
64.7k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
64.7k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
64.7k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
64.7k
        return _buffer.build();
230
64.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
194
6.19k
    OwnedSlice _finish(int final_size_of_type) {
195
6.19k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
6.19k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
6.19k
        int padding_elems = num_elems_after_padding - _count;
200
6.19k
        int padding_bytes = padding_elems * final_size_of_type;
201
137k
        for (int i = 0; i < padding_bytes; i++) {
202
131k
            _data.push_back(0);
203
131k
        }
204
205
        // reserve enough place for compression
206
6.19k
        _buffer.resize(
207
6.19k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
6.19k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
6.19k
        int64_t bytes =
211
6.19k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
6.19k
                                         num_elems_after_padding, final_size_of_type, 0);
213
6.19k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
6.19k
        encode_fixed32_le(&_buffer[0], _count);
223
6.19k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
6.19k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
6.19k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
6.19k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
6.19k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
6.19k
        return _buffer.build();
230
6.19k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
194
8.67k
    OwnedSlice _finish(int final_size_of_type) {
195
8.67k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
8.67k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
8.67k
        int padding_elems = num_elems_after_padding - _count;
200
8.67k
        int padding_bytes = padding_elems * final_size_of_type;
201
319k
        for (int i = 0; i < padding_bytes; i++) {
202
311k
            _data.push_back(0);
203
311k
        }
204
205
        // reserve enough place for compression
206
8.67k
        _buffer.resize(
207
8.67k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
8.67k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
8.67k
        int64_t bytes =
211
8.67k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
8.67k
                                         num_elems_after_padding, final_size_of_type, 0);
213
8.67k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
8.67k
        encode_fixed32_le(&_buffer[0], _count);
223
8.67k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
8.67k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
8.67k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
8.67k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
8.67k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
8.67k
        return _buffer.build();
230
8.67k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
Line
Count
Source
194
6
    OwnedSlice _finish(int final_size_of_type) {
195
6
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
6
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
6
        int padding_elems = num_elems_after_padding - _count;
200
6
        int padding_bytes = padding_elems * final_size_of_type;
201
18
        for (int i = 0; i < padding_bytes; i++) {
202
12
            _data.push_back(0);
203
12
        }
204
205
        // reserve enough place for compression
206
6
        _buffer.resize(
207
6
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
6
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
6
        int64_t bytes =
211
6
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
6
                                         num_elems_after_padding, final_size_of_type, 0);
213
6
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
6
        encode_fixed32_le(&_buffer[0], _count);
223
6
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
6
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
6
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
6
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
6
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
6
        return _buffer.build();
230
6
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
194
375
    OwnedSlice _finish(int final_size_of_type) {
195
375
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
375
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
375
        int padding_elems = num_elems_after_padding - _count;
200
375
        int padding_bytes = padding_elems * final_size_of_type;
201
5.53k
        for (int i = 0; i < padding_bytes; i++) {
202
5.16k
            _data.push_back(0);
203
5.16k
        }
204
205
        // reserve enough place for compression
206
375
        _buffer.resize(
207
375
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
375
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
375
        int64_t bytes =
211
375
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
375
                                         num_elems_after_padding, final_size_of_type, 0);
213
375
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
375
        encode_fixed32_le(&_buffer[0], _count);
223
375
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
375
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
375
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
375
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
375
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
375
        return _buffer.build();
230
375
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
194
37.9k
    OwnedSlice _finish(int final_size_of_type) {
195
37.9k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
37.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
37.9k
        int padding_elems = num_elems_after_padding - _count;
200
37.9k
        int padding_bytes = padding_elems * final_size_of_type;
201
808k
        for (int i = 0; i < padding_bytes; i++) {
202
770k
            _data.push_back(0);
203
770k
        }
204
205
        // reserve enough place for compression
206
37.9k
        _buffer.resize(
207
37.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
37.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
37.9k
        int64_t bytes =
211
37.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
37.9k
                                         num_elems_after_padding, final_size_of_type, 0);
213
37.9k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
37.9k
        encode_fixed32_le(&_buffer[0], _count);
223
37.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
37.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
37.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
37.9k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
37.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
37.9k
        return _buffer.build();
230
37.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
194
43.4k
    OwnedSlice _finish(int final_size_of_type) {
195
43.4k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
43.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
43.4k
        int padding_elems = num_elems_after_padding - _count;
200
43.4k
        int padding_bytes = padding_elems * final_size_of_type;
201
1.84M
        for (int i = 0; i < padding_bytes; i++) {
202
1.79M
            _data.push_back(0);
203
1.79M
        }
204
205
        // reserve enough place for compression
206
43.4k
        _buffer.resize(
207
43.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
43.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
43.4k
        int64_t bytes =
211
43.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
43.4k
                                         num_elems_after_padding, final_size_of_type, 0);
213
43.4k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
43.4k
        encode_fixed32_le(&_buffer[0], _count);
223
43.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
43.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
43.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
43.4k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
43.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
43.4k
        return _buffer.build();
230
43.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE7_finishEi
Line
Count
Source
194
279
    OwnedSlice _finish(int final_size_of_type) {
195
279
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
279
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
279
        int padding_elems = num_elems_after_padding - _count;
200
279
        int padding_bytes = padding_elems * final_size_of_type;
201
11.7k
        for (int i = 0; i < padding_bytes; i++) {
202
11.4k
            _data.push_back(0);
203
11.4k
        }
204
205
        // reserve enough place for compression
206
279
        _buffer.resize(
207
279
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
279
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
279
        int64_t bytes =
211
279
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
279
                                         num_elems_after_padding, final_size_of_type, 0);
213
279
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
279
        encode_fixed32_le(&_buffer[0], _count);
223
279
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
279
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
279
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
279
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
279
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
279
        return _buffer.build();
230
279
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
194
607
    OwnedSlice _finish(int final_size_of_type) {
195
607
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
607
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
607
        int padding_elems = num_elems_after_padding - _count;
200
607
        int padding_bytes = padding_elems * final_size_of_type;
201
13.6k
        for (int i = 0; i < padding_bytes; i++) {
202
13.0k
            _data.push_back(0);
203
13.0k
        }
204
205
        // reserve enough place for compression
206
607
        _buffer.resize(
207
607
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
607
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
607
        int64_t bytes =
211
607
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
607
                                         num_elems_after_padding, final_size_of_type, 0);
213
607
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
607
        encode_fixed32_le(&_buffer[0], _count);
223
607
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
607
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
607
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
607
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
607
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
607
        return _buffer.build();
230
607
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
Line
Count
Source
194
7.73k
    OwnedSlice _finish(int final_size_of_type) {
195
7.73k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
7.73k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
7.73k
        int padding_elems = num_elems_after_padding - _count;
200
7.73k
        int padding_bytes = padding_elems * final_size_of_type;
201
403k
        for (int i = 0; i < padding_bytes; i++) {
202
395k
            _data.push_back(0);
203
395k
        }
204
205
        // reserve enough place for compression
206
7.73k
        _buffer.resize(
207
7.73k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
7.73k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
7.73k
        int64_t bytes =
211
7.73k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
7.73k
                                         num_elems_after_padding, final_size_of_type, 0);
213
7.73k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
7.73k
        encode_fixed32_le(&_buffer[0], _count);
223
7.73k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
7.73k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
7.73k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
7.73k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
7.73k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
7.73k
        return _buffer.build();
230
7.73k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
194
262
    OwnedSlice _finish(int final_size_of_type) {
195
262
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
262
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
262
        int padding_elems = num_elems_after_padding - _count;
200
262
        int padding_bytes = padding_elems * final_size_of_type;
201
16.3k
        for (int i = 0; i < padding_bytes; i++) {
202
16.0k
            _data.push_back(0);
203
16.0k
        }
204
205
        // reserve enough place for compression
206
262
        _buffer.resize(
207
262
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
262
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
262
        int64_t bytes =
211
262
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
262
                                         num_elems_after_padding, final_size_of_type, 0);
213
262
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
262
        encode_fixed32_le(&_buffer[0], _count);
223
262
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
262
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
262
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
262
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
262
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
262
        return _buffer.build();
230
262
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
194
9.72k
    OwnedSlice _finish(int final_size_of_type) {
195
9.72k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
9.72k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
9.72k
        int padding_elems = num_elems_after_padding - _count;
200
9.72k
        int padding_bytes = padding_elems * final_size_of_type;
201
117k
        for (int i = 0; i < padding_bytes; i++) {
202
108k
            _data.push_back(0);
203
108k
        }
204
205
        // reserve enough place for compression
206
9.72k
        _buffer.resize(
207
9.72k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
9.72k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
9.72k
        int64_t bytes =
211
9.72k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
9.72k
                                         num_elems_after_padding, final_size_of_type, 0);
213
9.72k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
9.72k
        encode_fixed32_le(&_buffer[0], _count);
223
9.72k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
9.72k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
9.72k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
9.72k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
9.72k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
9.72k
        return _buffer.build();
230
9.72k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
194
18.4k
    OwnedSlice _finish(int final_size_of_type) {
195
18.4k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
18.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
18.4k
        int padding_elems = num_elems_after_padding - _count;
200
18.4k
        int padding_bytes = padding_elems * final_size_of_type;
201
486k
        for (int i = 0; i < padding_bytes; i++) {
202
468k
            _data.push_back(0);
203
468k
        }
204
205
        // reserve enough place for compression
206
18.4k
        _buffer.resize(
207
18.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
18.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
18.4k
        int64_t bytes =
211
18.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
18.4k
                                         num_elems_after_padding, final_size_of_type, 0);
213
18.4k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
18.4k
        encode_fixed32_le(&_buffer[0], _count);
223
18.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
18.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
18.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
18.4k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
18.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
18.4k
        return _buffer.build();
230
18.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
194
17.2k
    OwnedSlice _finish(int final_size_of_type) {
195
17.2k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
17.2k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
17.2k
        int padding_elems = num_elems_after_padding - _count;
200
17.2k
        int padding_bytes = padding_elems * final_size_of_type;
201
1.15M
        for (int i = 0; i < padding_bytes; i++) {
202
1.13M
            _data.push_back(0);
203
1.13M
        }
204
205
        // reserve enough place for compression
206
17.2k
        _buffer.resize(
207
17.2k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
17.2k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
17.2k
        int64_t bytes =
211
17.2k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
17.2k
                                         num_elems_after_padding, final_size_of_type, 0);
213
17.2k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
17.2k
        encode_fixed32_le(&_buffer[0], _count);
223
17.2k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
17.2k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
17.2k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
17.2k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
17.2k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
17.2k
        return _buffer.build();
230
17.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE7_finishEi
Line
Count
Source
194
1.15k
    OwnedSlice _finish(int final_size_of_type) {
195
1.15k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
1.15k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
1.15k
        int padding_elems = num_elems_after_padding - _count;
200
1.15k
        int padding_bytes = padding_elems * final_size_of_type;
201
175k
        for (int i = 0; i < padding_bytes; i++) {
202
174k
            _data.push_back(0);
203
174k
        }
204
205
        // reserve enough place for compression
206
1.15k
        _buffer.resize(
207
1.15k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
1.15k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
1.15k
        int64_t bytes =
211
1.15k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
1.15k
                                         num_elems_after_padding, final_size_of_type, 0);
213
1.15k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
1.15k
        encode_fixed32_le(&_buffer[0], _count);
223
1.15k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
1.15k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
1.15k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
1.15k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
1.15k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
1.15k
        return _buffer.build();
230
1.15k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Line
Count
Source
194
582
    OwnedSlice _finish(int final_size_of_type) {
195
582
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
582
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
582
        int padding_elems = num_elems_after_padding - _count;
200
582
        int padding_bytes = padding_elems * final_size_of_type;
201
11.8k
        for (int i = 0; i < padding_bytes; i++) {
202
11.2k
            _data.push_back(0);
203
11.2k
        }
204
205
        // reserve enough place for compression
206
582
        _buffer.resize(
207
582
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
582
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
582
        int64_t bytes =
211
582
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
582
                                         num_elems_after_padding, final_size_of_type, 0);
213
582
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
582
        encode_fixed32_le(&_buffer[0], _count);
223
582
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
582
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
582
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
582
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
582
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
582
        return _buffer.build();
230
582
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
194
589
    OwnedSlice _finish(int final_size_of_type) {
195
589
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
589
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
589
        int padding_elems = num_elems_after_padding - _count;
200
589
        int padding_bytes = padding_elems * final_size_of_type;
201
46.9k
        for (int i = 0; i < padding_bytes; i++) {
202
46.3k
            _data.push_back(0);
203
46.3k
        }
204
205
        // reserve enough place for compression
206
589
        _buffer.resize(
207
589
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
589
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
589
        int64_t bytes =
211
589
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
589
                                         num_elems_after_padding, final_size_of_type, 0);
213
589
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
589
        encode_fixed32_le(&_buffer[0], _count);
223
589
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
589
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
589
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
589
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
589
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
589
        return _buffer.build();
230
589
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE7_finishEi
Line
Count
Source
194
691
    OwnedSlice _finish(int final_size_of_type) {
195
691
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
691
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
691
        int padding_elems = num_elems_after_padding - _count;
200
691
        int padding_bytes = padding_elems * final_size_of_type;
201
50.3k
        for (int i = 0; i < padding_bytes; i++) {
202
49.6k
            _data.push_back(0);
203
49.6k
        }
204
205
        // reserve enough place for compression
206
691
        _buffer.resize(
207
691
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
691
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
691
        int64_t bytes =
211
691
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
691
                                         num_elems_after_padding, final_size_of_type, 0);
213
691
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
691
        encode_fixed32_le(&_buffer[0], _count);
223
691
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
691
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
691
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
691
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
691
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
691
        return _buffer.build();
230
691
    }
231
232
    using CppType = typename TypeTraits<Type>::CppType;
233
234
    CppType cell(int idx) const {
235
        DCHECK_GE(idx, 0);
236
        CppType ret;
237
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
238
        return ret;
239
    }
240
241
    static constexpr size_t SIZE_OF_TYPE = TypeTraits<Type>::size;
242
    PageBuilderOptions _options;
243
    uint32_t _count;
244
    uint32_t _remain_element_capacity;
245
    bool _finished;
246
    faststring _data;
247
    faststring _buffer;
248
    uint64_t _raw_data_size = 0;
249
};
250
251
inline Status parse_bit_shuffle_header(const Slice& data, size_t& num_elements,
252
                                       size_t& compressed_size, size_t& num_element_after_padding,
253
1.86M
                                       int& size_of_element) {
254
1.86M
    if (data.size < BITSHUFFLE_PAGE_HEADER_SIZE) {
255
0
        return Status::InternalError("file corruption: invalid data size:{}, header size:{}",
256
0
                                     data.size, BITSHUFFLE_PAGE_HEADER_SIZE);
257
0
    }
258
259
1.86M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
260
1.86M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
261
1.86M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
262
1.86M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
263
1.86M
    if (num_element_after_padding != ALIGN_UP(num_elements, 8)) {
264
0
        return Status::InternalError(
265
0
                "num of element information corrupted,"
266
0
                " _num_element_after_padding:{}, _num_elements:{}, expected_padding:{},"
267
0
                " compressed_size:{}, size_of_element:{}, data_size:{}",
268
0
                num_element_after_padding, num_elements, ALIGN_UP(num_elements, 8), compressed_size,
269
0
                size_of_element, data.size);
270
0
    }
271
1.86M
    switch (size_of_element) {
272
147k
    case 1:
273
169k
    case 2:
274
170k
    case 3:
275
1.19M
    case 4:
276
1.78M
    case 8:
277
1.79M
    case 12:
278
1.86M
    case 16:
279
1.86M
    case 32:
280
1.86M
        break;
281
0
    default:
282
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
283
1.86M
    }
284
1.86M
    return Status::OK();
285
1.86M
}
286
287
template <FieldType Type>
288
class BitShufflePageDecoder : public PageDecoder {
289
public:
290
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
291
1.16M
            : _data(data),
292
1.16M
              _options(options),
293
1.16M
              _parsed(false),
294
1.16M
              _num_elements(0),
295
1.16M
              _num_element_after_padding(0),
296
1.16M
              _size_of_element(0),
297
1.16M
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
95.7k
            : _data(data),
292
95.7k
              _options(options),
293
95.7k
              _parsed(false),
294
95.7k
              _num_elements(0),
295
95.7k
              _num_element_after_padding(0),
296
95.7k
              _size_of_element(0),
297
95.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
15.8k
            : _data(data),
292
15.8k
              _options(options),
293
15.8k
              _parsed(false),
294
15.8k
              _num_elements(0),
295
15.8k
              _num_element_after_padding(0),
296
15.8k
              _size_of_element(0),
297
15.8k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
552k
            : _data(data),
292
552k
              _options(options),
293
552k
              _parsed(false),
294
552k
              _num_elements(0),
295
552k
              _num_element_after_padding(0),
296
552k
              _size_of_element(0),
297
552k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
118k
            : _data(data),
292
118k
              _options(options),
293
118k
              _parsed(false),
294
118k
              _num_elements(0),
295
118k
              _num_element_after_padding(0),
296
118k
              _size_of_element(0),
297
118k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
12.6k
            : _data(data),
292
12.6k
              _options(options),
293
12.6k
              _parsed(false),
294
12.6k
              _num_elements(0),
295
12.6k
              _num_element_after_padding(0),
296
12.6k
              _size_of_element(0),
297
12.6k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
94.1k
            : _data(data),
292
94.1k
              _options(options),
293
94.1k
              _parsed(false),
294
94.1k
              _num_elements(0),
295
94.1k
              _num_element_after_padding(0),
296
94.1k
              _size_of_element(0),
297
94.1k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
9.29k
            : _data(data),
292
9.29k
              _options(options),
293
9.29k
              _parsed(false),
294
9.29k
              _num_elements(0),
295
9.29k
              _num_element_after_padding(0),
296
9.29k
              _size_of_element(0),
297
9.29k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
13.3k
            : _data(data),
292
13.3k
              _options(options),
293
13.3k
              _parsed(false),
294
13.3k
              _num_elements(0),
295
13.3k
              _num_element_after_padding(0),
296
13.3k
              _size_of_element(0),
297
13.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
6
            : _data(data),
292
6
              _options(options),
293
6
              _parsed(false),
294
6
              _num_elements(0),
295
6
              _num_element_after_padding(0),
296
6
              _size_of_element(0),
297
6
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
1.54k
            : _data(data),
292
1.54k
              _options(options),
293
1.54k
              _parsed(false),
294
1.54k
              _num_elements(0),
295
1.54k
              _num_element_after_padding(0),
296
1.54k
              _size_of_element(0),
297
1.54k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
59.1k
            : _data(data),
292
59.1k
              _options(options),
293
59.1k
              _parsed(false),
294
59.1k
              _num_elements(0),
295
59.1k
              _num_element_after_padding(0),
296
59.1k
              _size_of_element(0),
297
59.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
67.4k
            : _data(data),
292
67.4k
              _options(options),
293
67.4k
              _parsed(false),
294
67.4k
              _num_elements(0),
295
67.4k
              _num_element_after_padding(0),
296
67.4k
              _size_of_element(0),
297
67.4k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
3.17k
            : _data(data),
292
3.17k
              _options(options),
293
3.17k
              _parsed(false),
294
3.17k
              _num_elements(0),
295
3.17k
              _num_element_after_padding(0),
296
3.17k
              _size_of_element(0),
297
3.17k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
2.24k
            : _data(data),
292
2.24k
              _options(options),
293
2.24k
              _parsed(false),
294
2.24k
              _num_elements(0),
295
2.24k
              _num_element_after_padding(0),
296
2.24k
              _size_of_element(0),
297
2.24k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
16.3k
            : _data(data),
292
16.3k
              _options(options),
293
16.3k
              _parsed(false),
294
16.3k
              _num_elements(0),
295
16.3k
              _num_element_after_padding(0),
296
16.3k
              _size_of_element(0),
297
16.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
1.38k
            : _data(data),
292
1.38k
              _options(options),
293
1.38k
              _parsed(false),
294
1.38k
              _num_elements(0),
295
1.38k
              _num_element_after_padding(0),
296
1.38k
              _size_of_element(0),
297
1.38k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
15.5k
            : _data(data),
292
15.5k
              _options(options),
293
15.5k
              _parsed(false),
294
15.5k
              _num_elements(0),
295
15.5k
              _num_element_after_padding(0),
296
15.5k
              _size_of_element(0),
297
15.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
43.4k
            : _data(data),
292
43.4k
              _options(options),
293
43.4k
              _parsed(false),
294
43.4k
              _num_elements(0),
295
43.4k
              _num_element_after_padding(0),
296
43.4k
              _size_of_element(0),
297
43.4k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
31.0k
            : _data(data),
292
31.0k
              _options(options),
293
31.0k
              _parsed(false),
294
31.0k
              _num_elements(0),
295
31.0k
              _num_element_after_padding(0),
296
31.0k
              _size_of_element(0),
297
31.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
1.77k
            : _data(data),
292
1.77k
              _options(options),
293
1.77k
              _parsed(false),
294
1.77k
              _num_elements(0),
295
1.77k
              _num_element_after_padding(0),
296
1.77k
              _size_of_element(0),
297
1.77k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
891
            : _data(data),
292
891
              _options(options),
293
891
              _parsed(false),
294
891
              _num_elements(0),
295
891
              _num_element_after_padding(0),
296
891
              _size_of_element(0),
297
891
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
941
            : _data(data),
292
941
              _options(options),
293
941
              _parsed(false),
294
941
              _num_elements(0),
295
941
              _num_element_after_padding(0),
296
941
              _size_of_element(0),
297
941
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
5.02k
            : _data(data),
292
5.02k
              _options(options),
293
5.02k
              _parsed(false),
294
5.02k
              _num_elements(0),
295
5.02k
              _num_element_after_padding(0),
296
5.02k
              _size_of_element(0),
297
5.02k
              _cur_index(0) {}
298
299
1.15M
    Status init() override {
300
1.15M
        CHECK(!_parsed);
301
1.15M
        size_t unused;
302
1.15M
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
1.15M
                                                 _num_element_after_padding, _size_of_element));
304
305
1.15M
        if (_data.size !=
306
1.15M
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
13
            std::stringstream ss;
308
13
            ss << "Size information unmatched, _data.size:" << _data.size
309
13
               << ", _num_elements:" << _num_elements << ", expected size is "
310
13
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
13
            return Status::InternalError(ss.str());
312
13
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
1.15M
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
1.15M
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
1.15M
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
1.15M
        _parsed = true;
326
1.15M
        return Status::OK();
327
1.15M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
299
95.2k
    Status init() override {
300
95.2k
        CHECK(!_parsed);
301
95.2k
        size_t unused;
302
95.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
95.2k
                                                 _num_element_after_padding, _size_of_element));
304
305
95.2k
        if (_data.size !=
306
95.2k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
95.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
95.2k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
95.2k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
95.2k
        _parsed = true;
326
95.2k
        return Status::OK();
327
95.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
299
15.8k
    Status init() override {
300
15.8k
        CHECK(!_parsed);
301
15.8k
        size_t unused;
302
15.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
15.8k
                                                 _num_element_after_padding, _size_of_element));
304
305
15.8k
        if (_data.size !=
306
15.8k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
15.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
15.8k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
15.8k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
15.8k
        _parsed = true;
326
15.8k
        return Status::OK();
327
15.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
299
545k
    Status init() override {
300
545k
        CHECK(!_parsed);
301
545k
        size_t unused;
302
545k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
545k
                                                 _num_element_after_padding, _size_of_element));
304
305
545k
        if (_data.size !=
306
545k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
5
            std::stringstream ss;
308
5
            ss << "Size information unmatched, _data.size:" << _data.size
309
5
               << ", _num_elements:" << _num_elements << ", expected size is "
310
5
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
5
            return Status::InternalError(ss.str());
312
5
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
545k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
545k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
545k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
545k
        _parsed = true;
326
545k
        return Status::OK();
327
545k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
299
117k
    Status init() override {
300
117k
        CHECK(!_parsed);
301
117k
        size_t unused;
302
117k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
117k
                                                 _num_element_after_padding, _size_of_element));
304
305
117k
        if (_data.size !=
306
117k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
1
            std::stringstream ss;
308
1
            ss << "Size information unmatched, _data.size:" << _data.size
309
1
               << ", _num_elements:" << _num_elements << ", expected size is "
310
1
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
1
            return Status::InternalError(ss.str());
312
1
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
117k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
117k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
117k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
117k
        _parsed = true;
326
117k
        return Status::OK();
327
117k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
299
12.5k
    Status init() override {
300
12.5k
        CHECK(!_parsed);
301
12.5k
        size_t unused;
302
12.5k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
12.5k
                                                 _num_element_after_padding, _size_of_element));
304
305
12.5k
        if (_data.size !=
306
12.5k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
12.5k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
12.5k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
12.5k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
12.5k
        _parsed = true;
326
12.5k
        return Status::OK();
327
12.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
299
93.8k
    Status init() override {
300
93.8k
        CHECK(!_parsed);
301
93.8k
        size_t unused;
302
93.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
93.8k
                                                 _num_element_after_padding, _size_of_element));
304
305
93.8k
        if (_data.size !=
306
93.8k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
93.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
93.8k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
93.8k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
93.8k
        _parsed = true;
326
93.8k
        return Status::OK();
327
93.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
299
9.27k
    Status init() override {
300
9.27k
        CHECK(!_parsed);
301
9.27k
        size_t unused;
302
9.27k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
9.27k
                                                 _num_element_after_padding, _size_of_element));
304
305
9.27k
        if (_data.size !=
306
9.27k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
2
            std::stringstream ss;
308
2
            ss << "Size information unmatched, _data.size:" << _data.size
309
2
               << ", _num_elements:" << _num_elements << ", expected size is "
310
2
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
2
            return Status::InternalError(ss.str());
312
2
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
9.26k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
9.26k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
9.26k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
9.26k
        _parsed = true;
326
9.26k
        return Status::OK();
327
9.26k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
299
13.3k
    Status init() override {
300
13.3k
        CHECK(!_parsed);
301
13.3k
        size_t unused;
302
13.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
13.3k
                                                 _num_element_after_padding, _size_of_element));
304
305
13.3k
        if (_data.size !=
306
13.3k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
4
            std::stringstream ss;
308
4
            ss << "Size information unmatched, _data.size:" << _data.size
309
4
               << ", _num_elements:" << _num_elements << ", expected size is "
310
4
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
4
            return Status::InternalError(ss.str());
312
4
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
13.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
13.3k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
13.3k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
13.3k
        _parsed = true;
326
13.3k
        return Status::OK();
327
13.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
Line
Count
Source
299
6
    Status init() override {
300
6
        CHECK(!_parsed);
301
6
        size_t unused;
302
6
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
6
                                                 _num_element_after_padding, _size_of_element));
304
305
6
        if (_data.size !=
306
6
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
6
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
6
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
6
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
6
        _parsed = true;
326
6
        return Status::OK();
327
6
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
299
1.54k
    Status init() override {
300
1.54k
        CHECK(!_parsed);
301
1.54k
        size_t unused;
302
1.54k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
1.54k
                                                 _num_element_after_padding, _size_of_element));
304
305
1.54k
        if (_data.size !=
306
1.54k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
1.54k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
1.54k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
1.54k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
1.54k
        _parsed = true;
326
1.54k
        return Status::OK();
327
1.54k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
299
59.0k
    Status init() override {
300
59.0k
        CHECK(!_parsed);
301
59.0k
        size_t unused;
302
59.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
59.0k
                                                 _num_element_after_padding, _size_of_element));
304
305
59.0k
        if (_data.size !=
306
59.0k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
59.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
59.0k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
59.0k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
59.0k
        _parsed = true;
326
59.0k
        return Status::OK();
327
59.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
299
67.3k
    Status init() override {
300
67.3k
        CHECK(!_parsed);
301
67.3k
        size_t unused;
302
67.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
67.3k
                                                 _num_element_after_padding, _size_of_element));
304
305
67.3k
        if (_data.size !=
306
67.3k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
67.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
67.3k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
67.3k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
67.3k
        _parsed = true;
326
67.3k
        return Status::OK();
327
67.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE4initEv
Line
Count
Source
299
3.16k
    Status init() override {
300
3.16k
        CHECK(!_parsed);
301
3.16k
        size_t unused;
302
3.16k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
3.16k
                                                 _num_element_after_padding, _size_of_element));
304
305
3.16k
        if (_data.size !=
306
3.16k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
3.16k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
3.16k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
3.16k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
3.16k
        _parsed = true;
326
3.16k
        return Status::OK();
327
3.16k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
299
2.24k
    Status init() override {
300
2.24k
        CHECK(!_parsed);
301
2.24k
        size_t unused;
302
2.24k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
2.24k
                                                 _num_element_after_padding, _size_of_element));
304
305
2.24k
        if (_data.size !=
306
2.24k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
2.24k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
2.24k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
2.24k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
2.24k
        _parsed = true;
326
2.24k
        return Status::OK();
327
2.24k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
299
16.2k
    Status init() override {
300
16.2k
        CHECK(!_parsed);
301
16.2k
        size_t unused;
302
16.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
16.2k
                                                 _num_element_after_padding, _size_of_element));
304
305
16.2k
        if (_data.size !=
306
16.2k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
16.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
16.2k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
16.2k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
16.2k
        _parsed = true;
326
16.2k
        return Status::OK();
327
16.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
299
1.38k
    Status init() override {
300
1.38k
        CHECK(!_parsed);
301
1.38k
        size_t unused;
302
1.38k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
1.38k
                                                 _num_element_after_padding, _size_of_element));
304
305
1.38k
        if (_data.size !=
306
1.38k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
1
            std::stringstream ss;
308
1
            ss << "Size information unmatched, _data.size:" << _data.size
309
1
               << ", _num_elements:" << _num_elements << ", expected size is "
310
1
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
1
            return Status::InternalError(ss.str());
312
1
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
1.37k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
1.37k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
1.37k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
1.37k
        _parsed = true;
326
1.37k
        return Status::OK();
327
1.37k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
299
15.5k
    Status init() override {
300
15.5k
        CHECK(!_parsed);
301
15.5k
        size_t unused;
302
15.5k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
15.5k
                                                 _num_element_after_padding, _size_of_element));
304
305
15.5k
        if (_data.size !=
306
15.5k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
15.5k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
15.5k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
15.5k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
15.5k
        _parsed = true;
326
15.5k
        return Status::OK();
327
15.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
299
43.3k
    Status init() override {
300
43.3k
        CHECK(!_parsed);
301
43.3k
        size_t unused;
302
43.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
43.3k
                                                 _num_element_after_padding, _size_of_element));
304
305
43.3k
        if (_data.size !=
306
43.3k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
43.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
43.3k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
43.3k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
43.3k
        _parsed = true;
326
43.3k
        return Status::OK();
327
43.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
299
31.0k
    Status init() override {
300
31.0k
        CHECK(!_parsed);
301
31.0k
        size_t unused;
302
31.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
31.0k
                                                 _num_element_after_padding, _size_of_element));
304
305
31.0k
        if (_data.size !=
306
31.0k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
31.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
31.0k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
31.0k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
31.0k
        _parsed = true;
326
31.0k
        return Status::OK();
327
31.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
299
1.77k
    Status init() override {
300
1.77k
        CHECK(!_parsed);
301
1.77k
        size_t unused;
302
1.77k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
1.77k
                                                 _num_element_after_padding, _size_of_element));
304
305
1.77k
        if (_data.size !=
306
1.77k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
1.77k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
1.77k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
1.77k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
1.77k
        _parsed = true;
326
1.77k
        return Status::OK();
327
1.77k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
299
889
    Status init() override {
300
889
        CHECK(!_parsed);
301
889
        size_t unused;
302
889
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
889
                                                 _num_element_after_padding, _size_of_element));
304
305
889
        if (_data.size !=
306
889
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
889
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
889
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
889
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
889
        _parsed = true;
326
889
        return Status::OK();
327
889
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
299
937
    Status init() override {
300
937
        CHECK(!_parsed);
301
937
        size_t unused;
302
937
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
937
                                                 _num_element_after_padding, _size_of_element));
304
305
937
        if (_data.size !=
306
937
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
937
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
937
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
937
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
937
        _parsed = true;
326
937
        return Status::OK();
327
937
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE4initEv
Line
Count
Source
299
5.01k
    Status init() override {
300
5.01k
        CHECK(!_parsed);
301
5.01k
        size_t unused;
302
5.01k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
5.01k
                                                 _num_element_after_padding, _size_of_element));
304
305
5.01k
        if (_data.size !=
306
5.01k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
5.01k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
5.01k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
5.01k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
5.01k
        _parsed = true;
326
5.01k
        return Status::OK();
327
5.01k
    }
328
329
    // If the page only contains null, then _num_elements == 0, and the nullmap has
330
    // some value. But in _seek_columns --> seek_to_ordinal --> _seek_to_pos_in_page
331
    // in this call stack it will pass pos == 0 to this method. Although we can add some
332
    // code such as check if the count == 0, then skip seek, but there are other method such
333
    // as init will also call seek with pos == 0. And the seek is useless when _num_elements
334
    // == 0, because next batch will return empty in this method.
335
2.84M
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
2.84M
        if (_num_elements == 0) [[unlikely]] {
338
13.5k
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
13.5k
        }
343
344
2.84M
        DCHECK_LE(pos, _num_elements);
345
2.84M
        _cur_index = pos;
346
2.84M
        return Status::OK();
347
2.84M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
335
51.9k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
51.9k
        if (_num_elements == 0) [[unlikely]] {
338
534
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
534
        }
343
344
51.9k
        DCHECK_LE(pos, _num_elements);
345
51.9k
        _cur_index = pos;
346
51.9k
        return Status::OK();
347
51.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
335
891
    Status seek_to_position_in_page(size_t pos) override {
336
891
        DCHECK(_parsed) << "Must call init()";
337
891
        if (_num_elements == 0) [[unlikely]] {
338
0
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
0
        }
343
344
891
        DCHECK_LE(pos, _num_elements);
345
891
        _cur_index = pos;
346
891
        return Status::OK();
347
891
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
335
1.58M
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
1.58M
        if (_num_elements == 0) [[unlikely]] {
338
6.87k
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
6.87k
        }
343
344
1.58M
        DCHECK_LE(pos, _num_elements);
345
1.58M
        _cur_index = pos;
346
1.58M
        return Status::OK();
347
1.58M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
335
44.8k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
44.8k
        if (_num_elements == 0) [[unlikely]] {
338
903
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
903
        }
343
344
44.8k
        DCHECK_LE(pos, _num_elements);
345
44.8k
        _cur_index = pos;
346
44.8k
        return Status::OK();
347
44.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
335
3.15k
    Status seek_to_position_in_page(size_t pos) override {
336
3.15k
        DCHECK(_parsed) << "Must call init()";
337
3.15k
        if (_num_elements == 0) [[unlikely]] {
338
0
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
0
        }
343
344
3.15k
        DCHECK_LE(pos, _num_elements);
345
3.15k
        _cur_index = pos;
346
3.15k
        return Status::OK();
347
3.15k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
335
15.1k
    Status seek_to_position_in_page(size_t pos) override {
336
15.1k
        DCHECK(_parsed) << "Must call init()";
337
15.1k
        if (_num_elements == 0) [[unlikely]] {
338
0
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
0
        }
343
344
15.1k
        DCHECK_LE(pos, _num_elements);
345
15.1k
        _cur_index = pos;
346
15.1k
        return Status::OK();
347
15.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
335
628
    Status seek_to_position_in_page(size_t pos) override {
336
628
        DCHECK(_parsed) << "Must call init()";
337
628
        if (_num_elements == 0) [[unlikely]] {
338
0
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
0
        }
343
344
628
        DCHECK_LE(pos, _num_elements);
345
628
        _cur_index = pos;
346
628
        return Status::OK();
347
628
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
335
1.45k
    Status seek_to_position_in_page(size_t pos) override {
336
1.45k
        DCHECK(_parsed) << "Must call init()";
337
1.45k
        if (_num_elements == 0) [[unlikely]] {
338
1
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
1
        }
343
344
1.45k
        DCHECK_LE(pos, _num_elements);
345
1.45k
        _cur_index = pos;
346
1.45k
        return Status::OK();
347
1.45k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
Line
Count
Source
335
94
    Status seek_to_position_in_page(size_t pos) override {
336
94
        DCHECK(_parsed) << "Must call init()";
337
94
        if (_num_elements == 0) [[unlikely]] {
338
0
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
0
        }
343
344
94
        DCHECK_LE(pos, _num_elements);
345
94
        _cur_index = pos;
346
94
        return Status::OK();
347
94
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
335
215k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
215k
        if (_num_elements == 0) [[unlikely]] {
338
0
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
0
        }
343
344
215k
        DCHECK_LE(pos, _num_elements);
345
215k
        _cur_index = pos;
346
215k
        return Status::OK();
347
215k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
335
502k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
502k
        if (_num_elements == 0) [[unlikely]] {
338
197
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
197
        }
343
344
502k
        DCHECK_LE(pos, _num_elements);
345
502k
        _cur_index = pos;
346
502k
        return Status::OK();
347
502k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
335
68.5k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
68.5k
        if (_num_elements == 0) [[unlikely]] {
338
14
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
14
        }
343
344
68.5k
        DCHECK_LE(pos, _num_elements);
345
68.5k
        _cur_index = pos;
346
68.5k
        return Status::OK();
347
68.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE24seek_to_position_in_pageEm
Line
Count
Source
335
1.09k
    Status seek_to_position_in_page(size_t pos) override {
336
1.09k
        DCHECK(_parsed) << "Must call init()";
337
1.09k
        if (_num_elements == 0) [[unlikely]] {
338
8
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
8
        }
343
344
1.09k
        DCHECK_LE(pos, _num_elements);
345
1.09k
        _cur_index = pos;
346
1.09k
        return Status::OK();
347
1.09k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
335
202k
    Status seek_to_position_in_page(size_t pos) override {
336
202k
        DCHECK(_parsed) << "Must call init()";
337
202k
        if (_num_elements == 0) [[unlikely]] {
338
16
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
16
        }
343
344
202k
        DCHECK_LE(pos, _num_elements);
345
202k
        _cur_index = pos;
346
202k
        return Status::OK();
347
202k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
335
7.25k
    Status seek_to_position_in_page(size_t pos) override {
336
7.25k
        DCHECK(_parsed) << "Must call init()";
337
7.25k
        if (_num_elements == 0) [[unlikely]] {
338
355
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
355
        }
343
344
7.25k
        DCHECK_LE(pos, _num_elements);
345
7.25k
        _cur_index = pos;
346
7.25k
        return Status::OK();
347
7.25k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
Line
Count
Source
335
55
    Status seek_to_position_in_page(size_t pos) override {
336
55
        DCHECK(_parsed) << "Must call init()";
337
55
        if (_num_elements == 0) [[unlikely]] {
338
0
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
0
        }
343
344
55
        DCHECK_LE(pos, _num_elements);
345
55
        _cur_index = pos;
346
55
        return Status::OK();
347
55
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Line
Count
Source
335
910
    Status seek_to_position_in_page(size_t pos) override {
336
910
        DCHECK(_parsed) << "Must call init()";
337
910
        if (_num_elements == 0) [[unlikely]] {
338
67
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
67
        }
343
344
910
        DCHECK_LE(pos, _num_elements);
345
910
        _cur_index = pos;
346
910
        return Status::OK();
347
910
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
335
18.8k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
18.8k
        if (_num_elements == 0) [[unlikely]] {
338
3.50k
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
3.50k
        }
343
344
18.8k
        DCHECK_LE(pos, _num_elements);
345
18.8k
        _cur_index = pos;
346
18.8k
        return Status::OK();
347
18.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Line
Count
Source
335
121k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
121k
        if (_num_elements == 0) [[unlikely]] {
338
1.12k
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
1.12k
        }
343
344
121k
        DCHECK_LE(pos, _num_elements);
345
121k
        _cur_index = pos;
346
121k
        return Status::OK();
347
121k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Line
Count
Source
335
1.99k
    Status seek_to_position_in_page(size_t pos) override {
336
1.99k
        DCHECK(_parsed) << "Must call init()";
337
1.99k
        if (_num_elements == 0) [[unlikely]] {
338
0
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
0
        }
343
344
1.99k
        DCHECK_LE(pos, _num_elements);
345
1.99k
        _cur_index = pos;
346
1.99k
        return Status::OK();
347
1.99k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE24seek_to_position_in_pageEm
Line
Count
Source
335
53
    Status seek_to_position_in_page(size_t pos) override {
336
53
        DCHECK(_parsed) << "Must call init()";
337
53
        if (_num_elements == 0) [[unlikely]] {
338
0
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
0
        }
343
344
53
        DCHECK_LE(pos, _num_elements);
345
53
        _cur_index = pos;
346
53
        return Status::OK();
347
53
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE24seek_to_position_in_pageEm
Line
Count
Source
335
62
    Status seek_to_position_in_page(size_t pos) override {
336
62
        DCHECK(_parsed) << "Must call init()";
337
62
        if (_num_elements == 0) [[unlikely]] {
338
1
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
1
        }
343
344
62
        DCHECK_LE(pos, _num_elements);
345
62
        _cur_index = pos;
346
62
        return Status::OK();
347
62
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE24seek_to_position_in_pageEm
Line
Count
Source
335
1.13k
    Status seek_to_position_in_page(size_t pos) override {
336
1.13k
        DCHECK(_parsed) << "Must call init()";
337
1.13k
        if (_num_elements == 0) [[unlikely]] {
338
0
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
0
        }
343
344
1.13k
        DCHECK_LE(pos, _num_elements);
345
1.13k
        _cur_index = pos;
346
1.13k
        return Status::OK();
347
1.13k
    }
348
349
15
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
350
15
        DCHECK(_parsed) << "Must call init() firstly";
351
352
15
        if (_num_elements == 0) {
353
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
354
0
        }
355
356
15
        size_t left = 0;
357
15
        size_t right = _num_elements;
358
359
15
        void* mid_value = nullptr;
360
361
        // find the first value >= target. after loop,
362
        // - left == index of first value >= target when found
363
        // - left == _num_elements when not found (all values < target)
364
162
        while (left < right) {
365
147
            size_t mid = left + (right - left) / 2;
366
147
            mid_value = get_data(mid);
367
147
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
368
69
                left = mid + 1;
369
78
            } else {
370
78
                right = mid;
371
78
            }
372
147
        }
373
15
        if (left >= _num_elements) {
374
3
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
375
3
        }
376
12
        void* find_value = get_data(left);
377
12
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
378
9
            *exact_match = true;
379
9
        } else {
380
3
            *exact_match = false;
381
3
        }
382
383
12
        _cur_index = left;
384
12
        return Status::OK();
385
15
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE22seek_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
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE22seek_at_or_after_valueEPKvPb
Line
Count
Source
349
5
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
350
5
        DCHECK(_parsed) << "Must call init() firstly";
351
352
5
        if (_num_elements == 0) {
353
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
354
0
        }
355
356
5
        size_t left = 0;
357
5
        size_t right = _num_elements;
358
359
5
        void* mid_value = nullptr;
360
361
        // find the first value >= target. after loop,
362
        // - left == index of first value >= target when found
363
        // - left == _num_elements when not found (all values < target)
364
54
        while (left < right) {
365
49
            size_t mid = left + (right - left) / 2;
366
49
            mid_value = get_data(mid);
367
49
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
368
25
                left = mid + 1;
369
25
            } else {
370
24
                right = mid;
371
24
            }
372
49
        }
373
5
        if (left >= _num_elements) {
374
1
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
375
1
        }
376
4
        void* find_value = get_data(left);
377
4
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
378
3
            *exact_match = true;
379
3
        } else {
380
1
            *exact_match = false;
381
1
        }
382
383
4
        _cur_index = left;
384
4
        return Status::OK();
385
5
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE22seek_at_or_after_valueEPKvPb
Line
Count
Source
349
5
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
350
5
        DCHECK(_parsed) << "Must call init() firstly";
351
352
5
        if (_num_elements == 0) {
353
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
354
0
        }
355
356
5
        size_t left = 0;
357
5
        size_t right = _num_elements;
358
359
5
        void* mid_value = nullptr;
360
361
        // find the first value >= target. after loop,
362
        // - left == index of first value >= target when found
363
        // - left == _num_elements when not found (all values < target)
364
54
        while (left < right) {
365
49
            size_t mid = left + (right - left) / 2;
366
49
            mid_value = get_data(mid);
367
49
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
368
21
                left = mid + 1;
369
28
            } else {
370
28
                right = mid;
371
28
            }
372
49
        }
373
5
        if (left >= _num_elements) {
374
1
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
375
1
        }
376
4
        void* find_value = get_data(left);
377
4
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
378
3
            *exact_match = true;
379
3
        } else {
380
1
            *exact_match = false;
381
1
        }
382
383
4
        _cur_index = left;
384
4
        return Status::OK();
385
5
    }
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_9FieldTypeE41EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE22seek_at_or_after_valueEPKvPb
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE22seek_at_or_after_valueEPKvPb
Line
Count
Source
349
5
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
350
5
        DCHECK(_parsed) << "Must call init() firstly";
351
352
5
        if (_num_elements == 0) {
353
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
354
0
        }
355
356
5
        size_t left = 0;
357
5
        size_t right = _num_elements;
358
359
5
        void* mid_value = nullptr;
360
361
        // find the first value >= target. after loop,
362
        // - left == index of first value >= target when found
363
        // - left == _num_elements when not found (all values < target)
364
54
        while (left < right) {
365
49
            size_t mid = left + (right - left) / 2;
366
49
            mid_value = get_data(mid);
367
49
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
368
23
                left = mid + 1;
369
26
            } else {
370
26
                right = mid;
371
26
            }
372
49
        }
373
5
        if (left >= _num_elements) {
374
1
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
375
1
        }
376
4
        void* find_value = get_data(left);
377
4
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
378
3
            *exact_match = true;
379
3
        } else {
380
1
            *exact_match = false;
381
1
        }
382
383
4
        _cur_index = left;
384
4
        return Status::OK();
385
5
    }
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
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE22seek_at_or_after_valueEPKvPb
386
387
    template <bool forward_index = true>
388
2.46M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
2.46M
        DCHECK(_parsed);
390
2.47M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
2.46M
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
2.46M
        StorageLayout<Type>::storage_to_column(
398
2.46M
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
2.46M
        *n = max_fetch;
400
2.46M
        if constexpr (forward_index) {
401
2.41M
            _cur_index += max_fetch;
402
2.41M
        }
403
404
2.46M
        return Status::OK();
405
2.46M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
103k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
103k
        DCHECK(_parsed);
390
103k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
103k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
103k
        StorageLayout<Type>::storage_to_column(
398
103k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
103k
        *n = max_fetch;
400
103k
        if constexpr (forward_index) {
401
103k
            _cur_index += max_fetch;
402
103k
        }
403
404
103k
        return Status::OK();
405
103k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
10.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
10.8k
        DCHECK(_parsed);
390
10.8k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
10.8k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
10.8k
        StorageLayout<Type>::storage_to_column(
398
10.8k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
10.8k
        *n = max_fetch;
400
10.8k
        if constexpr (forward_index) {
401
10.8k
            _cur_index += max_fetch;
402
10.8k
        }
403
404
10.8k
        return Status::OK();
405
10.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
769k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
769k
        DCHECK(_parsed);
390
771k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
769k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
769k
        StorageLayout<Type>::storage_to_column(
398
769k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
769k
        *n = max_fetch;
400
769k
        if constexpr (forward_index) {
401
769k
            _cur_index += max_fetch;
402
769k
        }
403
404
769k
        return Status::OK();
405
769k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
786k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
786k
        DCHECK(_parsed);
390
790k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
786k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
786k
        StorageLayout<Type>::storage_to_column(
398
786k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
786k
        *n = max_fetch;
400
786k
        if constexpr (forward_index) {
401
786k
            _cur_index += max_fetch;
402
786k
        }
403
404
786k
        return Status::OK();
405
786k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
10.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
10.2k
        DCHECK(_parsed);
390
10.2k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
10.2k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
10.2k
        StorageLayout<Type>::storage_to_column(
398
10.2k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
10.2k
        *n = max_fetch;
400
10.2k
        if constexpr (forward_index) {
401
10.2k
            _cur_index += max_fetch;
402
10.2k
        }
403
404
10.2k
        return Status::OK();
405
10.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
91.3k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
91.3k
        DCHECK(_parsed);
390
91.3k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
91.3k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
91.3k
        StorageLayout<Type>::storage_to_column(
398
91.3k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
91.3k
        *n = max_fetch;
400
91.3k
        if constexpr (forward_index) {
401
91.3k
            _cur_index += max_fetch;
402
91.3k
        }
403
404
91.3k
        return Status::OK();
405
91.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
49.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
49.9k
        DCHECK(_parsed);
390
49.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
49.9k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
49.9k
        StorageLayout<Type>::storage_to_column(
398
49.9k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
49.9k
        *n = max_fetch;
400
        if constexpr (forward_index) {
401
            _cur_index += max_fetch;
402
        }
403
404
49.9k
        return Status::OK();
405
49.9k
    }
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
388
6.12k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
6.12k
        DCHECK(_parsed);
390
6.12k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
6.12k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
6.12k
        StorageLayout<Type>::storage_to_column(
398
6.12k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
6.12k
        *n = max_fetch;
400
6.12k
        if constexpr (forward_index) {
401
6.12k
            _cur_index += max_fetch;
402
6.12k
        }
403
404
6.12k
        return Status::OK();
405
6.12k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
8.33k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
8.33k
        DCHECK(_parsed);
390
8.33k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
8.33k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
8.33k
        StorageLayout<Type>::storage_to_column(
398
8.33k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
8.33k
        *n = max_fetch;
400
8.33k
        if constexpr (forward_index) {
401
8.33k
            _cur_index += max_fetch;
402
8.33k
        }
403
404
8.33k
        return Status::OK();
405
8.33k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
93
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
93
        DCHECK(_parsed);
390
93
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
93
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
93
        StorageLayout<Type>::storage_to_column(
398
93
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
93
        *n = max_fetch;
400
93
        if constexpr (forward_index) {
401
93
            _cur_index += max_fetch;
402
93
        }
403
404
93
        return Status::OK();
405
93
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
3.57k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
3.57k
        DCHECK(_parsed);
390
3.57k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
3.57k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
3.57k
        StorageLayout<Type>::storage_to_column(
398
3.57k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
3.57k
        *n = max_fetch;
400
3.57k
        if constexpr (forward_index) {
401
3.57k
            _cur_index += max_fetch;
402
3.57k
        }
403
404
3.57k
        return Status::OK();
405
3.57k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
370k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
370k
        DCHECK(_parsed);
390
370k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
370k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
370k
        StorageLayout<Type>::storage_to_column(
398
370k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
370k
        *n = max_fetch;
400
370k
        if constexpr (forward_index) {
401
370k
            _cur_index += max_fetch;
402
370k
        }
403
404
370k
        return Status::OK();
405
370k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
65.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
65.1k
        DCHECK(_parsed);
390
65.1k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
65.1k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
65.1k
        StorageLayout<Type>::storage_to_column(
398
65.1k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
65.1k
        *n = max_fetch;
400
65.1k
        if constexpr (forward_index) {
401
65.1k
            _cur_index += max_fetch;
402
65.1k
        }
403
404
65.1k
        return Status::OK();
405
65.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
2.27k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
2.27k
        DCHECK(_parsed);
390
2.27k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
2.27k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
2.27k
        StorageLayout<Type>::storage_to_column(
398
2.27k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
2.27k
        *n = max_fetch;
400
2.27k
        if constexpr (forward_index) {
401
2.27k
            _cur_index += max_fetch;
402
2.27k
        }
403
404
2.27k
        return Status::OK();
405
2.27k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
1.21k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
1.21k
        DCHECK(_parsed);
390
1.21k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
1.21k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
1.21k
        StorageLayout<Type>::storage_to_column(
398
1.21k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
1.21k
        *n = max_fetch;
400
1.21k
        if constexpr (forward_index) {
401
1.21k
            _cur_index += max_fetch;
402
1.21k
        }
403
404
1.21k
        return Status::OK();
405
1.21k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
8.36k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
8.36k
        DCHECK(_parsed);
390
8.36k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
8.36k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
8.36k
        StorageLayout<Type>::storage_to_column(
398
8.36k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
8.36k
        *n = max_fetch;
400
8.36k
        if constexpr (forward_index) {
401
8.36k
            _cur_index += max_fetch;
402
8.36k
        }
403
404
8.36k
        return Status::OK();
405
8.36k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
1.27k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
1.27k
        DCHECK(_parsed);
390
1.27k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
1.27k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
1.27k
        StorageLayout<Type>::storage_to_column(
398
1.27k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
1.27k
        *n = max_fetch;
400
1.27k
        if constexpr (forward_index) {
401
1.27k
            _cur_index += max_fetch;
402
1.27k
        }
403
404
1.27k
        return Status::OK();
405
1.27k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
8.07k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
8.07k
        DCHECK(_parsed);
390
8.07k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
8.07k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
8.07k
        StorageLayout<Type>::storage_to_column(
398
8.07k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
8.07k
        *n = max_fetch;
400
8.07k
        if constexpr (forward_index) {
401
8.07k
            _cur_index += max_fetch;
402
8.07k
        }
403
404
8.07k
        return Status::OK();
405
8.07k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
48.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
48.7k
        DCHECK(_parsed);
390
48.7k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
48.7k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
48.7k
        StorageLayout<Type>::storage_to_column(
398
48.7k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
48.7k
        *n = max_fetch;
400
48.7k
        if constexpr (forward_index) {
401
48.7k
            _cur_index += max_fetch;
402
48.7k
        }
403
404
48.7k
        return Status::OK();
405
48.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
20.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
20.5k
        DCHECK(_parsed);
390
20.5k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
20.5k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
20.5k
        StorageLayout<Type>::storage_to_column(
398
20.5k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
20.5k
        *n = max_fetch;
400
20.5k
        if constexpr (forward_index) {
401
20.5k
            _cur_index += max_fetch;
402
20.5k
        }
403
404
20.5k
        return Status::OK();
405
20.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
3.18k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
3.18k
        DCHECK(_parsed);
390
3.18k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
3.18k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
3.18k
        StorageLayout<Type>::storage_to_column(
398
3.18k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
3.18k
        *n = max_fetch;
400
3.18k
        if constexpr (forward_index) {
401
3.18k
            _cur_index += max_fetch;
402
3.18k
        }
403
404
3.18k
        return Status::OK();
405
3.18k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
631
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
631
        DCHECK(_parsed);
390
632
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
631
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
631
        StorageLayout<Type>::storage_to_column(
398
631
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
631
        *n = max_fetch;
400
631
        if constexpr (forward_index) {
401
631
            _cur_index += max_fetch;
402
631
        }
403
404
631
        return Status::OK();
405
631
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
658
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
658
        DCHECK(_parsed);
390
658
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
658
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
658
        StorageLayout<Type>::storage_to_column(
398
658
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
658
        *n = max_fetch;
400
658
        if constexpr (forward_index) {
401
658
            _cur_index += max_fetch;
402
658
        }
403
404
658
        return Status::OK();
405
658
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
94.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
94.7k
        DCHECK(_parsed);
390
94.7k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
94.7k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
94.7k
        StorageLayout<Type>::storage_to_column(
398
94.7k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
94.7k
        *n = max_fetch;
400
94.7k
        if constexpr (forward_index) {
401
94.7k
            _cur_index += max_fetch;
402
94.7k
        }
403
404
94.7k
        return Status::OK();
405
94.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
406
407
2.41M
    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
407
103k
    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
407
10.8k
    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
407
774k
    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
407
784k
    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
407
10.2k
    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
407
91.4k
    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
407
6.12k
    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
407
8.34k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
407
93
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
407
3.57k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
407
370k
    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
407
65.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
407
2.27k
    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
407
1.21k
    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
407
8.36k
    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
407
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
407
8.07k
    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
407
48.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
407
20.5k
    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
407
3.18k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
407
634
    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
407
659
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
407
94.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
408
409
    Status read_by_rowids(const rowid_t* rowids, ordinal_t page_first_ordinal, size_t* n,
410
388k
                          MutableColumnPtr& dst) override {
411
388k
        DCHECK(_parsed);
412
388k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
388k
        auto total = *n;
418
388k
        auto read_count = 0;
419
388k
        _buffer.resize(total);
420
73.8M
        for (size_t i = 0; i < total; ++i) {
421
73.5M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
73.5M
            if (UNLIKELY(ord >= _num_elements)) {
423
8.88k
                break;
424
8.88k
            }
425
426
73.4M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
73.4M
        }
428
429
388k
        if (LIKELY(read_count > 0)) {
430
388k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
388k
                                                   read_count, *dst);
432
388k
        }
433
434
388k
        *n = read_count;
435
388k
        return Status::OK();
436
388k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
51.3k
                          MutableColumnPtr& dst) override {
411
51.3k
        DCHECK(_parsed);
412
51.3k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
51.3k
        auto total = *n;
418
51.3k
        auto read_count = 0;
419
51.3k
        _buffer.resize(total);
420
830k
        for (size_t i = 0; i < total; ++i) {
421
778k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
778k
            if (UNLIKELY(ord >= _num_elements)) {
423
0
                break;
424
0
            }
425
426
778k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
778k
        }
428
429
51.4k
        if (LIKELY(read_count > 0)) {
430
51.4k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
51.4k
                                                   read_count, *dst);
432
51.4k
        }
433
434
51.3k
        *n = read_count;
435
51.3k
        return Status::OK();
436
51.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
6.15k
                          MutableColumnPtr& dst) override {
411
6.15k
        DCHECK(_parsed);
412
6.15k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
6.15k
        auto total = *n;
418
6.15k
        auto read_count = 0;
419
6.15k
        _buffer.resize(total);
420
18.1k
        for (size_t i = 0; i < total; ++i) {
421
12.0k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
12.0k
            if (UNLIKELY(ord >= _num_elements)) {
423
0
                break;
424
0
            }
425
426
12.0k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
12.0k
        }
428
429
6.15k
        if (LIKELY(read_count > 0)) {
430
6.15k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
6.15k
                                                   read_count, *dst);
432
6.15k
        }
433
434
6.15k
        *n = read_count;
435
6.15k
        return Status::OK();
436
6.15k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
77.4k
                          MutableColumnPtr& dst) override {
411
77.4k
        DCHECK(_parsed);
412
77.4k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
77.4k
        auto total = *n;
418
77.4k
        auto read_count = 0;
419
77.4k
        _buffer.resize(total);
420
16.9M
        for (size_t i = 0; i < total; ++i) {
421
16.8M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
16.8M
            if (UNLIKELY(ord >= _num_elements)) {
423
487
                break;
424
487
            }
425
426
16.8M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
16.8M
        }
428
429
77.5k
        if (LIKELY(read_count > 0)) {
430
77.5k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
77.5k
                                                   read_count, *dst);
432
77.5k
        }
433
434
77.4k
        *n = read_count;
435
77.4k
        return Status::OK();
436
77.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
52.6k
                          MutableColumnPtr& dst) override {
411
52.6k
        DCHECK(_parsed);
412
52.6k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
52.6k
        auto total = *n;
418
52.6k
        auto read_count = 0;
419
52.6k
        _buffer.resize(total);
420
2.03M
        for (size_t i = 0; i < total; ++i) {
421
1.98M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
1.98M
            if (UNLIKELY(ord >= _num_elements)) {
423
98
                break;
424
98
            }
425
426
1.98M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
1.98M
        }
428
429
52.6k
        if (LIKELY(read_count > 0)) {
430
52.6k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
52.6k
                                                   read_count, *dst);
432
52.6k
        }
433
434
52.6k
        *n = read_count;
435
52.6k
        return Status::OK();
436
52.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
5.18k
                          MutableColumnPtr& dst) override {
411
5.18k
        DCHECK(_parsed);
412
5.18k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
5.18k
        auto total = *n;
418
5.18k
        auto read_count = 0;
419
5.18k
        _buffer.resize(total);
420
11.6k
        for (size_t i = 0; i < total; ++i) {
421
6.41k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
6.41k
            if (UNLIKELY(ord >= _num_elements)) {
423
3
                break;
424
3
            }
425
426
6.41k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
6.41k
        }
428
429
5.19k
        if (LIKELY(read_count > 0)) {
430
5.19k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
5.19k
                                                   read_count, *dst);
432
5.19k
        }
433
434
5.18k
        *n = read_count;
435
5.18k
        return Status::OK();
436
5.18k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
63.7k
                          MutableColumnPtr& dst) override {
411
63.7k
        DCHECK(_parsed);
412
63.7k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
63.7k
        auto total = *n;
418
63.7k
        auto read_count = 0;
419
63.7k
        _buffer.resize(total);
420
4.14M
        for (size_t i = 0; i < total; ++i) {
421
4.08M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
4.08M
            if (UNLIKELY(ord >= _num_elements)) {
423
1.67k
                break;
424
1.67k
            }
425
426
4.08M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
4.08M
        }
428
429
63.7k
        if (LIKELY(read_count > 0)) {
430
63.7k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
63.7k
                                                   read_count, *dst);
432
63.7k
        }
433
434
63.7k
        *n = read_count;
435
63.7k
        return Status::OK();
436
63.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
3.60k
                          MutableColumnPtr& dst) override {
411
3.60k
        DCHECK(_parsed);
412
3.60k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
3.60k
        auto total = *n;
418
3.60k
        auto read_count = 0;
419
3.60k
        _buffer.resize(total);
420
10.5k
        for (size_t i = 0; i < total; ++i) {
421
6.97k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
6.97k
            if (UNLIKELY(ord >= _num_elements)) {
423
0
                break;
424
0
            }
425
426
6.97k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
6.97k
        }
428
429
3.61k
        if (LIKELY(read_count > 0)) {
430
3.61k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
3.61k
                                                   read_count, *dst);
432
3.61k
        }
433
434
3.60k
        *n = read_count;
435
3.60k
        return Status::OK();
436
3.60k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
5.70k
                          MutableColumnPtr& dst) override {
411
5.70k
        DCHECK(_parsed);
412
5.70k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
5.70k
        auto total = *n;
418
5.70k
        auto read_count = 0;
419
5.70k
        _buffer.resize(total);
420
19.8k
        for (size_t i = 0; i < total; ++i) {
421
14.2k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
14.2k
            if (UNLIKELY(ord >= _num_elements)) {
423
96
                break;
424
96
            }
425
426
14.1k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
14.1k
        }
428
429
5.70k
        if (LIKELY(read_count > 0)) {
430
5.70k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
5.70k
                                                   read_count, *dst);
432
5.70k
        }
433
434
5.70k
        *n = read_count;
435
5.70k
        return Status::OK();
436
5.70k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
93
                          MutableColumnPtr& dst) override {
411
93
        DCHECK(_parsed);
412
93
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
93
        auto total = *n;
418
93
        auto read_count = 0;
419
93
        _buffer.resize(total);
420
803
        for (size_t i = 0; i < total; ++i) {
421
710
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
710
            if (UNLIKELY(ord >= _num_elements)) {
423
0
                break;
424
0
            }
425
426
710
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
710
        }
428
429
93
        if (LIKELY(read_count > 0)) {
430
93
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
93
                                                   read_count, *dst);
432
93
        }
433
434
93
        *n = read_count;
435
93
        return Status::OK();
436
93
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
1.38k
                          MutableColumnPtr& dst) override {
411
1.38k
        DCHECK(_parsed);
412
1.38k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
1.38k
        auto total = *n;
418
1.38k
        auto read_count = 0;
419
1.38k
        _buffer.resize(total);
420
479k
        for (size_t i = 0; i < total; ++i) {
421
478k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
478k
            if (UNLIKELY(ord >= _num_elements)) {
423
15
                break;
424
15
            }
425
426
478k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
478k
        }
428
429
1.38k
        if (LIKELY(read_count > 0)) {
430
1.38k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
1.38k
                                                   read_count, *dst);
432
1.38k
        }
433
434
1.38k
        *n = read_count;
435
1.38k
        return Status::OK();
436
1.38k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
28.0k
                          MutableColumnPtr& dst) override {
411
28.0k
        DCHECK(_parsed);
412
28.0k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
28.0k
        auto total = *n;
418
28.0k
        auto read_count = 0;
419
28.0k
        _buffer.resize(total);
420
6.27M
        for (size_t i = 0; i < total; ++i) {
421
6.24M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
6.24M
            if (UNLIKELY(ord >= _num_elements)) {
423
419
                break;
424
419
            }
425
426
6.24M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
6.24M
        }
428
429
28.0k
        if (LIKELY(read_count > 0)) {
430
28.0k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
28.0k
                                                   read_count, *dst);
432
28.0k
        }
433
434
28.0k
        *n = read_count;
435
28.0k
        return Status::OK();
436
28.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
32.5k
                          MutableColumnPtr& dst) override {
411
32.5k
        DCHECK(_parsed);
412
32.5k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
32.5k
        auto total = *n;
418
32.5k
        auto read_count = 0;
419
32.5k
        _buffer.resize(total);
420
10.0M
        for (size_t i = 0; i < total; ++i) {
421
10.0M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
10.0M
            if (UNLIKELY(ord >= _num_elements)) {
423
183
                break;
424
183
            }
425
426
10.0M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
10.0M
        }
428
429
32.5k
        if (LIKELY(read_count > 0)) {
430
32.5k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
32.5k
                                                   read_count, *dst);
432
32.5k
        }
433
434
32.5k
        *n = read_count;
435
32.5k
        return Status::OK();
436
32.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
1.23k
                          MutableColumnPtr& dst) override {
411
1.23k
        DCHECK(_parsed);
412
1.23k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
1.23k
        auto total = *n;
418
1.23k
        auto read_count = 0;
419
1.23k
        _buffer.resize(total);
420
4.27k
        for (size_t i = 0; i < total; ++i) {
421
3.03k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
3.03k
            if (UNLIKELY(ord >= _num_elements)) {
423
1
                break;
424
1
            }
425
426
3.03k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
3.03k
        }
428
429
1.23k
        if (LIKELY(read_count > 0)) {
430
1.23k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
1.23k
                                                   read_count, *dst);
432
1.23k
        }
433
434
1.23k
        *n = read_count;
435
1.23k
        return Status::OK();
436
1.23k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
1.77k
                          MutableColumnPtr& dst) override {
411
1.77k
        DCHECK(_parsed);
412
1.77k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
1.77k
        auto total = *n;
418
1.77k
        auto read_count = 0;
419
1.77k
        _buffer.resize(total);
420
482k
        for (size_t i = 0; i < total; ++i) {
421
481k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
481k
            if (UNLIKELY(ord >= _num_elements)) {
423
247
                break;
424
247
            }
425
426
481k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
481k
        }
428
429
1.77k
        if (LIKELY(read_count > 0)) {
430
1.77k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
1.77k
                                                   read_count, *dst);
432
1.77k
        }
433
434
1.77k
        *n = read_count;
435
1.77k
        return Status::OK();
436
1.77k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
12.7k
                          MutableColumnPtr& dst) override {
411
12.7k
        DCHECK(_parsed);
412
12.7k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
12.7k
        auto total = *n;
418
12.7k
        auto read_count = 0;
419
12.7k
        _buffer.resize(total);
420
27.2k
        for (size_t i = 0; i < total; ++i) {
421
14.4k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
14.4k
            if (UNLIKELY(ord >= _num_elements)) {
423
1
                break;
424
1
            }
425
426
14.4k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
14.4k
        }
428
429
12.7k
        if (LIKELY(read_count > 0)) {
430
12.7k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
12.7k
                                                   read_count, *dst);
432
12.7k
        }
433
434
12.7k
        *n = read_count;
435
12.7k
        return Status::OK();
436
12.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
168
                          MutableColumnPtr& dst) override {
411
168
        DCHECK(_parsed);
412
168
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
168
        auto total = *n;
418
168
        auto read_count = 0;
419
168
        _buffer.resize(total);
420
480
        for (size_t i = 0; i < total; ++i) {
421
314
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
314
            if (UNLIKELY(ord >= _num_elements)) {
423
2
                break;
424
2
            }
425
426
312
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
312
        }
428
429
168
        if (LIKELY(read_count > 0)) {
430
168
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
168
                                                   read_count, *dst);
432
168
        }
433
434
168
        *n = read_count;
435
168
        return Status::OK();
436
168
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
4.53k
                          MutableColumnPtr& dst) override {
411
4.53k
        DCHECK(_parsed);
412
4.53k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
4.53k
        auto total = *n;
418
4.53k
        auto read_count = 0;
419
4.53k
        _buffer.resize(total);
420
19.1k
        for (size_t i = 0; i < total; ++i) {
421
14.6k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
14.6k
            if (UNLIKELY(ord >= _num_elements)) {
423
0
                break;
424
0
            }
425
426
14.6k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
14.6k
        }
428
429
4.53k
        if (LIKELY(read_count > 0)) {
430
4.53k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
4.53k
                                                   read_count, *dst);
432
4.53k
        }
433
434
4.53k
        *n = read_count;
435
4.53k
        return Status::OK();
436
4.53k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
24.8k
                          MutableColumnPtr& dst) override {
411
24.8k
        DCHECK(_parsed);
412
24.8k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
24.8k
        auto total = *n;
418
24.8k
        auto read_count = 0;
419
24.8k
        _buffer.resize(total);
420
23.5M
        for (size_t i = 0; i < total; ++i) {
421
23.5M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
23.5M
            if (UNLIKELY(ord >= _num_elements)) {
423
4.92k
                break;
424
4.92k
            }
425
426
23.5M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
23.5M
        }
428
429
24.8k
        if (LIKELY(read_count > 0)) {
430
24.8k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
24.8k
                                                   read_count, *dst);
432
24.8k
        }
433
434
24.8k
        *n = read_count;
435
24.8k
        return Status::OK();
436
24.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
13.2k
                          MutableColumnPtr& dst) override {
411
13.2k
        DCHECK(_parsed);
412
13.2k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
13.2k
        auto total = *n;
418
13.2k
        auto read_count = 0;
419
13.2k
        _buffer.resize(total);
420
8.91M
        for (size_t i = 0; i < total; ++i) {
421
8.90M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
8.90M
            if (UNLIKELY(ord >= _num_elements)) {
423
720
                break;
424
720
            }
425
426
8.90M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
8.90M
        }
428
429
13.2k
        if (LIKELY(read_count > 0)) {
430
13.2k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
13.2k
                                                   read_count, *dst);
432
13.2k
        }
433
434
13.2k
        *n = read_count;
435
13.2k
        return Status::OK();
436
13.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
1.00k
                          MutableColumnPtr& dst) override {
411
1.00k
        DCHECK(_parsed);
412
1.00k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
1.00k
        auto total = *n;
418
1.00k
        auto read_count = 0;
419
1.00k
        _buffer.resize(total);
420
2.98k
        for (size_t i = 0; i < total; ++i) {
421
1.99k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
1.99k
            if (UNLIKELY(ord >= _num_elements)) {
423
6
                break;
424
6
            }
425
426
1.98k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
1.98k
        }
428
429
1.00k
        if (LIKELY(read_count > 0)) {
430
1.00k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
1.00k
                                                   read_count, *dst);
432
1.00k
        }
433
434
1.00k
        *n = read_count;
435
1.00k
        return Status::OK();
436
1.00k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
302
                          MutableColumnPtr& dst) override {
411
302
        DCHECK(_parsed);
412
302
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
302
        auto total = *n;
418
302
        auto read_count = 0;
419
302
        _buffer.resize(total);
420
1.00k
        for (size_t i = 0; i < total; ++i) {
421
698
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
698
            if (UNLIKELY(ord >= _num_elements)) {
423
0
                break;
424
0
            }
425
426
698
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
698
        }
428
429
302
        if (LIKELY(read_count > 0)) {
430
302
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
302
                                                   read_count, *dst);
432
302
        }
433
434
302
        *n = read_count;
435
302
        return Status::OK();
436
302
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
341
                          MutableColumnPtr& dst) override {
411
341
        DCHECK(_parsed);
412
341
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
341
        auto total = *n;
418
341
        auto read_count = 0;
419
341
        _buffer.resize(total);
420
1.34k
        for (size_t i = 0; i < total; ++i) {
421
1.01k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
1.01k
            if (UNLIKELY(ord >= _num_elements)) {
423
3
                break;
424
3
            }
425
426
1.00k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
1.00k
        }
428
429
341
        if (LIKELY(read_count > 0)) {
430
341
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
341
                                                   read_count, *dst);
432
341
        }
433
434
341
        *n = read_count;
435
341
        return Status::OK();
436
341
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
535
                          MutableColumnPtr& dst) override {
411
535
        DCHECK(_parsed);
412
535
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
535
        auto total = *n;
418
535
        auto read_count = 0;
419
535
        _buffer.resize(total);
420
1.33k
        for (size_t i = 0; i < total; ++i) {
421
801
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
801
            if (UNLIKELY(ord >= _num_elements)) {
423
3
                break;
424
3
            }
425
426
798
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
798
        }
428
429
535
        if (LIKELY(read_count > 0)) {
430
535
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
535
                                                   read_count, *dst);
432
535
        }
433
434
535
        *n = read_count;
435
535
        return Status::OK();
436
535
    }
437
438
49.9k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
439
49.9k
        return next_batch<false>(n, dst);
440
49.9k
    }
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_9FieldTypeE5EE15peek_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
438
49.9k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
439
49.9k
        return next_batch<false>(n, dst);
440
49.9k
    }
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_9FieldTypeE41EE15peek_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
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
441
442
4
    size_t count() const override { return _num_elements; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE5countEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
442
4
    size_t count() const override { return _num_elements; }
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_9FieldTypeE41EE5countEv
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
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE5countEv
443
444
1.58M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
444
1.26k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
444
684
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
444
752k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
444
13.2k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
444
394
    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
444
785
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
444
1.33k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
Line
Count
Source
444
184
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
444
212k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
444
229k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
444
39.7k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE13current_indexEv
Line
Count
Source
444
321
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
444
201k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Line
Count
Source
444
1.16k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE13current_indexEv
Line
Count
Source
444
61
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE13current_indexEv
Line
Count
Source
444
3.63k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
444
4.62k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
444
117k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE13current_indexEv
Line
Count
Source
444
368
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE13current_indexEv
Line
Count
Source
444
90
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
Line
Count
Source
444
98
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE13current_indexEv
Line
Count
Source
444
678
    size_t current_index() const override { return _cur_index; }
445
446
77.2M
    char* get_data(size_t index) const {
447
77.2M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
77.2M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
446
882k
    char* get_data(size_t index) const {
447
882k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
882k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
446
22.8k
    char* get_data(size_t index) const {
447
22.8k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
22.8k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
446
18.8M
    char* get_data(size_t index) const {
447
18.8M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
18.8M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
446
2.77M
    char* get_data(size_t index) const {
447
2.77M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
2.77M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
446
16.6k
    char* get_data(size_t index) const {
447
16.6k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
16.6k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
446
4.22M
    char* get_data(size_t index) const {
447
4.22M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
4.22M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
446
13.1k
    char* get_data(size_t index) const {
447
13.1k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
13.1k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
446
22.5k
    char* get_data(size_t index) const {
447
22.5k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
22.5k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
Line
Count
Source
446
803
    char* get_data(size_t index) const {
447
803
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
803
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
446
482k
    char* get_data(size_t index) const {
447
482k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
482k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
446
6.61M
    char* get_data(size_t index) const {
447
6.61M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
6.61M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
446
10.0M
    char* get_data(size_t index) const {
447
10.0M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
10.0M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE8get_dataEm
Line
Count
Source
446
5.30k
    char* get_data(size_t index) const {
447
5.30k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
5.30k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
446
482k
    char* get_data(size_t index) const {
447
482k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
482k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
446
22.8k
    char* get_data(size_t index) const {
447
22.8k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
22.8k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
446
1.63k
    char* get_data(size_t index) const {
447
1.63k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
1.63k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
446
22.7k
    char* get_data(size_t index) const {
447
22.7k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
22.7k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
446
23.6M
    char* get_data(size_t index) const {
447
23.6M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
23.6M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
446
8.92M
    char* get_data(size_t index) const {
447
8.92M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
8.92M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
446
5.17k
    char* get_data(size_t index) const {
447
5.17k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
5.17k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Line
Count
Source
446
1.33k
    char* get_data(size_t index) const {
447
1.33k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
1.33k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
Line
Count
Source
446
1.66k
    char* get_data(size_t index) const {
447
1.66k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
1.66k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE8get_dataEm
Line
Count
Source
446
95.5k
    char* get_data(size_t index) const {
447
95.5k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
95.5k
    }
449
450
private:
451
    void _copy_next_values(size_t n, void* data) {
452
        memcpy(data, get_data(_cur_index), n * SIZE_OF_TYPE);
453
    }
454
455
    using CppType = typename TypeTraits<Type>::CppType;
456
457
    static constexpr size_t SIZE_OF_TYPE = TypeTraits<Type>::size;
458
459
    Slice _data;
460
    PageDecoderOptions _options;
461
    bool _parsed;
462
    size_t _num_elements;
463
    size_t _num_element_after_padding;
464
465
    int _size_of_element;
466
    size_t _cur_index;
467
468
    std::vector<std::conditional_t<std::is_same_v<CppType, bool>, uint8_t, CppType>> _buffer;
469
470
    friend class BinaryDictPageDecoder;
471
};
472
473
} // namespace segment_v2
474
} // namespace doris