Coverage Report

Created: 2026-10-29 16:12

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
769k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
96
42.4k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
96
8.22k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
96
370k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
96
123k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
96
10.3k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
96
69.3k
    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
5.64k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
96
6.69k
    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
347
    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.1k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE4initEv
Line
Count
Source
96
335
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
96
437
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
96
7.66k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
96
333
    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
16.9k
    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
666
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
96
665
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE4initEv
Line
Count
Source
96
587
    Status init() override { return reset(); }
97
98
143M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
98
50.6k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
98
13.7k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
98
143M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
98
437k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
98
10.6k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
98
69.6k
    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
5.88k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
98
8.46k
    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
453
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
98
44.6k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
98
44.0k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE12is_page_fullEv
Line
Count
Source
98
332
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
98
567
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
Line
Count
Source
98
7.66k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
98
309
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
98
5.22k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
98
27.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
98
17.9k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Line
Count
Source
98
1.46k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Line
Count
Source
98
626
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
98
649
    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.51M
    Status add(const uint8_t* vals, size_t* count) override {
101
1.51M
        return add_internal<false>(vals, count);
102
1.51M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
100
50.6k
    Status add(const uint8_t* vals, size_t* count) override {
101
50.6k
        return add_internal<false>(vals, count);
102
50.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
100
13.7k
    Status add(const uint8_t* vals, size_t* count) override {
101
13.7k
        return add_internal<false>(vals, count);
102
13.7k
    }
_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
437k
    Status add(const uint8_t* vals, size_t* count) override {
101
437k
        return add_internal<false>(vals, count);
102
437k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
100
10.6k
    Status add(const uint8_t* vals, size_t* count) override {
101
10.6k
        return add_internal<false>(vals, count);
102
10.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
100
69.6k
    Status add(const uint8_t* vals, size_t* count) override {
101
69.6k
        return add_internal<false>(vals, count);
102
69.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
100
5.88k
    Status add(const uint8_t* vals, size_t* count) override {
101
5.88k
        return add_internal<false>(vals, count);
102
5.88k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
100
8.47k
    Status add(const uint8_t* vals, size_t* count) override {
101
8.47k
        return add_internal<false>(vals, count);
102
8.47k
    }
_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
455
    Status add(const uint8_t* vals, size_t* count) override {
101
455
        return add_internal<false>(vals, count);
102
455
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
100
44.6k
    Status add(const uint8_t* vals, size_t* count) override {
101
44.6k
        return add_internal<false>(vals, count);
102
44.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
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_9FieldTypeE41EE3addEPKhPm
Line
Count
Source
100
332
    Status add(const uint8_t* vals, size_t* count) override {
101
332
        return add_internal<false>(vals, count);
102
332
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
100
567
    Status add(const uint8_t* vals, size_t* count) override {
101
567
        return add_internal<false>(vals, count);
102
567
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
Line
Count
Source
100
7.66k
    Status add(const uint8_t* vals, size_t* count) override {
101
7.66k
        return add_internal<false>(vals, count);
102
7.66k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
100
310
    Status add(const uint8_t* vals, size_t* count) override {
101
310
        return add_internal<false>(vals, count);
102
310
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
100
5.22k
    Status add(const uint8_t* vals, size_t* count) override {
101
5.22k
        return add_internal<false>(vals, count);
102
5.22k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
100
27.3k
    Status add(const uint8_t* vals, size_t* count) override {
101
27.3k
        return add_internal<false>(vals, count);
102
27.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
100
17.9k
    Status add(const uint8_t* vals, size_t* count) override {
101
17.9k
        return add_internal<false>(vals, count);
102
17.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Line
Count
Source
100
1.46k
    Status add(const uint8_t* vals, size_t* count) override {
101
1.46k
        return add_internal<false>(vals, count);
102
1.46k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Line
Count
Source
100
626
    Status add(const uint8_t* vals, size_t* count) override {
101
626
        return add_internal<false>(vals, count);
102
626
    }
_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
143M
    Status single_add(const uint8_t* vals, size_t* count) {
105
143M
        return add_internal<true>(vals, count);
106
143M
    }
107
108
    template <bool single>
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
145M
        _count += to_add;
135
145M
        _remain_element_capacity -= to_add;
136
145M
        _raw_data_size += to_add_size;
137
        // return added number through count
138
145M
        *num_written = to_add;
139
145M
        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
145M
        return Status::OK();
160
141M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
50.6k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
50.6k
        DCHECK(!_finished);
111
50.6k
        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
50.6k
        uint32_t to_add = cast_set<UInt32>(
127
50.6k
                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
50.6k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
50.6k
        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
50.6k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
50.6k
        _count += to_add;
135
50.6k
        _remain_element_capacity -= to_add;
136
50.6k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
50.6k
        *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
50.6k
        memcpy(&_data[orig_size], vals, to_add_size);
159
50.6k
        return Status::OK();
160
50.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
13.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
13.7k
        DCHECK(!_finished);
111
13.7k
        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
13.7k
        uint32_t to_add = cast_set<UInt32>(
127
13.7k
                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
13.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
13.7k
        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
13.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
13.7k
        _count += to_add;
135
13.7k
        _remain_element_capacity -= to_add;
136
13.7k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
13.7k
        *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
13.7k
        memcpy(&_data[orig_size], vals, to_add_size);
159
13.7k
        return Status::OK();
160
13.7k
    }
_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
437k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
437k
        DCHECK(!_finished);
111
437k
        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
437k
        uint32_t to_add = cast_set<UInt32>(
127
437k
                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
437k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
437k
        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
437k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
437k
        _count += to_add;
135
437k
        _remain_element_capacity -= to_add;
136
437k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
437k
        *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
437k
        memcpy(&_data[orig_size], vals, to_add_size);
159
437k
        return Status::OK();
160
437k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
10.6k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
10.6k
        DCHECK(!_finished);
111
10.6k
        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.6k
        uint32_t to_add = cast_set<UInt32>(
127
10.6k
                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.6k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
10.6k
        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.6k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
10.6k
        _count += to_add;
135
10.6k
        _remain_element_capacity -= to_add;
136
10.6k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
10.6k
        *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.6k
        memcpy(&_data[orig_size], vals, to_add_size);
159
10.6k
        return Status::OK();
160
10.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
69.6k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
69.6k
        DCHECK(!_finished);
111
69.6k
        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
69.6k
        uint32_t to_add = cast_set<UInt32>(
127
69.6k
                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
69.6k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
69.6k
        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
69.6k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
69.6k
        _count += to_add;
135
69.6k
        _remain_element_capacity -= to_add;
136
69.6k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
69.6k
        *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
69.6k
        memcpy(&_data[orig_size], vals, to_add_size);
159
69.6k
        return Status::OK();
160
69.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
5.88k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
5.88k
        DCHECK(!_finished);
111
5.88k
        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.88k
        uint32_t to_add = cast_set<UInt32>(
127
5.88k
                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.88k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
5.88k
        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.88k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
5.88k
        _count += to_add;
135
5.88k
        _remain_element_capacity -= to_add;
136
5.88k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
5.88k
        *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.88k
        memcpy(&_data[orig_size], vals, to_add_size);
159
5.88k
        return Status::OK();
160
5.88k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
8.47k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
8.47k
        DCHECK(!_finished);
111
8.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
8.47k
        uint32_t to_add = cast_set<UInt32>(
127
8.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
8.47k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
8.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
8.47k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
8.47k
        _count += to_add;
135
8.47k
        _remain_element_capacity -= to_add;
136
8.47k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
8.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
8.47k
        memcpy(&_data[orig_size], vals, to_add_size);
159
8.47k
        return Status::OK();
160
8.47k
    }
_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
455
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
455
        DCHECK(!_finished);
111
455
        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
455
        uint32_t to_add = cast_set<UInt32>(
127
455
                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
455
        int to_add_size = to_add * SIZE_OF_TYPE;
130
455
        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
455
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
455
        _count += to_add;
135
455
        _remain_element_capacity -= to_add;
136
455
        _raw_data_size += to_add_size;
137
        // return added number through count
138
455
        *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
455
        memcpy(&_data[orig_size], vals, to_add_size);
159
455
        return Status::OK();
160
455
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
44.6k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
44.6k
        DCHECK(!_finished);
111
44.6k
        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.6k
        uint32_t to_add = cast_set<UInt32>(
127
44.6k
                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.6k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
44.6k
        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.6k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
44.6k
        _count += to_add;
135
44.6k
        _remain_element_capacity -= to_add;
136
44.6k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
44.6k
        *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.6k
        memcpy(&_data[orig_size], vals, to_add_size);
159
44.6k
        return Status::OK();
160
44.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_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_9FieldTypeE41EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
332
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
332
        DCHECK(!_finished);
111
332
        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
332
        uint32_t to_add = cast_set<UInt32>(
127
332
                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
332
        int to_add_size = to_add * SIZE_OF_TYPE;
130
332
        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
332
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
332
        _count += to_add;
135
332
        _remain_element_capacity -= to_add;
136
332
        _raw_data_size += to_add_size;
137
        // return added number through count
138
332
        *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
332
        memcpy(&_data[orig_size], vals, to_add_size);
159
332
        return Status::OK();
160
332
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
567
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
567
        DCHECK(!_finished);
111
567
        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
567
        uint32_t to_add = cast_set<UInt32>(
127
567
                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
567
        int to_add_size = to_add * SIZE_OF_TYPE;
130
567
        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
567
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
567
        _count += to_add;
135
567
        _remain_element_capacity -= to_add;
136
567
        _raw_data_size += to_add_size;
137
        // return added number through count
138
567
        *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
567
        memcpy(&_data[orig_size], vals, to_add_size);
159
567
        return Status::OK();
160
567
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
7.66k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
7.66k
        DCHECK(!_finished);
111
7.66k
        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.66k
        uint32_t to_add = cast_set<UInt32>(
127
7.66k
                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.66k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
7.66k
        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.66k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
7.66k
        _count += to_add;
135
7.66k
        _remain_element_capacity -= to_add;
136
7.66k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
7.66k
        *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.66k
        memcpy(&_data[orig_size], vals, to_add_size);
159
7.66k
        return Status::OK();
160
7.66k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
310
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
310
        DCHECK(!_finished);
111
310
        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
310
        uint32_t to_add = cast_set<UInt32>(
127
310
                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
310
        int to_add_size = to_add * SIZE_OF_TYPE;
130
310
        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
310
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
310
        _count += to_add;
135
310
        _remain_element_capacity -= to_add;
136
310
        _raw_data_size += to_add_size;
137
        // return added number through count
138
310
        *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
310
        memcpy(&_data[orig_size], vals, to_add_size);
159
310
        return Status::OK();
160
310
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
5.22k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
5.22k
        DCHECK(!_finished);
111
5.22k
        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.22k
        uint32_t to_add = cast_set<UInt32>(
127
5.22k
                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.22k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
5.22k
        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.22k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
5.22k
        _count += to_add;
135
5.22k
        _remain_element_capacity -= to_add;
136
5.22k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
5.22k
        *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.22k
        memcpy(&_data[orig_size], vals, to_add_size);
159
5.22k
        return Status::OK();
160
5.22k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
27.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
27.3k
        DCHECK(!_finished);
111
27.3k
        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
27.3k
        uint32_t to_add = cast_set<UInt32>(
127
27.3k
                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
27.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
27.3k
        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
27.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
27.3k
        _count += to_add;
135
27.3k
        _remain_element_capacity -= to_add;
136
27.3k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
27.3k
        *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
27.3k
        memcpy(&_data[orig_size], vals, to_add_size);
159
27.3k
        return Status::OK();
160
27.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
17.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
17.9k
        DCHECK(!_finished);
111
17.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
17.9k
        uint32_t to_add = cast_set<UInt32>(
127
17.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
17.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
17.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
17.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
17.9k
        _count += to_add;
135
17.9k
        _remain_element_capacity -= to_add;
136
17.9k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
17.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
17.9k
        memcpy(&_data[orig_size], vals, to_add_size);
159
17.9k
        return Status::OK();
160
17.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
1.46k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
1.46k
        DCHECK(!_finished);
111
1.46k
        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.46k
        uint32_t to_add = cast_set<UInt32>(
127
1.46k
                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.46k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
1.46k
        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.46k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
1.46k
        _count += to_add;
135
1.46k
        _remain_element_capacity -= to_add;
136
1.46k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
1.46k
        *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.46k
        memcpy(&_data[orig_size], vals, to_add_size);
159
1.46k
        return Status::OK();
160
1.46k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
626
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
626
        DCHECK(!_finished);
111
626
        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
626
        uint32_t to_add = cast_set<UInt32>(
127
626
                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
626
        int to_add_size = to_add * SIZE_OF_TYPE;
130
626
        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
626
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
626
        _count += to_add;
135
626
        _remain_element_capacity -= to_add;
136
626
        _raw_data_size += to_add_size;
137
        // return added number through count
138
626
        *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
626
        memcpy(&_data[orig_size], vals, to_add_size);
159
626
        return Status::OK();
160
626
    }
_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
649
        _count += to_add;
135
649
        _remain_element_capacity -= to_add;
136
649
        _raw_data_size += to_add_size;
137
        // return added number through count
138
649
        *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
649
        memcpy(&_data[orig_size], vals, to_add_size);
159
649
        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
140M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
140M
        DCHECK(!_finished);
111
140M
        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
140M
        uint32_t to_add = cast_set<UInt32>(
127
140M
                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
140M
        int to_add_size = to_add * SIZE_OF_TYPE;
130
140M
        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
140M
        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
140M
    }
161
162
760k
    Status finish(OwnedSlice* slice) override {
163
760k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
760k
        return Status::OK();
165
760k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
41.3k
    Status finish(OwnedSlice* slice) override {
163
41.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
41.3k
        return Status::OK();
165
41.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
7.77k
    Status finish(OwnedSlice* slice) override {
163
7.77k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
7.77k
        return Status::OK();
165
7.77k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
351k
    Status finish(OwnedSlice* slice) override {
163
351k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
351k
        return Status::OK();
165
351k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
128k
    Status finish(OwnedSlice* slice) override {
163
128k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
128k
        return Status::OK();
165
128k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
10.4k
    Status finish(OwnedSlice* slice) override {
163
10.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
10.4k
        return Status::OK();
165
10.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
69.3k
    Status finish(OwnedSlice* slice) override {
163
69.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
69.3k
        return Status::OK();
165
69.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
5.26k
    Status finish(OwnedSlice* slice) override {
163
5.26k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
5.26k
        return Status::OK();
165
5.26k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
7.94k
    Status finish(OwnedSlice* slice) override {
163
7.94k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
7.94k
        return Status::OK();
165
7.94k
    }
_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
378
    Status finish(OwnedSlice* slice) override {
163
378
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
378
        return Status::OK();
165
378
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
38.0k
    Status finish(OwnedSlice* slice) override {
163
38.0k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
38.0k
        return Status::OK();
165
38.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
43.2k
    Status finish(OwnedSlice* slice) override {
163
43.2k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
43.2k
        return Status::OK();
165
43.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
274
    Status finish(OwnedSlice* slice) override {
163
274
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
274
        return Status::OK();
165
274
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
603
    Status finish(OwnedSlice* slice) override {
163
603
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
604
        return Status::OK();
165
603
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
7.70k
    Status finish(OwnedSlice* slice) override {
163
7.70k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
7.70k
        return Status::OK();
165
7.70k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
259
    Status finish(OwnedSlice* slice) override {
163
259
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
259
        return Status::OK();
165
259
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
9.71k
    Status finish(OwnedSlice* slice) override {
163
9.71k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
9.72k
        return Status::OK();
165
9.71k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
18.7k
    Status finish(OwnedSlice* slice) override {
163
18.7k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
18.7k
        return Status::OK();
165
18.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
17.1k
    Status finish(OwnedSlice* slice) override {
163
17.1k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
17.1k
        return Status::OK();
165
17.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
1.14k
    Status finish(OwnedSlice* slice) override {
163
1.14k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
1.14k
        return Status::OK();
165
1.14k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
580
    Status finish(OwnedSlice* slice) override {
163
580
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
580
        return Status::OK();
165
580
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
587
    Status finish(OwnedSlice* slice) override {
163
587
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
587
        return Status::OK();
165
587
    }
_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.83M
    Status reset() override {
168
1.83M
        RETURN_IF_CATCH_EXCEPTION({
169
1.83M
            size_t block_size = _options.data_page_size;
170
1.83M
            _count = 0;
171
1.83M
            _raw_data_size = 0;
172
1.83M
            _data.clear();
173
1.83M
            _data.reserve(block_size);
174
1.83M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
1.83M
                    << "buffer must be naturally-aligned";
176
1.83M
            _buffer.clear();
177
1.83M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
1.83M
            _finished = false;
179
1.83M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
1.83M
        });
181
1.83M
        return Status::OK();
182
1.83M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
167
83.8k
    Status reset() override {
168
83.8k
        RETURN_IF_CATCH_EXCEPTION({
169
83.8k
            size_t block_size = _options.data_page_size;
170
83.8k
            _count = 0;
171
83.8k
            _raw_data_size = 0;
172
83.8k
            _data.clear();
173
83.8k
            _data.reserve(block_size);
174
83.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
83.8k
                    << "buffer must be naturally-aligned";
176
83.8k
            _buffer.clear();
177
83.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
83.8k
            _finished = false;
179
83.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
83.8k
        });
181
83.8k
        return Status::OK();
182
83.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
167
15.9k
    Status reset() override {
168
15.9k
        RETURN_IF_CATCH_EXCEPTION({
169
15.9k
            size_t block_size = _options.data_page_size;
170
15.9k
            _count = 0;
171
15.9k
            _raw_data_size = 0;
172
15.9k
            _data.clear();
173
15.9k
            _data.reserve(block_size);
174
15.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
15.9k
                    << "buffer must be naturally-aligned";
176
15.9k
            _buffer.clear();
177
15.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
15.9k
            _finished = false;
179
15.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
15.9k
        });
181
16.0k
        return Status::OK();
182
15.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
167
1.02M
    Status reset() override {
168
1.02M
        RETURN_IF_CATCH_EXCEPTION({
169
1.02M
            size_t block_size = _options.data_page_size;
170
1.02M
            _count = 0;
171
1.02M
            _raw_data_size = 0;
172
1.02M
            _data.clear();
173
1.02M
            _data.reserve(block_size);
174
1.02M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
1.02M
                    << "buffer must be naturally-aligned";
176
1.02M
            _buffer.clear();
177
1.02M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
1.02M
            _finished = false;
179
1.02M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
1.02M
        });
181
1.02M
        return Status::OK();
182
1.02M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
167
251k
    Status reset() override {
168
251k
        RETURN_IF_CATCH_EXCEPTION({
169
251k
            size_t block_size = _options.data_page_size;
170
251k
            _count = 0;
171
251k
            _raw_data_size = 0;
172
251k
            _data.clear();
173
251k
            _data.reserve(block_size);
174
251k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
251k
                    << "buffer must be naturally-aligned";
176
251k
            _buffer.clear();
177
251k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
251k
            _finished = false;
179
251k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
251k
        });
181
251k
        return Status::OK();
182
251k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
167
20.8k
    Status reset() override {
168
20.8k
        RETURN_IF_CATCH_EXCEPTION({
169
20.8k
            size_t block_size = _options.data_page_size;
170
20.8k
            _count = 0;
171
20.8k
            _raw_data_size = 0;
172
20.8k
            _data.clear();
173
20.8k
            _data.reserve(block_size);
174
20.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
20.8k
                    << "buffer must be naturally-aligned";
176
20.8k
            _buffer.clear();
177
20.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
20.8k
            _finished = false;
179
20.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
20.8k
        });
181
20.8k
        return Status::OK();
182
20.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
167
138k
    Status reset() override {
168
138k
        RETURN_IF_CATCH_EXCEPTION({
169
138k
            size_t block_size = _options.data_page_size;
170
138k
            _count = 0;
171
138k
            _raw_data_size = 0;
172
138k
            _data.clear();
173
138k
            _data.reserve(block_size);
174
138k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
138k
                    << "buffer must be naturally-aligned";
176
138k
            _buffer.clear();
177
138k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
138k
            _finished = false;
179
138k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
138k
        });
181
138k
        return Status::OK();
182
138k
    }
_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
10.9k
    Status reset() override {
168
10.9k
        RETURN_IF_CATCH_EXCEPTION({
169
10.9k
            size_t block_size = _options.data_page_size;
170
10.9k
            _count = 0;
171
10.9k
            _raw_data_size = 0;
172
10.9k
            _data.clear();
173
10.9k
            _data.reserve(block_size);
174
10.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
10.9k
                    << "buffer must be naturally-aligned";
176
10.9k
            _buffer.clear();
177
10.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
10.9k
            _finished = false;
179
10.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
10.9k
        });
181
10.9k
        return Status::OK();
182
10.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
167
14.6k
    Status reset() override {
168
14.6k
        RETURN_IF_CATCH_EXCEPTION({
169
14.6k
            size_t block_size = _options.data_page_size;
170
14.6k
            _count = 0;
171
14.6k
            _raw_data_size = 0;
172
14.6k
            _data.clear();
173
14.6k
            _data.reserve(block_size);
174
14.6k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
14.6k
                    << "buffer must be naturally-aligned";
176
14.6k
            _buffer.clear();
177
14.6k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
14.6k
            _finished = false;
179
14.6k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
14.6k
        });
181
14.6k
        return Status::OK();
182
14.6k
    }
_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
723
    Status reset() override {
168
723
        RETURN_IF_CATCH_EXCEPTION({
169
723
            size_t block_size = _options.data_page_size;
170
723
            _count = 0;
171
723
            _raw_data_size = 0;
172
723
            _data.clear();
173
723
            _data.reserve(block_size);
174
723
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
723
                    << "buffer must be naturally-aligned";
176
723
            _buffer.clear();
177
723
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
723
            _finished = false;
179
723
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
723
        });
181
723
        return Status::OK();
182
723
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
167
75.5k
    Status reset() override {
168
75.5k
        RETURN_IF_CATCH_EXCEPTION({
169
75.5k
            size_t block_size = _options.data_page_size;
170
75.5k
            _count = 0;
171
75.5k
            _raw_data_size = 0;
172
75.5k
            _data.clear();
173
75.5k
            _data.reserve(block_size);
174
75.5k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
75.5k
                    << "buffer must be naturally-aligned";
176
75.5k
            _buffer.clear();
177
75.5k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
75.5k
            _finished = false;
179
75.5k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
75.5k
        });
181
75.6k
        return Status::OK();
182
75.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
167
87.3k
    Status reset() override {
168
87.3k
        RETURN_IF_CATCH_EXCEPTION({
169
87.3k
            size_t block_size = _options.data_page_size;
170
87.3k
            _count = 0;
171
87.3k
            _raw_data_size = 0;
172
87.3k
            _data.clear();
173
87.3k
            _data.reserve(block_size);
174
87.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
87.3k
                    << "buffer must be naturally-aligned";
176
87.3k
            _buffer.clear();
177
87.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
87.3k
            _finished = false;
179
87.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
87.3k
        });
181
87.4k
        return Status::OK();
182
87.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE5resetEv
Line
Count
Source
167
608
    Status reset() override {
168
608
        RETURN_IF_CATCH_EXCEPTION({
169
608
            size_t block_size = _options.data_page_size;
170
608
            _count = 0;
171
608
            _raw_data_size = 0;
172
608
            _data.clear();
173
608
            _data.reserve(block_size);
174
608
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
608
                    << "buffer must be naturally-aligned";
176
608
            _buffer.clear();
177
608
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
608
            _finished = false;
179
608
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
608
        });
181
609
        return Status::OK();
182
608
    }
_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
591
    Status reset() override {
168
591
        RETURN_IF_CATCH_EXCEPTION({
169
591
            size_t block_size = _options.data_page_size;
170
591
            _count = 0;
171
591
            _raw_data_size = 0;
172
591
            _data.clear();
173
591
            _data.reserve(block_size);
174
591
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
591
                    << "buffer must be naturally-aligned";
176
591
            _buffer.clear();
177
591
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
591
            _finished = false;
179
591
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
591
        });
181
591
        return Status::OK();
182
591
    }
_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.8k
    Status reset() override {
168
30.8k
        RETURN_IF_CATCH_EXCEPTION({
169
30.8k
            size_t block_size = _options.data_page_size;
170
30.8k
            _count = 0;
171
30.8k
            _raw_data_size = 0;
172
30.8k
            _data.clear();
173
30.8k
            _data.reserve(block_size);
174
30.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
30.8k
                    << "buffer must be naturally-aligned";
176
30.8k
            _buffer.clear();
177
30.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
30.8k
            _finished = false;
179
30.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
30.8k
        });
181
30.9k
        return Status::OK();
182
30.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
167
34.0k
    Status reset() override {
168
34.0k
        RETURN_IF_CATCH_EXCEPTION({
169
34.0k
            size_t block_size = _options.data_page_size;
170
34.0k
            _count = 0;
171
34.0k
            _raw_data_size = 0;
172
34.0k
            _data.clear();
173
34.0k
            _data.reserve(block_size);
174
34.0k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
34.0k
                    << "buffer must be naturally-aligned";
176
34.0k
            _buffer.clear();
177
34.0k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
34.0k
            _finished = false;
179
34.0k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
34.0k
        });
181
34.1k
        return Status::OK();
182
34.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Line
Count
Source
167
2.35k
    Status reset() override {
168
2.35k
        RETURN_IF_CATCH_EXCEPTION({
169
2.35k
            size_t block_size = _options.data_page_size;
170
2.35k
            _count = 0;
171
2.35k
            _raw_data_size = 0;
172
2.35k
            _data.clear();
173
2.35k
            _data.reserve(block_size);
174
2.35k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
2.35k
                    << "buffer must be naturally-aligned";
176
2.35k
            _buffer.clear();
177
2.35k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
2.35k
            _finished = false;
179
2.35k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
2.35k
        });
181
2.35k
        return Status::OK();
182
2.35k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Line
Count
Source
167
1.24k
    Status reset() override {
168
1.24k
        RETURN_IF_CATCH_EXCEPTION({
169
1.24k
            size_t block_size = _options.data_page_size;
170
1.24k
            _count = 0;
171
1.24k
            _raw_data_size = 0;
172
1.24k
            _data.clear();
173
1.24k
            _data.reserve(block_size);
174
1.24k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
1.24k
                    << "buffer must be naturally-aligned";
176
1.24k
            _buffer.clear();
177
1.24k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
1.24k
            _finished = false;
179
1.24k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
1.24k
        });
181
1.24k
        return Status::OK();
182
1.24k
    }
_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.25k
        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
37.9k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
186
3.78k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
186
810
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
186
20.4k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
186
3.29k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
186
1.28k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
186
881
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
186
377
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
186
485
    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.61k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
186
2.29k
    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
223
    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.21k
    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
474k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
188
41.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
188
7.77k
    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
128k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
188
10.4k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
188
69.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
188
5.25k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
188
7.31k
    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
367
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
188
38.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
188
43.2k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE17get_raw_data_sizeEv
Line
Count
Source
188
274
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
188
598
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
Line
Count
Source
188
7.70k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
188
254
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
188
9.71k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
188
18.7k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
188
17.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE17get_raw_data_sizeEv
Line
Count
Source
188
1.14k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Line
Count
Source
188
580
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
188
587
    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
766k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
42.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
8.22k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
368k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
123k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
10.3k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
69.2k
            : _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
5.63k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
6.69k
            : _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
347
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
37.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
44.1k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
335
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
437
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
7.59k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
333
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
9.72k
            : _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
16.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
1.20k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
665
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
665
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
587
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
193
194
760k
    OwnedSlice _finish(int final_size_of_type) {
195
760k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
760k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
760k
        int padding_elems = num_elems_after_padding - _count;
200
760k
        int padding_bytes = padding_elems * final_size_of_type;
201
23.0M
        for (int i = 0; i < padding_bytes; i++) {
202
22.2M
            _data.push_back(0);
203
22.2M
        }
204
205
        // reserve enough place for compression
206
760k
        _buffer.resize(
207
760k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
760k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
760k
        int64_t bytes =
211
760k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
760k
                                         num_elems_after_padding, final_size_of_type, 0);
213
760k
        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
760k
        encode_fixed32_le(&_buffer[0], _count);
223
760k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
760k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
760k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
760k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
760k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
760k
        return _buffer.build();
230
760k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
194
41.3k
    OwnedSlice _finish(int final_size_of_type) {
195
41.3k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
41.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
41.3k
        int padding_elems = num_elems_after_padding - _count;
200
41.3k
        int padding_bytes = padding_elems * final_size_of_type;
201
258k
        for (int i = 0; i < padding_bytes; i++) {
202
217k
            _data.push_back(0);
203
217k
        }
204
205
        // reserve enough place for compression
206
41.3k
        _buffer.resize(
207
41.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
41.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
41.3k
        int64_t bytes =
211
41.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
41.3k
                                         num_elems_after_padding, final_size_of_type, 0);
213
41.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
41.3k
        encode_fixed32_le(&_buffer[0], _count);
223
41.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
41.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
41.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
41.3k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
41.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
41.3k
        return _buffer.build();
230
41.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
194
7.77k
    OwnedSlice _finish(int final_size_of_type) {
195
7.77k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
7.77k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
7.77k
        int padding_elems = num_elems_after_padding - _count;
200
7.77k
        int padding_bytes = padding_elems * final_size_of_type;
201
79.4k
        for (int i = 0; i < padding_bytes; i++) {
202
71.6k
            _data.push_back(0);
203
71.6k
        }
204
205
        // reserve enough place for compression
206
7.77k
        _buffer.resize(
207
7.77k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
7.77k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
7.77k
        int64_t bytes =
211
7.77k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
7.77k
                                         num_elems_after_padding, final_size_of_type, 0);
213
7.77k
        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.77k
        encode_fixed32_le(&_buffer[0], _count);
223
7.77k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
7.77k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
7.77k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
7.77k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
7.77k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
7.77k
        return _buffer.build();
230
7.77k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
194
350k
    OwnedSlice _finish(int final_size_of_type) {
195
350k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
350k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
350k
        int padding_elems = num_elems_after_padding - _count;
200
350k
        int padding_bytes = padding_elems * final_size_of_type;
201
6.80M
        for (int i = 0; i < padding_bytes; i++) {
202
6.45M
            _data.push_back(0);
203
6.45M
        }
204
205
        // reserve enough place for compression
206
350k
        _buffer.resize(
207
350k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
350k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
350k
        int64_t bytes =
211
350k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
350k
                                         num_elems_after_padding, final_size_of_type, 0);
213
350k
        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
350k
        encode_fixed32_le(&_buffer[0], _count);
223
350k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
350k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
350k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
350k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
350k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
350k
        return _buffer.build();
230
350k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
194
128k
    OwnedSlice _finish(int final_size_of_type) {
195
128k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
128k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
128k
        int padding_elems = num_elems_after_padding - _count;
200
128k
        int padding_bytes = padding_elems * final_size_of_type;
201
6.33M
        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
128k
        _buffer.resize(
207
128k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
128k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
128k
        int64_t bytes =
211
128k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
128k
                                         num_elems_after_padding, final_size_of_type, 0);
213
128k
        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
128k
        encode_fixed32_le(&_buffer[0], _count);
223
128k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
128k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
128k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
128k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
128k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
128k
        return _buffer.build();
230
128k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
194
10.4k
    OwnedSlice _finish(int final_size_of_type) {
195
10.4k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
10.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
10.4k
        int padding_elems = num_elems_after_padding - _count;
200
10.4k
        int padding_bytes = padding_elems * final_size_of_type;
201
705k
        for (int i = 0; i < padding_bytes; i++) {
202
694k
            _data.push_back(0);
203
694k
        }
204
205
        // reserve enough place for compression
206
10.4k
        _buffer.resize(
207
10.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
10.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
10.4k
        int64_t bytes =
211
10.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
10.4k
                                         num_elems_after_padding, final_size_of_type, 0);
213
10.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
10.4k
        encode_fixed32_le(&_buffer[0], _count);
223
10.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
10.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
10.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
10.4k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
10.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
10.4k
        return _buffer.build();
230
10.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
194
69.3k
    OwnedSlice _finish(int final_size_of_type) {
195
69.3k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
69.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
69.3k
        int padding_elems = num_elems_after_padding - _count;
200
69.3k
        int padding_bytes = padding_elems * final_size_of_type;
201
3.36M
        for (int i = 0; i < padding_bytes; i++) {
202
3.29M
            _data.push_back(0);
203
3.29M
        }
204
205
        // reserve enough place for compression
206
69.3k
        _buffer.resize(
207
69.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
69.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
69.3k
        int64_t bytes =
211
69.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
69.3k
                                         num_elems_after_padding, final_size_of_type, 0);
213
69.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
69.3k
        encode_fixed32_le(&_buffer[0], _count);
223
69.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
69.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
69.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
69.3k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
69.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
69.3k
        return _buffer.build();
230
69.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
194
5.26k
    OwnedSlice _finish(int final_size_of_type) {
195
5.26k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
5.26k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
5.26k
        int padding_elems = num_elems_after_padding - _count;
200
5.26k
        int padding_bytes = padding_elems * final_size_of_type;
201
111k
        for (int i = 0; i < padding_bytes; i++) {
202
105k
            _data.push_back(0);
203
105k
        }
204
205
        // reserve enough place for compression
206
5.26k
        _buffer.resize(
207
5.26k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
5.26k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
5.26k
        int64_t bytes =
211
5.26k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
5.26k
                                         num_elems_after_padding, final_size_of_type, 0);
213
5.26k
        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
5.26k
        encode_fixed32_le(&_buffer[0], _count);
223
5.26k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
5.26k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
5.26k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
5.26k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
5.26k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
5.26k
        return _buffer.build();
230
5.26k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
194
7.94k
    OwnedSlice _finish(int final_size_of_type) {
195
7.94k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
7.94k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
7.94k
        int padding_elems = num_elems_after_padding - _count;
200
7.94k
        int padding_bytes = padding_elems * final_size_of_type;
201
266k
        for (int i = 0; i < padding_bytes; i++) {
202
258k
            _data.push_back(0);
203
258k
        }
204
205
        // reserve enough place for compression
206
7.94k
        _buffer.resize(
207
7.94k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
7.94k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
7.94k
        int64_t bytes =
211
7.94k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
7.94k
                                         num_elems_after_padding, final_size_of_type, 0);
213
7.94k
        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.94k
        encode_fixed32_le(&_buffer[0], _count);
223
7.94k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
7.94k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
7.94k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
7.94k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
7.94k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
7.94k
        return _buffer.build();
230
7.94k
    }
_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
378
    OwnedSlice _finish(int final_size_of_type) {
195
378
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
378
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
378
        int padding_elems = num_elems_after_padding - _count;
200
378
        int padding_bytes = padding_elems * final_size_of_type;
201
5.58k
        for (int i = 0; i < padding_bytes; i++) {
202
5.20k
            _data.push_back(0);
203
5.20k
        }
204
205
        // reserve enough place for compression
206
378
        _buffer.resize(
207
378
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
378
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
378
        int64_t bytes =
211
378
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
378
                                         num_elems_after_padding, final_size_of_type, 0);
213
378
        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
378
        encode_fixed32_le(&_buffer[0], _count);
223
378
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
378
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
378
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
378
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
378
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
378
        return _buffer.build();
230
378
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
194
38.0k
    OwnedSlice _finish(int final_size_of_type) {
195
38.0k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
38.0k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
38.0k
        int padding_elems = num_elems_after_padding - _count;
200
38.0k
        int padding_bytes = padding_elems * final_size_of_type;
201
809k
        for (int i = 0; i < padding_bytes; i++) {
202
771k
            _data.push_back(0);
203
771k
        }
204
205
        // reserve enough place for compression
206
38.0k
        _buffer.resize(
207
38.0k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
38.0k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
38.0k
        int64_t bytes =
211
38.0k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
38.0k
                                         num_elems_after_padding, final_size_of_type, 0);
213
38.0k
        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
38.0k
        encode_fixed32_le(&_buffer[0], _count);
223
38.0k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
38.0k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
38.0k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
38.0k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
38.0k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
38.0k
        return _buffer.build();
230
38.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
194
43.2k
    OwnedSlice _finish(int final_size_of_type) {
195
43.2k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
43.2k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
43.2k
        int padding_elems = num_elems_after_padding - _count;
200
43.2k
        int padding_bytes = padding_elems * final_size_of_type;
201
1.83M
        for (int i = 0; i < padding_bytes; i++) {
202
1.78M
            _data.push_back(0);
203
1.78M
        }
204
205
        // reserve enough place for compression
206
43.2k
        _buffer.resize(
207
43.2k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
43.2k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
43.2k
        int64_t bytes =
211
43.2k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
43.2k
                                         num_elems_after_padding, final_size_of_type, 0);
213
43.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
43.2k
        encode_fixed32_le(&_buffer[0], _count);
223
43.2k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
43.2k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
43.2k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
43.2k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
43.2k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
43.2k
        return _buffer.build();
230
43.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE7_finishEi
Line
Count
Source
194
274
    OwnedSlice _finish(int final_size_of_type) {
195
274
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
274
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
274
        int padding_elems = num_elems_after_padding - _count;
200
274
        int padding_bytes = padding_elems * final_size_of_type;
201
11.5k
        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
274
        _buffer.resize(
207
274
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
274
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
274
        int64_t bytes =
211
274
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
274
                                         num_elems_after_padding, final_size_of_type, 0);
213
274
        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
274
        encode_fixed32_le(&_buffer[0], _count);
223
274
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
274
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
274
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
274
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
274
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
274
        return _buffer.build();
230
274
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
194
603
    OwnedSlice _finish(int final_size_of_type) {
195
603
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
603
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
603
        int padding_elems = num_elems_after_padding - _count;
200
603
        int padding_bytes = padding_elems * final_size_of_type;
201
13.4k
        for (int i = 0; i < padding_bytes; i++) {
202
12.8k
            _data.push_back(0);
203
12.8k
        }
204
205
        // reserve enough place for compression
206
603
        _buffer.resize(
207
603
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
603
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
603
        int64_t bytes =
211
603
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
603
                                         num_elems_after_padding, final_size_of_type, 0);
213
603
        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
603
        encode_fixed32_le(&_buffer[0], _count);
223
603
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
603
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
603
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
603
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
603
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
603
        return _buffer.build();
230
603
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
Line
Count
Source
194
7.70k
    OwnedSlice _finish(int final_size_of_type) {
195
7.70k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
7.70k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
7.70k
        int padding_elems = num_elems_after_padding - _count;
200
7.70k
        int padding_bytes = padding_elems * final_size_of_type;
201
401k
        for (int i = 0; i < padding_bytes; i++) {
202
393k
            _data.push_back(0);
203
393k
        }
204
205
        // reserve enough place for compression
206
7.70k
        _buffer.resize(
207
7.70k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
7.70k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
7.70k
        int64_t bytes =
211
7.70k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
7.70k
                                         num_elems_after_padding, final_size_of_type, 0);
213
7.70k
        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.70k
        encode_fixed32_le(&_buffer[0], _count);
223
7.70k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
7.70k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
7.70k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
7.70k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
7.70k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
7.70k
        return _buffer.build();
230
7.70k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
194
259
    OwnedSlice _finish(int final_size_of_type) {
195
259
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
259
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
259
        int padding_elems = num_elems_after_padding - _count;
200
259
        int padding_bytes = padding_elems * final_size_of_type;
201
16.1k
        for (int i = 0; i < padding_bytes; i++) {
202
15.9k
            _data.push_back(0);
203
15.9k
        }
204
205
        // reserve enough place for compression
206
259
        _buffer.resize(
207
259
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
259
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
259
        int64_t bytes =
211
259
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
259
                                         num_elems_after_padding, final_size_of_type, 0);
213
259
        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
259
        encode_fixed32_le(&_buffer[0], _count);
223
259
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
259
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
259
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
259
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
259
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
259
        return _buffer.build();
230
259
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
194
9.71k
    OwnedSlice _finish(int final_size_of_type) {
195
9.71k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
9.71k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
9.71k
        int padding_elems = num_elems_after_padding - _count;
200
9.71k
        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.71k
        _buffer.resize(
207
9.71k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
9.71k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
9.71k
        int64_t bytes =
211
9.71k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
9.71k
                                         num_elems_after_padding, final_size_of_type, 0);
213
9.71k
        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.71k
        encode_fixed32_le(&_buffer[0], _count);
223
9.71k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
9.71k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
9.71k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
9.71k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
9.71k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
9.71k
        return _buffer.build();
230
9.71k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
194
18.7k
    OwnedSlice _finish(int final_size_of_type) {
195
18.7k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
18.7k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
18.7k
        int padding_elems = num_elems_after_padding - _count;
200
18.7k
        int padding_bytes = padding_elems * final_size_of_type;
201
490k
        for (int i = 0; i < padding_bytes; i++) {
202
471k
            _data.push_back(0);
203
471k
        }
204
205
        // reserve enough place for compression
206
18.7k
        _buffer.resize(
207
18.7k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
18.7k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
18.7k
        int64_t bytes =
211
18.7k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
18.7k
                                         num_elems_after_padding, final_size_of_type, 0);
213
18.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
18.7k
        encode_fixed32_le(&_buffer[0], _count);
223
18.7k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
18.7k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
18.7k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
18.7k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
18.7k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
18.7k
        return _buffer.build();
230
18.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
194
17.1k
    OwnedSlice _finish(int final_size_of_type) {
195
17.1k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
17.1k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
17.1k
        int padding_elems = num_elems_after_padding - _count;
200
17.1k
        int padding_bytes = padding_elems * final_size_of_type;
201
1.14M
        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.1k
        _buffer.resize(
207
17.1k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
17.1k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
17.1k
        int64_t bytes =
211
17.1k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
17.1k
                                         num_elems_after_padding, final_size_of_type, 0);
213
17.1k
        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.1k
        encode_fixed32_le(&_buffer[0], _count);
223
17.1k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
17.1k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
17.1k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
17.1k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
17.1k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
17.1k
        return _buffer.build();
230
17.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE7_finishEi
Line
Count
Source
194
1.14k
    OwnedSlice _finish(int final_size_of_type) {
195
1.14k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
1.14k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
1.14k
        int padding_elems = num_elems_after_padding - _count;
200
1.14k
        int padding_bytes = padding_elems * final_size_of_type;
201
174k
        for (int i = 0; i < padding_bytes; i++) {
202
172k
            _data.push_back(0);
203
172k
        }
204
205
        // reserve enough place for compression
206
1.14k
        _buffer.resize(
207
1.14k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
1.14k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
1.14k
        int64_t bytes =
211
1.14k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
1.14k
                                         num_elems_after_padding, final_size_of_type, 0);
213
1.14k
        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.14k
        encode_fixed32_le(&_buffer[0], _count);
223
1.14k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
1.14k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
1.14k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
1.14k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
1.14k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
1.14k
        return _buffer.build();
230
1.14k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Line
Count
Source
194
580
    OwnedSlice _finish(int final_size_of_type) {
195
580
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
580
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
580
        int padding_elems = num_elems_after_padding - _count;
200
580
        int padding_bytes = padding_elems * final_size_of_type;
201
11.7k
        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
580
        _buffer.resize(
207
580
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
580
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
580
        int64_t bytes =
211
580
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
580
                                         num_elems_after_padding, final_size_of_type, 0);
213
580
        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
580
        encode_fixed32_le(&_buffer[0], _count);
223
580
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
580
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
580
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
580
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
580
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
580
        return _buffer.build();
230
580
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
194
587
    OwnedSlice _finish(int final_size_of_type) {
195
587
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
587
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
587
        int padding_elems = num_elems_after_padding - _count;
200
587
        int padding_bytes = padding_elems * final_size_of_type;
201
46.7k
        for (int i = 0; i < padding_bytes; i++) {
202
46.2k
            _data.push_back(0);
203
46.2k
        }
204
205
        // reserve enough place for compression
206
587
        _buffer.resize(
207
587
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
587
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
587
        int64_t bytes =
211
587
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
587
                                         num_elems_after_padding, final_size_of_type, 0);
213
587
        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
587
        encode_fixed32_le(&_buffer[0], _count);
223
587
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
587
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
587
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
587
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
587
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
587
        return _buffer.build();
230
587
    }
_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
2.35M
                                       int& size_of_element) {
254
2.35M
    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
2.35M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
260
2.35M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
261
2.35M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
262
2.35M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
263
2.35M
    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
2.35M
    switch (size_of_element) {
272
213k
    case 1:
273
254k
    case 2:
274
258k
    case 3:
275
1.61M
    case 4:
276
2.23M
    case 8:
277
2.23M
    case 12:
278
2.34M
    case 16:
279
2.35M
    case 32:
280
2.35M
        break;
281
0
    default:
282
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
283
2.35M
    }
284
2.35M
    return Status::OK();
285
2.35M
}
286
287
template <FieldType Type>
288
class BitShufflePageDecoder : public PageDecoder {
289
public:
290
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
291
1.17M
            : _data(data),
292
1.17M
              _options(options),
293
1.17M
              _parsed(false),
294
1.17M
              _num_elements(0),
295
1.17M
              _num_element_after_padding(0),
296
1.17M
              _size_of_element(0),
297
1.17M
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
106k
            : _data(data),
292
106k
              _options(options),
293
106k
              _parsed(false),
294
106k
              _num_elements(0),
295
106k
              _num_element_after_padding(0),
296
106k
              _size_of_element(0),
297
106k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
20.5k
            : _data(data),
292
20.5k
              _options(options),
293
20.5k
              _parsed(false),
294
20.5k
              _num_elements(0),
295
20.5k
              _num_element_after_padding(0),
296
20.5k
              _size_of_element(0),
297
20.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
587k
            : _data(data),
292
587k
              _options(options),
293
587k
              _parsed(false),
294
587k
              _num_elements(0),
295
587k
              _num_element_after_padding(0),
296
587k
              _size_of_element(0),
297
587k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
63.7k
            : _data(data),
292
63.7k
              _options(options),
293
63.7k
              _parsed(false),
294
63.7k
              _num_elements(0),
295
63.7k
              _num_element_after_padding(0),
296
63.7k
              _size_of_element(0),
297
63.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
18.9k
            : _data(data),
292
18.9k
              _options(options),
293
18.9k
              _parsed(false),
294
18.9k
              _num_elements(0),
295
18.9k
              _num_element_after_padding(0),
296
18.9k
              _size_of_element(0),
297
18.9k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
97.3k
            : _data(data),
292
97.3k
              _options(options),
293
97.3k
              _parsed(false),
294
97.3k
              _num_elements(0),
295
97.3k
              _num_element_after_padding(0),
296
97.3k
              _size_of_element(0),
297
97.3k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
13.5k
            : _data(data),
292
13.5k
              _options(options),
293
13.5k
              _parsed(false),
294
13.5k
              _num_elements(0),
295
13.5k
              _num_element_after_padding(0),
296
13.5k
              _size_of_element(0),
297
13.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
18.9k
            : _data(data),
292
18.9k
              _options(options),
293
18.9k
              _parsed(false),
294
18.9k
              _num_elements(0),
295
18.9k
              _num_element_after_padding(0),
296
18.9k
              _size_of_element(0),
297
18.9k
              _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.94k
            : _data(data),
292
1.94k
              _options(options),
293
1.94k
              _parsed(false),
294
1.94k
              _num_elements(0),
295
1.94k
              _num_element_after_padding(0),
296
1.94k
              _size_of_element(0),
297
1.94k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
59.7k
            : _data(data),
292
59.7k
              _options(options),
293
59.7k
              _parsed(false),
294
59.7k
              _num_elements(0),
295
59.7k
              _num_element_after_padding(0),
296
59.7k
              _size_of_element(0),
297
59.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
67.3k
            : _data(data),
292
67.3k
              _options(options),
293
67.3k
              _parsed(false),
294
67.3k
              _num_elements(0),
295
67.3k
              _num_element_after_padding(0),
296
67.3k
              _size_of_element(0),
297
67.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
3.15k
            : _data(data),
292
3.15k
              _options(options),
293
3.15k
              _parsed(false),
294
3.15k
              _num_elements(0),
295
3.15k
              _num_element_after_padding(0),
296
3.15k
              _size_of_element(0),
297
3.15k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
2.60k
            : _data(data),
292
2.60k
              _options(options),
293
2.60k
              _parsed(false),
294
2.60k
              _num_elements(0),
295
2.60k
              _num_element_after_padding(0),
296
2.60k
              _size_of_element(0),
297
2.60k
              _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.36k
            : _data(data),
292
1.36k
              _options(options),
293
1.36k
              _parsed(false),
294
1.36k
              _num_elements(0),
295
1.36k
              _num_element_after_padding(0),
296
1.36k
              _size_of_element(0),
297
1.36k
              _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
40.7k
            : _data(data),
292
40.7k
              _options(options),
293
40.7k
              _parsed(false),
294
40.7k
              _num_elements(0),
295
40.7k
              _num_element_after_padding(0),
296
40.7k
              _size_of_element(0),
297
40.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
30.7k
            : _data(data),
292
30.7k
              _options(options),
293
30.7k
              _parsed(false),
294
30.7k
              _num_elements(0),
295
30.7k
              _num_element_after_padding(0),
296
30.7k
              _size_of_element(0),
297
30.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
1.76k
            : _data(data),
292
1.76k
              _options(options),
293
1.76k
              _parsed(false),
294
1.76k
              _num_elements(0),
295
1.76k
              _num_element_after_padding(0),
296
1.76k
              _size_of_element(0),
297
1.76k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
888
            : _data(data),
292
888
              _options(options),
293
888
              _parsed(false),
294
888
              _num_elements(0),
295
888
              _num_element_after_padding(0),
296
888
              _size_of_element(0),
297
888
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
932
            : _data(data),
292
932
              _options(options),
293
932
              _parsed(false),
294
932
              _num_elements(0),
295
932
              _num_element_after_padding(0),
296
932
              _size_of_element(0),
297
932
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
4.98k
            : _data(data),
292
4.98k
              _options(options),
293
4.98k
              _parsed(false),
294
4.98k
              _num_elements(0),
295
4.98k
              _num_element_after_padding(0),
296
4.98k
              _size_of_element(0),
297
4.98k
              _cur_index(0) {}
298
299
1.17M
    Status init() override {
300
1.17M
        CHECK(!_parsed);
301
1.17M
        size_t unused;
302
1.17M
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
1.17M
                                                 _num_element_after_padding, _size_of_element));
304
305
1.17M
        if (_data.size !=
306
1.17M
            _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.17M
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
1.17M
                     _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.17M
        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.17M
        _parsed = true;
326
1.17M
        return Status::OK();
327
1.17M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
299
106k
    Status init() override {
300
106k
        CHECK(!_parsed);
301
106k
        size_t unused;
302
106k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
106k
                                                 _num_element_after_padding, _size_of_element));
304
305
106k
        if (_data.size !=
306
106k
            _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
106k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
106k
                     _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
106k
        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
106k
        _parsed = true;
326
106k
        return Status::OK();
327
106k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
299
20.5k
    Status init() override {
300
20.5k
        CHECK(!_parsed);
301
20.5k
        size_t unused;
302
20.5k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
20.5k
                                                 _num_element_after_padding, _size_of_element));
304
305
20.5k
        if (_data.size !=
306
20.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
20.5k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
20.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
20.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
20.5k
        _parsed = true;
326
20.5k
        return Status::OK();
327
20.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
299
586k
    Status init() override {
300
586k
        CHECK(!_parsed);
301
586k
        size_t unused;
302
586k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
586k
                                                 _num_element_after_padding, _size_of_element));
304
305
586k
        if (_data.size !=
306
586k
            _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
586k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
586k
                     _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
586k
        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
586k
        _parsed = true;
326
586k
        return Status::OK();
327
586k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
299
63.6k
    Status init() override {
300
63.6k
        CHECK(!_parsed);
301
63.6k
        size_t unused;
302
63.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
63.6k
                                                 _num_element_after_padding, _size_of_element));
304
305
63.6k
        if (_data.size !=
306
63.6k
            _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
63.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
63.6k
                     _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
63.6k
        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
63.6k
        _parsed = true;
326
63.6k
        return Status::OK();
327
63.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
299
18.9k
    Status init() override {
300
18.9k
        CHECK(!_parsed);
301
18.9k
        size_t unused;
302
18.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
18.9k
                                                 _num_element_after_padding, _size_of_element));
304
305
18.9k
        if (_data.size !=
306
18.9k
            _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
18.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
18.9k
                     _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
18.9k
        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
18.9k
        _parsed = true;
326
18.9k
        return Status::OK();
327
18.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
299
97.2k
    Status init() override {
300
97.2k
        CHECK(!_parsed);
301
97.2k
        size_t unused;
302
97.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
97.2k
                                                 _num_element_after_padding, _size_of_element));
304
305
97.2k
        if (_data.size !=
306
97.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
97.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
97.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
97.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
97.2k
        _parsed = true;
326
97.2k
        return Status::OK();
327
97.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
299
13.4k
    Status init() override {
300
13.4k
        CHECK(!_parsed);
301
13.4k
        size_t unused;
302
13.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
13.4k
                                                 _num_element_after_padding, _size_of_element));
304
305
13.4k
        if (_data.size !=
306
13.4k
            _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
13.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
13.4k
                     _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.4k
        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.4k
        _parsed = true;
326
13.4k
        return Status::OK();
327
13.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
299
18.9k
    Status init() override {
300
18.9k
        CHECK(!_parsed);
301
18.9k
        size_t unused;
302
18.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
18.9k
                                                 _num_element_after_padding, _size_of_element));
304
305
18.9k
        if (_data.size !=
306
18.9k
            _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
18.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
18.9k
                     _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
18.9k
        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
18.9k
        _parsed = true;
326
18.9k
        return Status::OK();
327
18.9k
    }
_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.94k
    Status init() override {
300
1.94k
        CHECK(!_parsed);
301
1.94k
        size_t unused;
302
1.94k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
1.94k
                                                 _num_element_after_padding, _size_of_element));
304
305
1.94k
        if (_data.size !=
306
1.94k
            _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.94k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
1.94k
                     _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.94k
        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.94k
        _parsed = true;
326
1.94k
        return Status::OK();
327
1.94k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
299
59.7k
    Status init() override {
300
59.7k
        CHECK(!_parsed);
301
59.7k
        size_t unused;
302
59.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
59.7k
                                                 _num_element_after_padding, _size_of_element));
304
305
59.7k
        if (_data.size !=
306
59.7k
            _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.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
59.7k
                     _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.7k
        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.7k
        _parsed = true;
326
59.7k
        return Status::OK();
327
59.7k
    }
_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.14k
    Status init() override {
300
3.14k
        CHECK(!_parsed);
301
3.14k
        size_t unused;
302
3.14k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
3.14k
                                                 _num_element_after_padding, _size_of_element));
304
305
3.14k
        if (_data.size !=
306
3.14k
            _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.14k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
3.14k
                     _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.14k
        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.14k
        _parsed = true;
326
3.14k
        return Status::OK();
327
3.14k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
299
2.60k
    Status init() override {
300
2.60k
        CHECK(!_parsed);
301
2.60k
        size_t unused;
302
2.60k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
2.60k
                                                 _num_element_after_padding, _size_of_element));
304
305
2.60k
        if (_data.size !=
306
2.60k
            _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.60k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
2.60k
                     _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.60k
        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.60k
        _parsed = true;
326
2.60k
        return Status::OK();
327
2.60k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
299
16.3k
    Status init() override {
300
16.3k
        CHECK(!_parsed);
301
16.3k
        size_t unused;
302
16.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
16.3k
                                                 _num_element_after_padding, _size_of_element));
304
305
16.3k
        if (_data.size !=
306
16.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
16.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
16.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
16.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
16.3k
        _parsed = true;
326
16.3k
        return Status::OK();
327
16.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
299
1.36k
    Status init() override {
300
1.36k
        CHECK(!_parsed);
301
1.36k
        size_t unused;
302
1.36k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
1.36k
                                                 _num_element_after_padding, _size_of_element));
304
305
1.36k
        if (_data.size !=
306
1.36k
            _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.36k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
1.36k
                     _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.36k
        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.36k
        _parsed = true;
326
1.36k
        return Status::OK();
327
1.36k
    }
_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
40.7k
    Status init() override {
300
40.7k
        CHECK(!_parsed);
301
40.7k
        size_t unused;
302
40.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
40.7k
                                                 _num_element_after_padding, _size_of_element));
304
305
40.7k
        if (_data.size !=
306
40.7k
            _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
40.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
40.7k
                     _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
40.7k
        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
40.7k
        _parsed = true;
326
40.7k
        return Status::OK();
327
40.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
299
30.7k
    Status init() override {
300
30.7k
        CHECK(!_parsed);
301
30.7k
        size_t unused;
302
30.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
30.7k
                                                 _num_element_after_padding, _size_of_element));
304
305
30.7k
        if (_data.size !=
306
30.7k
            _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
30.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
30.7k
                     _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
30.7k
        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
30.7k
        _parsed = true;
326
30.7k
        return Status::OK();
327
30.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
299
1.76k
    Status init() override {
300
1.76k
        CHECK(!_parsed);
301
1.76k
        size_t unused;
302
1.76k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
1.76k
                                                 _num_element_after_padding, _size_of_element));
304
305
1.76k
        if (_data.size !=
306
1.76k
            _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.76k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
1.76k
                     _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.76k
        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.76k
        _parsed = true;
326
1.76k
        return Status::OK();
327
1.76k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
299
885
    Status init() override {
300
885
        CHECK(!_parsed);
301
885
        size_t unused;
302
885
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
885
                                                 _num_element_after_padding, _size_of_element));
304
305
885
        if (_data.size !=
306
885
            _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
885
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
885
                     _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
885
        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
885
        _parsed = true;
326
885
        return Status::OK();
327
885
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
299
930
    Status init() override {
300
930
        CHECK(!_parsed);
301
930
        size_t unused;
302
930
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
930
                                                 _num_element_after_padding, _size_of_element));
304
305
930
        if (_data.size !=
306
930
            _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
930
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
930
                     _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
930
        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
930
        _parsed = true;
326
930
        return Status::OK();
327
930
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE4initEv
Line
Count
Source
299
4.97k
    Status init() override {
300
4.97k
        CHECK(!_parsed);
301
4.97k
        size_t unused;
302
4.97k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
4.97k
                                                 _num_element_after_padding, _size_of_element));
304
305
4.97k
        if (_data.size !=
306
4.97k
            _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
4.97k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
4.97k
                     _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
4.97k
        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
4.97k
        _parsed = true;
326
4.97k
        return Status::OK();
327
4.97k
    }
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
5.27M
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
5.27M
        if (_num_elements == 0) [[unlikely]] {
338
6.04k
            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.04k
        }
343
344
5.27M
        DCHECK_LE(pos, _num_elements);
345
5.27M
        _cur_index = pos;
346
5.27M
        return Status::OK();
347
5.27M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
335
312k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
312k
        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
312k
        DCHECK_LE(pos, _num_elements);
345
312k
        _cur_index = pos;
346
312k
        return Status::OK();
347
312k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
335
229k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
229k
        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
229k
        DCHECK_LE(pos, _num_elements);
345
229k
        _cur_index = pos;
346
229k
        return Status::OK();
347
229k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
335
2.92M
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
2.92M
        if (_num_elements == 0) [[unlikely]] {
338
3.15k
            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.15k
        }
343
344
2.92M
        DCHECK_LE(pos, _num_elements);
345
2.92M
        _cur_index = pos;
346
2.92M
        return Status::OK();
347
2.92M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
335
115k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
115k
        if (_num_elements == 0) [[unlikely]] {
338
943
            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
943
        }
343
344
115k
        DCHECK_LE(pos, _num_elements);
345
115k
        _cur_index = pos;
346
115k
        return Status::OK();
347
115k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
335
110k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
110k
        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
110k
        DCHECK_LE(pos, _num_elements);
345
110k
        _cur_index = pos;
346
110k
        return Status::OK();
347
110k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
335
16.0k
    Status seek_to_position_in_page(size_t pos) override {
336
16.0k
        DCHECK(_parsed) << "Must call init()";
337
16.0k
        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
16.0k
        DCHECK_LE(pos, _num_elements);
345
16.0k
        _cur_index = pos;
346
16.0k
        return Status::OK();
347
16.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
335
232k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
232k
        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
232k
        DCHECK_LE(pos, _num_elements);
345
232k
        _cur_index = pos;
346
232k
        return Status::OK();
347
232k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
335
205k
    Status seek_to_position_in_page(size_t pos) override {
336
205k
        DCHECK(_parsed) << "Must call init()";
337
205k
        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
205k
        DCHECK_LE(pos, _num_elements);
345
205k
        _cur_index = pos;
346
205k
        return Status::OK();
347
205k
    }
_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
218k
    Status seek_to_position_in_page(size_t pos) override {
336
218k
        DCHECK(_parsed) << "Must call init()";
337
218k
        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
218k
        DCHECK_LE(pos, _num_elements);
345
218k
        _cur_index = pos;
346
218k
        return Status::OK();
347
218k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
335
503k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
503k
        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
503k
        DCHECK_LE(pos, _num_elements);
345
503k
        _cur_index = pos;
346
503k
        return Status::OK();
347
503k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
335
48.9k
    Status seek_to_position_in_page(size_t pos) override {
336
48.9k
        DCHECK(_parsed) << "Must call init()";
337
48.9k
        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
48.9k
        DCHECK_LE(pos, _num_elements);
345
48.9k
        _cur_index = pos;
346
48.9k
        return Status::OK();
347
48.9k
    }
_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
204k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
204k
        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
204k
        DCHECK_LE(pos, _num_elements);
345
204k
        _cur_index = pos;
346
204k
        return Status::OK();
347
204k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
335
7.27k
    Status seek_to_position_in_page(size_t pos) override {
336
7.27k
        DCHECK(_parsed) << "Must call init()";
337
7.27k
        if (_num_elements == 0) [[unlikely]] {
338
357
            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
357
        }
343
344
7.27k
        DCHECK_LE(pos, _num_elements);
345
7.27k
        _cur_index = pos;
346
7.27k
        return Status::OK();
347
7.27k
    }
_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
904
    Status seek_to_position_in_page(size_t pos) override {
336
904
        DCHECK(_parsed) << "Must call init()";
337
904
        if (_num_elements == 0) [[unlikely]] {
338
25
            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
25
        }
343
344
904
        DCHECK_LE(pos, _num_elements);
345
904
        _cur_index = pos;
346
904
        return Status::OK();
347
904
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
335
17.1k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
17.1k
        if (_num_elements == 0) [[unlikely]] {
338
741
            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
741
        }
343
344
17.1k
        DCHECK_LE(pos, _num_elements);
345
17.1k
        _cur_index = pos;
346
17.1k
        return Status::OK();
347
17.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Line
Count
Source
335
113k
    Status seek_to_position_in_page(size_t pos) override {
336
113k
        DCHECK(_parsed) << "Must call init()";
337
113k
        if (_num_elements == 0) [[unlikely]] {
338
241
            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
241
        }
343
344
113k
        DCHECK_LE(pos, _num_elements);
345
113k
        _cur_index = pos;
346
113k
        return Status::OK();
347
113k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Line
Count
Source
335
1.98k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
1.98k
        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.98k
        DCHECK_LE(pos, _num_elements);
345
1.98k
        _cur_index = pos;
346
1.98k
        return Status::OK();
347
1.98k
    }
_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
9.30k
    Status seek_to_position_in_page(size_t pos) override {
336
9.30k
        DCHECK(_parsed) << "Must call init()";
337
9.30k
        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
9.30k
        DCHECK_LE(pos, _num_elements);
345
9.30k
        _cur_index = pos;
346
9.30k
        return Status::OK();
347
9.30k
    }
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
70
                left = mid + 1;
369
77
            } else {
370
77
                right = mid;
371
77
            }
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
24
                left = mid + 1;
369
25
            } else {
370
25
                right = mid;
371
25
            }
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
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_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.59M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
2.59M
        DCHECK(_parsed);
390
2.59M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
2.59M
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
2.59M
        StorageLayout<Type>::storage_to_column(
398
2.59M
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
2.59M
        *n = max_fetch;
400
2.59M
        if constexpr (forward_index) {
401
2.53M
            _cur_index += max_fetch;
402
2.53M
        }
403
404
2.59M
        return Status::OK();
405
2.59M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
179k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
179k
        DCHECK(_parsed);
390
180k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
179k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
179k
        StorageLayout<Type>::storage_to_column(
398
179k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
179k
        *n = max_fetch;
400
179k
        if constexpr (forward_index) {
401
179k
            _cur_index += max_fetch;
402
179k
        }
403
404
179k
        return Status::OK();
405
179k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
18.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
18.4k
        DCHECK(_parsed);
390
18.5k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
18.4k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
18.4k
        StorageLayout<Type>::storage_to_column(
398
18.4k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
18.4k
        *n = max_fetch;
400
18.4k
        if constexpr (forward_index) {
401
18.4k
            _cur_index += max_fetch;
402
18.4k
        }
403
404
18.4k
        return Status::OK();
405
18.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
864k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
864k
        DCHECK(_parsed);
390
865k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
864k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
864k
        StorageLayout<Type>::storage_to_column(
398
864k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
864k
        *n = max_fetch;
400
864k
        if constexpr (forward_index) {
401
864k
            _cur_index += max_fetch;
402
864k
        }
403
404
864k
        return Status::OK();
405
864k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
718k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
718k
        DCHECK(_parsed);
390
719k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
718k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
718k
        StorageLayout<Type>::storage_to_column(
398
718k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
718k
        *n = max_fetch;
400
718k
        if constexpr (forward_index) {
401
718k
            _cur_index += max_fetch;
402
718k
        }
403
404
718k
        return Status::OK();
405
718k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
16.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
16.9k
        DCHECK(_parsed);
390
16.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
16.9k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
16.9k
        StorageLayout<Type>::storage_to_column(
398
16.9k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
16.9k
        *n = max_fetch;
400
16.9k
        if constexpr (forward_index) {
401
16.9k
            _cur_index += max_fetch;
402
16.9k
        }
403
404
16.9k
        return Status::OK();
405
16.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
95.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
95.1k
        DCHECK(_parsed);
390
95.1k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
95.1k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
95.1k
        StorageLayout<Type>::storage_to_column(
398
95.1k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
95.1k
        *n = max_fetch;
400
95.1k
        if constexpr (forward_index) {
401
95.1k
            _cur_index += max_fetch;
402
95.1k
        }
403
404
95.1k
        return Status::OK();
405
95.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
53.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
53.2k
        DCHECK(_parsed);
390
53.2k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
53.2k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
53.2k
        StorageLayout<Type>::storage_to_column(
398
53.2k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
53.2k
        *n = max_fetch;
400
        if constexpr (forward_index) {
401
            _cur_index += max_fetch;
402
        }
403
404
53.2k
        return Status::OK();
405
53.2k
    }
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
10.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
10.9k
        DCHECK(_parsed);
390
10.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
10.9k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
10.9k
        StorageLayout<Type>::storage_to_column(
398
10.9k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
10.9k
        *n = max_fetch;
400
10.9k
        if constexpr (forward_index) {
401
10.9k
            _cur_index += max_fetch;
402
10.9k
        }
403
404
10.9k
        return Status::OK();
405
10.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
15.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
15.0k
        DCHECK(_parsed);
390
15.0k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
15.0k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
15.0k
        StorageLayout<Type>::storage_to_column(
398
15.0k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
15.0k
        *n = max_fetch;
400
15.0k
        if constexpr (forward_index) {
401
15.0k
            _cur_index += max_fetch;
402
15.0k
        }
403
404
15.0k
        return Status::OK();
405
15.0k
    }
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
4.23k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
4.23k
        DCHECK(_parsed);
390
4.23k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
4.23k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
4.23k
        StorageLayout<Type>::storage_to_column(
398
4.23k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
4.23k
        *n = max_fetch;
400
4.23k
        if constexpr (forward_index) {
401
4.23k
            _cur_index += max_fetch;
402
4.23k
        }
403
404
4.23k
        return Status::OK();
405
4.23k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
361k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
361k
        DCHECK(_parsed);
390
361k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
361k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
361k
        StorageLayout<Type>::storage_to_column(
398
361k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
361k
        *n = max_fetch;
400
361k
        if constexpr (forward_index) {
401
361k
            _cur_index += max_fetch;
402
361k
        }
403
404
361k
        return Status::OK();
405
361k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
64.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
64.6k
        DCHECK(_parsed);
390
64.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
64.6k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
64.6k
        StorageLayout<Type>::storage_to_column(
398
64.6k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
64.6k
        *n = max_fetch;
400
64.6k
        if constexpr (forward_index) {
401
64.6k
            _cur_index += max_fetch;
402
64.6k
        }
403
404
64.6k
        return Status::OK();
405
64.6k
    }
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.26k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
2.26k
        DCHECK(_parsed);
390
2.26k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
2.26k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
2.26k
        StorageLayout<Type>::storage_to_column(
398
2.26k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
2.26k
        *n = max_fetch;
400
2.26k
        if constexpr (forward_index) {
401
2.26k
            _cur_index += max_fetch;
402
2.26k
        }
403
404
2.26k
        return Status::OK();
405
2.26k
    }
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.55k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
1.55k
        DCHECK(_parsed);
390
1.55k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
1.55k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
1.55k
        StorageLayout<Type>::storage_to_column(
398
1.55k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
1.55k
        *n = max_fetch;
400
1.55k
        if constexpr (forward_index) {
401
1.55k
            _cur_index += max_fetch;
402
1.55k
        }
403
404
1.55k
        return Status::OK();
405
1.55k
    }
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.25k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
1.25k
        DCHECK(_parsed);
390
1.25k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
1.25k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
1.25k
        StorageLayout<Type>::storage_to_column(
398
1.25k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
1.25k
        *n = max_fetch;
400
1.25k
        if constexpr (forward_index) {
401
1.25k
            _cur_index += max_fetch;
402
1.25k
        }
403
404
1.25k
        return Status::OK();
405
1.25k
    }
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.08k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
8.08k
        DCHECK(_parsed);
390
8.09k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
8.08k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
8.08k
        StorageLayout<Type>::storage_to_column(
398
8.08k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
8.08k
        *n = max_fetch;
400
8.08k
        if constexpr (forward_index) {
401
8.08k
            _cur_index += max_fetch;
402
8.08k
        }
403
404
8.08k
        return Status::OK();
405
8.08k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
47.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
47.6k
        DCHECK(_parsed);
390
47.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
47.6k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
47.6k
        StorageLayout<Type>::storage_to_column(
398
47.6k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
47.6k
        *n = max_fetch;
400
47.6k
        if constexpr (forward_index) {
401
47.6k
            _cur_index += max_fetch;
402
47.6k
        }
403
404
47.6k
        return Status::OK();
405
47.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
21.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
21.0k
        DCHECK(_parsed);
390
21.0k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
21.0k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
21.0k
        StorageLayout<Type>::storage_to_column(
398
21.0k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
21.0k
        *n = max_fetch;
400
21.0k
        if constexpr (forward_index) {
401
21.0k
            _cur_index += max_fetch;
402
21.0k
        }
403
404
21.0k
        return Status::OK();
405
21.0k
    }
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
628
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
628
        DCHECK(_parsed);
390
628
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
628
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
628
        StorageLayout<Type>::storage_to_column(
398
628
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
628
        *n = max_fetch;
400
628
        if constexpr (forward_index) {
401
628
            _cur_index += max_fetch;
402
628
        }
403
404
628
        return Status::OK();
405
628
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
651
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
651
        DCHECK(_parsed);
390
651
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
651
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
651
        StorageLayout<Type>::storage_to_column(
398
651
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
651
        *n = max_fetch;
400
651
        if constexpr (forward_index) {
401
651
            _cur_index += max_fetch;
402
651
        }
403
404
651
        return Status::OK();
405
651
    }
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.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
94.4k
        DCHECK(_parsed);
390
94.4k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
94.4k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
94.4k
        StorageLayout<Type>::storage_to_column(
398
94.4k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
94.4k
        *n = max_fetch;
400
94.4k
        if constexpr (forward_index) {
401
94.4k
            _cur_index += max_fetch;
402
94.4k
        }
403
404
94.4k
        return Status::OK();
405
94.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
406
407
2.54M
    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
180k
    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
18.5k
    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
864k
    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
720k
    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
16.9k
    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
95.2k
    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
10.9k
    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
15.0k
    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
4.24k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
407
361k
    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
64.6k
    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.26k
    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.55k
    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.26k
    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.09k
    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
47.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
21.0k
    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
629
    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
651
    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.5k
    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
413k
                          MutableColumnPtr& dst) override {
411
413k
        DCHECK(_parsed);
412
413k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
413k
        auto total = *n;
418
413k
        auto read_count = 0;
419
413k
        _buffer.resize(total);
420
132M
        for (size_t i = 0; i < total; ++i) {
421
131M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
131M
            if (UNLIKELY(ord >= _num_elements)) {
423
14.5k
                break;
424
14.5k
            }
425
426
131M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
131M
        }
428
429
414k
        if (LIKELY(read_count > 0)) {
430
414k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
414k
                                                   read_count, *dst);
432
414k
        }
433
434
413k
        *n = read_count;
435
413k
        return Status::OK();
436
413k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
42.0k
                          MutableColumnPtr& dst) override {
411
42.0k
        DCHECK(_parsed);
412
42.0k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
42.0k
        auto total = *n;
418
42.0k
        auto read_count = 0;
419
42.0k
        _buffer.resize(total);
420
2.16M
        for (size_t i = 0; i < total; ++i) {
421
2.11M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
2.11M
            if (UNLIKELY(ord >= _num_elements)) {
423
0
                break;
424
0
            }
425
426
2.11M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
2.11M
        }
428
429
42.1k
        if (LIKELY(read_count > 0)) {
430
42.1k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
42.1k
                                                   read_count, *dst);
432
42.1k
        }
433
434
42.0k
        *n = read_count;
435
42.0k
        return Status::OK();
436
42.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
9.24k
                          MutableColumnPtr& dst) override {
411
9.24k
        DCHECK(_parsed);
412
9.24k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
9.24k
        auto total = *n;
418
9.24k
        auto read_count = 0;
419
9.24k
        _buffer.resize(total);
420
682k
        for (size_t i = 0; i < total; ++i) {
421
673k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
673k
            if (UNLIKELY(ord >= _num_elements)) {
423
13
                break;
424
13
            }
425
426
672k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
672k
        }
428
429
9.24k
        if (LIKELY(read_count > 0)) {
430
9.24k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
9.24k
                                                   read_count, *dst);
432
9.24k
        }
433
434
9.24k
        *n = read_count;
435
9.24k
        return Status::OK();
436
9.24k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
98.6k
                          MutableColumnPtr& dst) override {
411
98.6k
        DCHECK(_parsed);
412
98.6k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
98.6k
        auto total = *n;
418
98.6k
        auto read_count = 0;
419
98.6k
        _buffer.resize(total);
420
43.9M
        for (size_t i = 0; i < total; ++i) {
421
43.8M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
43.8M
            if (UNLIKELY(ord >= _num_elements)) {
423
2.06k
                break;
424
2.06k
            }
425
426
43.8M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
43.8M
        }
428
429
98.7k
        if (LIKELY(read_count > 0)) {
430
98.7k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
98.7k
                                                   read_count, *dst);
432
98.7k
        }
433
434
98.6k
        *n = read_count;
435
98.6k
        return Status::OK();
436
98.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
42.6k
                          MutableColumnPtr& dst) override {
411
42.6k
        DCHECK(_parsed);
412
42.6k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
42.6k
        auto total = *n;
418
42.6k
        auto read_count = 0;
419
42.6k
        _buffer.resize(total);
420
24.1M
        for (size_t i = 0; i < total; ++i) {
421
24.1M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
24.1M
            if (UNLIKELY(ord >= _num_elements)) {
423
1.90k
                break;
424
1.90k
            }
425
426
24.1M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
24.1M
        }
428
429
42.7k
        if (LIKELY(read_count > 0)) {
430
42.7k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
42.7k
                                                   read_count, *dst);
432
42.7k
        }
433
434
42.6k
        *n = read_count;
435
42.6k
        return Status::OK();
436
42.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
8.92k
                          MutableColumnPtr& dst) override {
411
8.92k
        DCHECK(_parsed);
412
8.92k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
8.92k
        auto total = *n;
418
8.92k
        auto read_count = 0;
419
8.92k
        _buffer.resize(total);
420
1.73M
        for (size_t i = 0; i < total; ++i) {
421
1.72M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
1.72M
            if (UNLIKELY(ord >= _num_elements)) {
423
507
                break;
424
507
            }
425
426
1.72M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
1.72M
        }
428
429
8.93k
        if (LIKELY(read_count > 0)) {
430
8.93k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
8.93k
                                                   read_count, *dst);
432
8.93k
        }
433
434
8.92k
        *n = read_count;
435
8.92k
        return Status::OK();
436
8.92k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
70.7k
                          MutableColumnPtr& dst) override {
411
70.7k
        DCHECK(_parsed);
412
70.7k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
70.7k
        auto total = *n;
418
70.7k
        auto read_count = 0;
419
70.7k
        _buffer.resize(total);
420
5.80M
        for (size_t i = 0; i < total; ++i) {
421
5.73M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
5.73M
            if (UNLIKELY(ord >= _num_elements)) {
423
2.44k
                break;
424
2.44k
            }
425
426
5.73M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
5.73M
        }
428
429
70.7k
        if (LIKELY(read_count > 0)) {
430
70.7k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
70.7k
                                                   read_count, *dst);
432
70.7k
        }
433
434
70.7k
        *n = read_count;
435
70.7k
        return Status::OK();
436
70.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
6.72k
                          MutableColumnPtr& dst) override {
411
6.72k
        DCHECK(_parsed);
412
6.72k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
6.72k
        auto total = *n;
418
6.72k
        auto read_count = 0;
419
6.72k
        _buffer.resize(total);
420
1.21M
        for (size_t i = 0; i < total; ++i) {
421
1.21M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
1.21M
            if (UNLIKELY(ord >= _num_elements)) {
423
29
                break;
424
29
            }
425
426
1.21M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
1.21M
        }
428
429
6.72k
        if (LIKELY(read_count > 0)) {
430
6.72k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
6.72k
                                                   read_count, *dst);
432
6.72k
        }
433
434
6.72k
        *n = read_count;
435
6.72k
        return Status::OK();
436
6.72k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
8.13k
                          MutableColumnPtr& dst) override {
411
8.13k
        DCHECK(_parsed);
412
8.13k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
8.13k
        auto total = *n;
418
8.13k
        auto read_count = 0;
419
8.13k
        _buffer.resize(total);
420
1.02M
        for (size_t i = 0; i < total; ++i) {
421
1.01M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
1.01M
            if (UNLIKELY(ord >= _num_elements)) {
423
342
                break;
424
342
            }
425
426
1.01M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
1.01M
        }
428
429
8.13k
        if (LIKELY(read_count > 0)) {
430
8.13k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
8.13k
                                                   read_count, *dst);
432
8.13k
        }
433
434
8.13k
        *n = read_count;
435
8.13k
        return Status::OK();
436
8.13k
    }
_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.50k
                          MutableColumnPtr& dst) override {
411
1.50k
        DCHECK(_parsed);
412
1.50k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
1.50k
        auto total = *n;
418
1.50k
        auto read_count = 0;
419
1.50k
        _buffer.resize(total);
420
501k
        for (size_t i = 0; i < total; ++i) {
421
500k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
500k
            if (UNLIKELY(ord >= _num_elements)) {
423
14
                break;
424
14
            }
425
426
500k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
500k
        }
428
429
1.50k
        if (LIKELY(read_count > 0)) {
430
1.50k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
1.50k
                                                   read_count, *dst);
432
1.50k
        }
433
434
1.50k
        *n = read_count;
435
1.50k
        return Status::OK();
436
1.50k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
29.8k
                          MutableColumnPtr& dst) override {
411
29.8k
        DCHECK(_parsed);
412
29.8k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
29.8k
        auto total = *n;
418
29.8k
        auto read_count = 0;
419
29.8k
        _buffer.resize(total);
420
8.57M
        for (size_t i = 0; i < total; ++i) {
421
8.54M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
8.54M
            if (UNLIKELY(ord >= _num_elements)) {
423
785
                break;
424
785
            }
425
426
8.54M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
8.54M
        }
428
429
29.8k
        if (LIKELY(read_count > 0)) {
430
29.8k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
29.8k
                                                   read_count, *dst);
432
29.8k
        }
433
434
29.8k
        *n = read_count;
435
29.8k
        return Status::OK();
436
29.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
32.3k
                          MutableColumnPtr& dst) override {
411
32.3k
        DCHECK(_parsed);
412
32.3k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
32.3k
        auto total = *n;
418
32.3k
        auto read_count = 0;
419
32.3k
        _buffer.resize(total);
420
10.3M
        for (size_t i = 0; i < total; ++i) {
421
10.2M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
10.2M
            if (UNLIKELY(ord >= _num_elements)) {
423
145
                break;
424
145
            }
425
426
10.2M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
10.2M
        }
428
429
32.3k
        if (LIKELY(read_count > 0)) {
430
32.3k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
32.3k
                                                   read_count, *dst);
432
32.3k
        }
433
434
32.3k
        *n = read_count;
435
32.3k
        return Status::OK();
436
32.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
1.22k
                          MutableColumnPtr& dst) override {
411
1.22k
        DCHECK(_parsed);
412
1.22k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
1.22k
        auto total = *n;
418
1.22k
        auto read_count = 0;
419
1.22k
        _buffer.resize(total);
420
4.25k
        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.02k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
3.02k
        }
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.22k
        *n = read_count;
435
1.22k
        return Status::OK();
436
1.22k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
1.81k
                          MutableColumnPtr& dst) override {
411
1.81k
        DCHECK(_parsed);
412
1.81k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
1.81k
        auto total = *n;
418
1.81k
        auto read_count = 0;
419
1.81k
        _buffer.resize(total);
420
498k
        for (size_t i = 0; i < total; ++i) {
421
497k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
497k
            if (UNLIKELY(ord >= _num_elements)) {
423
238
                break;
424
238
            }
425
426
497k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
497k
        }
428
429
1.81k
        if (LIKELY(read_count > 0)) {
430
1.81k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
1.81k
                                                   read_count, *dst);
432
1.81k
        }
433
434
1.81k
        *n = read_count;
435
1.81k
        return Status::OK();
436
1.81k
    }
_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.8k
        if (LIKELY(read_count > 0)) {
430
12.8k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
12.8k
                                                   read_count, *dst);
432
12.8k
        }
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
163
                          MutableColumnPtr& dst) override {
411
163
        DCHECK(_parsed);
412
163
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
163
        auto total = *n;
418
163
        auto read_count = 0;
419
163
        _buffer.resize(total);
420
470
        for (size_t i = 0; i < total; ++i) {
421
309
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
309
            if (UNLIKELY(ord >= _num_elements)) {
423
2
                break;
424
2
            }
425
426
307
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
307
        }
428
429
163
        if (LIKELY(read_count > 0)) {
430
163
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
163
                                                   read_count, *dst);
432
163
        }
433
434
163
        *n = read_count;
435
163
        return Status::OK();
436
163
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
4.51k
                          MutableColumnPtr& dst) override {
411
4.51k
        DCHECK(_parsed);
412
4.51k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
4.51k
        auto total = *n;
418
4.51k
        auto read_count = 0;
419
4.51k
        _buffer.resize(total);
420
18.9k
        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
0
                break;
424
0
            }
425
426
14.4k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
14.4k
        }
428
429
4.51k
        if (LIKELY(read_count > 0)) {
430
4.51k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
4.51k
                                                   read_count, *dst);
432
4.51k
        }
433
434
4.51k
        *n = read_count;
435
4.51k
        return Status::OK();
436
4.51k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
26.7k
                          MutableColumnPtr& dst) override {
411
26.7k
        DCHECK(_parsed);
412
26.7k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
26.7k
        auto total = *n;
418
26.7k
        auto read_count = 0;
419
26.7k
        _buffer.resize(total);
420
22.2M
        for (size_t i = 0; i < total; ++i) {
421
22.2M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
22.2M
            if (UNLIKELY(ord >= _num_elements)) {
423
5.39k
                break;
424
5.39k
            }
425
426
22.2M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
22.2M
        }
428
429
26.7k
        if (LIKELY(read_count > 0)) {
430
26.7k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
26.7k
                                                   read_count, *dst);
432
26.7k
        }
433
434
26.7k
        *n = read_count;
435
26.7k
        return Status::OK();
436
26.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
13.4k
                          MutableColumnPtr& dst) override {
411
13.4k
        DCHECK(_parsed);
412
13.4k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
13.4k
        auto total = *n;
418
13.4k
        auto read_count = 0;
419
13.4k
        _buffer.resize(total);
420
9.12M
        for (size_t i = 0; i < total; ++i) {
421
9.11M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
9.11M
            if (UNLIKELY(ord >= _num_elements)) {
423
657
                break;
424
657
            }
425
426
9.11M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
9.11M
        }
428
429
13.4k
        if (LIKELY(read_count > 0)) {
430
13.4k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
13.4k
                                                   read_count, *dst);
432
13.4k
        }
433
434
13.4k
        *n = read_count;
435
13.4k
        return Status::OK();
436
13.4k
    }
_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.98k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
1.98k
            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
303
                          MutableColumnPtr& dst) override {
411
303
        DCHECK(_parsed);
412
303
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
303
        auto total = *n;
418
303
        auto read_count = 0;
419
303
        _buffer.resize(total);
420
1.00k
        for (size_t i = 0; i < total; ++i) {
421
699
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
699
            if (UNLIKELY(ord >= _num_elements)) {
423
0
                break;
424
0
            }
425
426
699
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
699
        }
428
429
303
        if (LIKELY(read_count > 0)) {
430
303
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
303
                                                   read_count, *dst);
432
303
        }
433
434
303
        *n = read_count;
435
303
        return Status::OK();
436
303
    }
_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
529
                          MutableColumnPtr& dst) override {
411
529
        DCHECK(_parsed);
412
529
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
529
        auto total = *n;
418
529
        auto read_count = 0;
419
529
        _buffer.resize(total);
420
1.31k
        for (size_t i = 0; i < total; ++i) {
421
787
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
787
            if (UNLIKELY(ord >= _num_elements)) {
423
3
                break;
424
3
            }
425
426
784
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
784
        }
428
429
529
        if (LIKELY(read_count > 0)) {
430
529
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
529
                                                   read_count, *dst);
432
529
        }
433
434
529
        *n = read_count;
435
529
        return Status::OK();
436
529
    }
437
438
53.2k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
439
53.2k
        return next_batch<false>(n, dst);
440
53.2k
    }
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
53.2k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
439
53.2k
        return next_batch<false>(n, dst);
440
53.2k
    }
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
3.81M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
444
226k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
444
225k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
444
1.94M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
444
75.3k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
444
104k
    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
230k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
444
203k
    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
214k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
444
232k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
444
20.6k
    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
203k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Line
Count
Source
444
1.20k
    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.61k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
444
1.85k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
444
108k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE13current_indexEv
Line
Count
Source
444
367
    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
11.5k
    size_t current_index() const override { return _cur_index; }
445
446
136M
    char* get_data(size_t index) const {
447
136M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
136M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
446
2.29M
    char* get_data(size_t index) const {
447
2.29M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
2.29M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
446
691k
    char* get_data(size_t index) const {
447
691k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
691k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
446
47.0M
    char* get_data(size_t index) const {
447
47.0M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
47.0M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
446
24.8M
    char* get_data(size_t index) const {
447
24.8M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
24.8M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
446
1.74M
    char* get_data(size_t index) const {
447
1.74M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
1.74M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
446
5.88M
    char* get_data(size_t index) const {
447
5.88M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
5.88M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
446
1.22M
    char* get_data(size_t index) const {
447
1.22M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
1.22M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
446
1.03M
    char* get_data(size_t index) const {
447
1.03M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
1.03M
    }
_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
504k
    char* get_data(size_t index) const {
447
504k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
504k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
446
8.90M
    char* get_data(size_t index) const {
447
8.90M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
8.90M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
446
10.3M
    char* get_data(size_t index) const {
447
10.3M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
10.3M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE8get_dataEm
Line
Count
Source
446
5.29k
    char* get_data(size_t index) const {
447
5.29k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
5.29k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
446
498k
    char* get_data(size_t index) const {
447
498k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
498k
    }
_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.61k
    char* get_data(size_t index) const {
447
1.61k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
1.61k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_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_9FieldTypeE32EE8get_dataEm
Line
Count
Source
446
22.2M
    char* get_data(size_t index) const {
447
22.2M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
22.2M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
446
9.13M
    char* get_data(size_t index) const {
447
9.13M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
9.13M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
446
5.16k
    char* get_data(size_t index) const {
447
5.16k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
5.16k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Line
Count
Source
446
1.32k
    char* get_data(size_t index) const {
447
1.32k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
1.32k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
Line
Count
Source
446
1.65k
    char* get_data(size_t index) const {
447
1.65k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
1.65k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE8get_dataEm
Line
Count
Source
446
95.2k
    char* get_data(size_t index) const {
447
95.2k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
95.2k
    }
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