Coverage Report

Created: 2026-03-23 17:10

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/storage/segment/bitshuffle_page.h
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#pragma once
19
20
#include <glog/logging.h>
21
22
#include <algorithm>
23
#include <cstddef>
24
#include <cstdint>
25
#include <cstring>
26
#include <ostream>
27
#include <type_traits>
28
29
#include "common/cast_set.h"
30
#include "common/compiler_util.h" // IWYU pragma: keep
31
#include "common/status.h"
32
#include "core/column/column.h"
33
#include "core/data_type/data_type.h"
34
#include "core/types.h"
35
#include "storage/olap_common.h"
36
#include "storage/segment/bitshuffle_wrapper.h"
37
#include "storage/segment/common.h"
38
#include "storage/segment/options.h"
39
#include "storage/segment/page_builder.h"
40
#include "storage/segment/page_decoder.h"
41
#include "storage/types.h"
42
#include "util/alignment.h"
43
#include "util/coding.h"
44
#include "util/faststring.h"
45
#include "util/slice.h"
46
47
namespace doris {
48
namespace segment_v2 {
49
#include "common/compile_check_begin.h"
50
51
enum { 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
295k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
96
159k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
96
16.7k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
96
3.73k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
96
30.3k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
96
22.7k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
96
5.48k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
96
3.57k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
96
9.21k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
96
127
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
96
13.6k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
96
14.7k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
96
230
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
96
145
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
96
3.00k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
96
5.64k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
96
4.87k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
96
898
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
96
542
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
96
447
    Status init() override { return reset(); }
97
98
84.4M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
98
83.9M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
98
18.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
98
4.17k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
98
312k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
98
23.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
98
5.96k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12is_page_fullEv
Line
Count
Source
98
4.23k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
98
10.5k
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12is_page_fullEv
Line
Count
Source
98
134
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
98
21.7k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
98
15.6k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
98
285
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
98
47
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
98
3.31k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
98
7.35k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
98
6.70k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Line
Count
Source
98
1.09k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Line
Count
Source
98
498
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
98
391
    bool is_page_full() override { return _remain_element_capacity == 0; }
99
100
1.12M
    Status add(const uint8_t* vals, size_t* count) override {
101
1.12M
        return add_internal<false>(vals, count);
102
1.12M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
100
689k
    Status add(const uint8_t* vals, size_t* count) override {
101
689k
        return add_internal<false>(vals, count);
102
689k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
100
18.3k
    Status add(const uint8_t* vals, size_t* count) override {
101
18.3k
        return add_internal<false>(vals, count);
102
18.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
100
4.17k
    Status add(const uint8_t* vals, size_t* count) override {
101
4.17k
        return add_internal<false>(vals, count);
102
4.17k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
100
312k
    Status add(const uint8_t* vals, size_t* count) override {
101
312k
        return add_internal<false>(vals, count);
102
312k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
100
23.3k
    Status add(const uint8_t* vals, size_t* count) override {
101
23.3k
        return add_internal<false>(vals, count);
102
23.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
100
5.96k
    Status add(const uint8_t* vals, size_t* count) override {
101
5.96k
        return add_internal<false>(vals, count);
102
5.96k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
100
4.23k
    Status add(const uint8_t* vals, size_t* count) override {
101
4.23k
        return add_internal<false>(vals, count);
102
4.23k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
100
10.5k
    Status add(const uint8_t* vals, size_t* count) override {
101
10.5k
        return add_internal<false>(vals, count);
102
10.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
100
134
    Status add(const uint8_t* vals, size_t* count) override {
101
134
        return add_internal<false>(vals, count);
102
134
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
100
21.7k
    Status add(const uint8_t* vals, size_t* count) override {
101
21.7k
        return add_internal<false>(vals, count);
102
21.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
100
15.6k
    Status add(const uint8_t* vals, size_t* count) override {
101
15.6k
        return add_internal<false>(vals, count);
102
15.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
100
285
    Status add(const uint8_t* vals, size_t* count) override {
101
285
        return add_internal<false>(vals, count);
102
285
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
100
47
    Status add(const uint8_t* vals, size_t* count) override {
101
47
        return add_internal<false>(vals, count);
102
47
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
100
3.31k
    Status add(const uint8_t* vals, size_t* count) override {
101
3.31k
        return add_internal<false>(vals, count);
102
3.31k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
100
7.35k
    Status add(const uint8_t* vals, size_t* count) override {
101
7.35k
        return add_internal<false>(vals, count);
102
7.35k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
100
6.70k
    Status add(const uint8_t* vals, size_t* count) override {
101
6.70k
        return add_internal<false>(vals, count);
102
6.70k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Line
Count
Source
100
1.09k
    Status add(const uint8_t* vals, size_t* count) override {
101
1.09k
        return add_internal<false>(vals, count);
102
1.09k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Line
Count
Source
100
498
    Status add(const uint8_t* vals, size_t* count) override {
101
498
        return add_internal<false>(vals, count);
102
498
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
100
391
    Status add(const uint8_t* vals, size_t* count) override {
101
391
        return add_internal<false>(vals, count);
102
391
    }
103
104
82.8M
    Status single_add(const uint8_t* vals, size_t* count) {
105
82.8M
        return add_internal<true>(vals, count);
106
82.8M
    }
107
108
    template <bool single>
109
83.6M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
83.6M
        DCHECK(!_finished);
111
83.6M
        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
83.6M
        uint32_t to_add = cast_set<UInt32>(
127
83.6M
                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
83.6M
        int to_add_size = to_add * SIZE_OF_TYPE;
130
83.6M
        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
83.6M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
83.6M
        _count += to_add;
135
83.6M
        _remain_element_capacity -= to_add;
136
83.6M
        _raw_data_size += to_add_size;
137
        // return added number through count
138
83.6M
        *num_written = to_add;
139
83.6M
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_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
82.5M
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
82.5M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
82.5M
                        *reinterpret_cast<const uint32_t*>(vals);
150
82.5M
                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
82.5M
        }
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
83.6M
        return Status::OK();
160
83.6M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
689k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
689k
        DCHECK(!_finished);
111
689k
        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
689k
        uint32_t to_add = cast_set<UInt32>(
127
689k
                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
689k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
689k
        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
689k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
689k
        _count += to_add;
135
689k
        _remain_element_capacity -= to_add;
136
689k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
689k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_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
689k
        memcpy(&_data[orig_size], vals, to_add_size);
159
689k
        return Status::OK();
160
689k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
109
82.5M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
82.5M
        DCHECK(!_finished);
111
82.5M
        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
82.5M
        uint32_t to_add = cast_set<UInt32>(
127
82.5M
                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
82.5M
        int to_add_size = to_add * SIZE_OF_TYPE;
130
82.5M
        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
82.5M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
82.5M
        _count += to_add;
135
82.5M
        _remain_element_capacity -= to_add;
136
82.5M
        _raw_data_size += to_add_size;
137
        // return added number through count
138
82.5M
        *num_written = to_add;
139
82.5M
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_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
82.5M
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
82.5M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
82.5M
                        *reinterpret_cast<const uint32_t*>(vals);
150
82.5M
                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
82.5M
        }
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
82.5M
        return Status::OK();
160
82.5M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
18.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
18.3k
        DCHECK(!_finished);
111
18.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
18.3k
        uint32_t to_add = cast_set<UInt32>(
127
18.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
18.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
18.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
18.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
18.3k
        _count += to_add;
135
18.3k
        _remain_element_capacity -= to_add;
136
18.3k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
18.3k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
18.3k
        memcpy(&_data[orig_size], vals, to_add_size);
159
18.3k
        return Status::OK();
160
18.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
4.17k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
4.17k
        DCHECK(!_finished);
111
4.17k
        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
4.17k
        uint32_t to_add = cast_set<UInt32>(
127
4.17k
                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
4.17k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
4.17k
        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
4.17k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
4.17k
        _count += to_add;
135
4.17k
        _remain_element_capacity -= to_add;
136
4.17k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
4.17k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_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
4.17k
        memcpy(&_data[orig_size], vals, to_add_size);
159
4.17k
        return Status::OK();
160
4.17k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
312k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
312k
        DCHECK(!_finished);
111
312k
        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
312k
        uint32_t to_add = cast_set<UInt32>(
127
312k
                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
312k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
312k
        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
312k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
312k
        _count += to_add;
135
312k
        _remain_element_capacity -= to_add;
136
312k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
312k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_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
312k
        memcpy(&_data[orig_size], vals, to_add_size);
159
312k
        return Status::OK();
160
312k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
23.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
23.3k
        DCHECK(!_finished);
111
23.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
23.3k
        uint32_t to_add = cast_set<UInt32>(
127
23.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
23.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
23.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
23.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
23.3k
        _count += to_add;
135
23.3k
        _remain_element_capacity -= to_add;
136
23.3k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
23.3k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_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
23.3k
        memcpy(&_data[orig_size], vals, to_add_size);
159
23.3k
        return Status::OK();
160
23.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
5.96k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
5.96k
        DCHECK(!_finished);
111
5.96k
        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.96k
        uint32_t to_add = cast_set<UInt32>(
127
5.96k
                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.96k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
5.96k
        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.96k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
5.96k
        _count += to_add;
135
5.96k
        _remain_element_capacity -= to_add;
136
5.96k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
5.96k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_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.96k
        memcpy(&_data[orig_size], vals, to_add_size);
159
5.96k
        return Status::OK();
160
5.96k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
4.23k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
4.23k
        DCHECK(!_finished);
111
4.23k
        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
4.23k
        uint32_t to_add = cast_set<UInt32>(
127
4.23k
                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
4.23k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
4.23k
        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
4.23k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
4.23k
        _count += to_add;
135
4.23k
        _remain_element_capacity -= to_add;
136
4.23k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
4.23k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_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
4.23k
        memcpy(&_data[orig_size], vals, to_add_size);
159
4.23k
        return Status::OK();
160
4.23k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
10.5k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
10.5k
        DCHECK(!_finished);
111
10.5k
        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.5k
        uint32_t to_add = cast_set<UInt32>(
127
10.5k
                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.5k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
10.5k
        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.5k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
10.5k
        _count += to_add;
135
10.5k
        _remain_element_capacity -= to_add;
136
10.5k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
10.5k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_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.5k
        memcpy(&_data[orig_size], vals, to_add_size);
159
10.5k
        return Status::OK();
160
10.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
134
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
134
        DCHECK(!_finished);
111
134
        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
134
        uint32_t to_add = cast_set<UInt32>(
127
134
                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
134
        int to_add_size = to_add * SIZE_OF_TYPE;
130
134
        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
134
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
134
        _count += to_add;
135
134
        _remain_element_capacity -= to_add;
136
134
        _raw_data_size += to_add_size;
137
        // return added number through count
138
134
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_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
134
        memcpy(&_data[orig_size], vals, to_add_size);
159
134
        return Status::OK();
160
134
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
21.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
21.7k
        DCHECK(!_finished);
111
21.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
21.7k
        uint32_t to_add = cast_set<UInt32>(
127
21.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
21.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
21.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
21.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
21.7k
        _count += to_add;
135
21.7k
        _remain_element_capacity -= to_add;
136
21.7k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
21.7k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_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
21.7k
        memcpy(&_data[orig_size], vals, to_add_size);
159
21.7k
        return Status::OK();
160
21.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
15.6k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
15.6k
        DCHECK(!_finished);
111
15.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
15.6k
        uint32_t to_add = cast_set<UInt32>(
127
15.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
15.6k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
15.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
15.6k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
15.6k
        _count += to_add;
135
15.6k
        _remain_element_capacity -= to_add;
136
15.6k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
15.6k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_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
15.6k
        memcpy(&_data[orig_size], vals, to_add_size);
159
15.6k
        return Status::OK();
160
15.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
285
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
285
        DCHECK(!_finished);
111
285
        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
285
        uint32_t to_add = cast_set<UInt32>(
127
285
                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
285
        int to_add_size = to_add * SIZE_OF_TYPE;
130
285
        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
285
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
285
        _count += to_add;
135
285
        _remain_element_capacity -= to_add;
136
285
        _raw_data_size += to_add_size;
137
        // return added number through count
138
285
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_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
285
        memcpy(&_data[orig_size], vals, to_add_size);
159
285
        return Status::OK();
160
285
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
47
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
47
        DCHECK(!_finished);
111
47
        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
47
        uint32_t to_add = cast_set<UInt32>(
127
47
                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
47
        int to_add_size = to_add * SIZE_OF_TYPE;
130
47
        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
47
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
47
        _count += to_add;
135
47
        _remain_element_capacity -= to_add;
136
47
        _raw_data_size += to_add_size;
137
        // return added number through count
138
47
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_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
47
        memcpy(&_data[orig_size], vals, to_add_size);
159
47
        return Status::OK();
160
47
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
3.31k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
3.31k
        DCHECK(!_finished);
111
3.31k
        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
3.31k
        uint32_t to_add = cast_set<UInt32>(
127
3.31k
                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
3.31k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
3.31k
        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
3.31k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
3.31k
        _count += to_add;
135
3.31k
        _remain_element_capacity -= to_add;
136
3.31k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
3.31k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_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
3.31k
        memcpy(&_data[orig_size], vals, to_add_size);
159
3.31k
        return Status::OK();
160
3.31k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
7.35k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
7.35k
        DCHECK(!_finished);
111
7.35k
        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.35k
        uint32_t to_add = cast_set<UInt32>(
127
7.35k
                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.35k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
7.35k
        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.35k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
7.35k
        _count += to_add;
135
7.35k
        _remain_element_capacity -= to_add;
136
7.35k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
7.35k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_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.35k
        memcpy(&_data[orig_size], vals, to_add_size);
159
7.35k
        return Status::OK();
160
7.35k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
6.70k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
6.70k
        DCHECK(!_finished);
111
6.70k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
6.70k
        uint32_t to_add = cast_set<UInt32>(
127
6.70k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
6.70k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
6.70k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
6.70k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
6.70k
        _count += to_add;
135
6.70k
        _remain_element_capacity -= to_add;
136
6.70k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
6.70k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
6.70k
        memcpy(&_data[orig_size], vals, to_add_size);
159
6.70k
        return Status::OK();
160
6.70k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
1.09k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
1.09k
        DCHECK(!_finished);
111
1.09k
        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.09k
        uint32_t to_add = cast_set<UInt32>(
127
1.09k
                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.09k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
1.09k
        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.09k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
1.09k
        _count += to_add;
135
1.09k
        _remain_element_capacity -= to_add;
136
1.09k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
1.09k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_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.09k
        memcpy(&_data[orig_size], vals, to_add_size);
159
1.09k
        return Status::OK();
160
1.09k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
498
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
498
        DCHECK(!_finished);
111
498
        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
498
        uint32_t to_add = cast_set<UInt32>(
127
498
                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
498
        int to_add_size = to_add * SIZE_OF_TYPE;
130
498
        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
498
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
498
        _count += to_add;
135
498
        _remain_element_capacity -= to_add;
136
498
        _raw_data_size += to_add_size;
137
        // return added number through count
138
498
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_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
498
        memcpy(&_data[orig_size], vals, to_add_size);
159
498
        return Status::OK();
160
498
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
391
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
391
        DCHECK(!_finished);
111
391
        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
391
        uint32_t to_add = cast_set<UInt32>(
127
391
                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
391
        int to_add_size = to_add * SIZE_OF_TYPE;
130
391
        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
391
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
391
        _count += to_add;
135
391
        _remain_element_capacity -= to_add;
136
391
        _raw_data_size += to_add_size;
137
        // return added number through count
138
391
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                *reinterpret_cast<uint8_t*>(&_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
391
        memcpy(&_data[orig_size], vals, to_add_size);
159
391
        return Status::OK();
160
391
    }
161
162
306k
    Status finish(OwnedSlice* slice) override {
163
306k
        if (_count > 0) {
164
298k
            _first_value = cell(0);
165
298k
            _last_value = cell(_count - 1);
166
298k
        }
167
306k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
306k
        return Status::OK();
169
306k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
157k
    Status finish(OwnedSlice* slice) override {
163
157k
        if (_count > 0) {
164
151k
            _first_value = cell(0);
165
151k
            _last_value = cell(_count - 1);
166
151k
        }
167
157k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
157k
        return Status::OK();
169
157k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
17.0k
    Status finish(OwnedSlice* slice) override {
163
17.0k
        if (_count > 0) {
164
16.8k
            _first_value = cell(0);
165
16.8k
            _last_value = cell(_count - 1);
166
16.8k
        }
167
17.0k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
17.0k
        return Status::OK();
169
17.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
3.75k
    Status finish(OwnedSlice* slice) override {
163
3.75k
        if (_count > 0) {
164
3.71k
            _first_value = cell(0);
165
3.71k
            _last_value = cell(_count - 1);
166
3.71k
        }
167
3.75k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
3.75k
        return Status::OK();
169
3.75k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
33.4k
    Status finish(OwnedSlice* slice) override {
163
33.4k
        if (_count > 0) {
164
33.1k
            _first_value = cell(0);
165
33.1k
            _last_value = cell(_count - 1);
166
33.1k
        }
167
33.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
33.4k
        return Status::OK();
169
33.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
23.0k
    Status finish(OwnedSlice* slice) override {
163
23.0k
        if (_count > 0) {
164
23.0k
            _first_value = cell(0);
165
23.0k
            _last_value = cell(_count - 1);
166
23.0k
        }
167
23.0k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
23.0k
        return Status::OK();
169
23.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
5.76k
    Status finish(OwnedSlice* slice) override {
163
5.76k
        if (_count > 0) {
164
5.63k
            _first_value = cell(0);
165
5.63k
            _last_value = cell(_count - 1);
166
5.63k
        }
167
5.76k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
5.76k
        return Status::OK();
169
5.76k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
3.58k
    Status finish(OwnedSlice* slice) override {
163
3.58k
        if (_count > 0) {
164
3.49k
            _first_value = cell(0);
165
3.49k
            _last_value = cell(_count - 1);
166
3.49k
        }
167
3.58k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
3.58k
        return Status::OK();
169
3.58k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
9.99k
    Status finish(OwnedSlice* slice) override {
163
9.99k
        if (_count > 0) {
164
9.86k
            _first_value = cell(0);
165
9.86k
            _last_value = cell(_count - 1);
166
9.86k
        }
167
9.99k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
9.99k
        return Status::OK();
169
9.99k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
139
    Status finish(OwnedSlice* slice) override {
163
139
        if (_count > 0) {
164
134
            _first_value = cell(0);
165
134
            _last_value = cell(_count - 1);
166
134
        }
167
139
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
139
        return Status::OK();
169
139
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
19.4k
    Status finish(OwnedSlice* slice) override {
163
19.4k
        if (_count > 0) {
164
18.9k
            _first_value = cell(0);
165
18.9k
            _last_value = cell(_count - 1);
166
18.9k
        }
167
19.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
19.4k
        return Status::OK();
169
19.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
15.1k
    Status finish(OwnedSlice* slice) override {
163
15.1k
        if (_count > 0) {
164
14.4k
            _first_value = cell(0);
165
14.4k
            _last_value = cell(_count - 1);
166
14.4k
        }
167
15.1k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
15.1k
        return Status::OK();
169
15.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
385
    Status finish(OwnedSlice* slice) override {
163
385
        if (_count > 0) {
164
285
            _first_value = cell(0);
165
285
            _last_value = cell(_count - 1);
166
285
        }
167
385
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
385
        return Status::OK();
169
385
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
51
    Status finish(OwnedSlice* slice) override {
163
51
        if (_count > 0) {
164
47
            _first_value = cell(0);
165
47
            _last_value = cell(_count - 1);
166
47
        }
167
51
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
51
        return Status::OK();
169
51
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
2.99k
    Status finish(OwnedSlice* slice) override {
163
2.99k
        if (_count > 0) {
164
2.86k
            _first_value = cell(0);
165
2.86k
            _last_value = cell(_count - 1);
166
2.86k
        }
167
2.99k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
2.99k
        return Status::OK();
169
2.99k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
6.99k
    Status finish(OwnedSlice* slice) override {
163
6.99k
        if (_count > 0) {
164
6.75k
            _first_value = cell(0);
165
6.75k
            _last_value = cell(_count - 1);
166
6.75k
        }
167
6.99k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
6.99k
        return Status::OK();
169
6.99k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
5.91k
    Status finish(OwnedSlice* slice) override {
163
5.91k
        if (_count > 0) {
164
5.80k
            _first_value = cell(0);
165
5.80k
            _last_value = cell(_count - 1);
166
5.80k
        }
167
5.91k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
5.91k
        return Status::OK();
169
5.91k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
792
    Status finish(OwnedSlice* slice) override {
163
792
        if (_count > 0) {
164
741
            _first_value = cell(0);
165
741
            _last_value = cell(_count - 1);
166
741
        }
167
792
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
792
        return Status::OK();
169
792
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
448
    Status finish(OwnedSlice* slice) override {
163
448
        if (_count > 0) {
164
438
            _first_value = cell(0);
165
438
            _last_value = cell(_count - 1);
166
438
        }
167
448
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
448
        return Status::OK();
169
448
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
353
    Status finish(OwnedSlice* slice) override {
163
353
        if (_count > 0) {
164
331
            _first_value = cell(0);
165
331
            _last_value = cell(_count - 1);
166
331
        }
167
353
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
168
353
        return Status::OK();
169
353
    }
170
171
724k
    Status reset() override {
172
724k
        RETURN_IF_CATCH_EXCEPTION({
173
724k
            size_t block_size = _options.data_page_size;
174
724k
            _count = 0;
175
724k
            _raw_data_size = 0;
176
724k
            _data.clear();
177
724k
            _data.reserve(block_size);
178
724k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
724k
                    << "buffer must be naturally-aligned";
180
724k
            _buffer.clear();
181
724k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
724k
            _finished = false;
183
724k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
724k
        });
185
725k
        return Status::OK();
186
724k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
171
439k
    Status reset() override {
172
439k
        RETURN_IF_CATCH_EXCEPTION({
173
439k
            size_t block_size = _options.data_page_size;
174
439k
            _count = 0;
175
439k
            _raw_data_size = 0;
176
439k
            _data.clear();
177
439k
            _data.reserve(block_size);
178
439k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
439k
                    << "buffer must be naturally-aligned";
180
439k
            _buffer.clear();
181
439k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
439k
            _finished = false;
183
439k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
439k
        });
185
439k
        return Status::OK();
186
439k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
171
33.7k
    Status reset() override {
172
33.7k
        RETURN_IF_CATCH_EXCEPTION({
173
33.7k
            size_t block_size = _options.data_page_size;
174
33.7k
            _count = 0;
175
33.7k
            _raw_data_size = 0;
176
33.7k
            _data.clear();
177
33.7k
            _data.reserve(block_size);
178
33.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
33.7k
                    << "buffer must be naturally-aligned";
180
33.7k
            _buffer.clear();
181
33.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
33.7k
            _finished = false;
183
33.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
33.7k
        });
185
33.7k
        return Status::OK();
186
33.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
171
7.49k
    Status reset() override {
172
7.49k
        RETURN_IF_CATCH_EXCEPTION({
173
7.49k
            size_t block_size = _options.data_page_size;
174
7.49k
            _count = 0;
175
7.49k
            _raw_data_size = 0;
176
7.49k
            _data.clear();
177
7.49k
            _data.reserve(block_size);
178
7.49k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
7.49k
                    << "buffer must be naturally-aligned";
180
7.49k
            _buffer.clear();
181
7.49k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
7.49k
            _finished = false;
183
7.49k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
7.49k
        });
185
7.49k
        return Status::OK();
186
7.49k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
171
63.8k
    Status reset() override {
172
63.8k
        RETURN_IF_CATCH_EXCEPTION({
173
63.8k
            size_t block_size = _options.data_page_size;
174
63.8k
            _count = 0;
175
63.8k
            _raw_data_size = 0;
176
63.8k
            _data.clear();
177
63.8k
            _data.reserve(block_size);
178
63.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
63.8k
                    << "buffer must be naturally-aligned";
180
63.8k
            _buffer.clear();
181
63.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
63.8k
            _finished = false;
183
63.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
63.8k
        });
185
63.8k
        return Status::OK();
186
63.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
171
45.8k
    Status reset() override {
172
45.8k
        RETURN_IF_CATCH_EXCEPTION({
173
45.8k
            size_t block_size = _options.data_page_size;
174
45.8k
            _count = 0;
175
45.8k
            _raw_data_size = 0;
176
45.8k
            _data.clear();
177
45.8k
            _data.reserve(block_size);
178
45.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
45.8k
                    << "buffer must be naturally-aligned";
180
45.8k
            _buffer.clear();
181
45.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
45.8k
            _finished = false;
183
45.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
45.8k
        });
185
45.8k
        return Status::OK();
186
45.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
171
11.2k
    Status reset() override {
172
11.2k
        RETURN_IF_CATCH_EXCEPTION({
173
11.2k
            size_t block_size = _options.data_page_size;
174
11.2k
            _count = 0;
175
11.2k
            _raw_data_size = 0;
176
11.2k
            _data.clear();
177
11.2k
            _data.reserve(block_size);
178
11.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
11.2k
                    << "buffer must be naturally-aligned";
180
11.2k
            _buffer.clear();
181
11.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
11.2k
            _finished = false;
183
11.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
11.2k
        });
185
11.2k
        return Status::OK();
186
11.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
171
7.15k
    Status reset() override {
172
7.15k
        RETURN_IF_CATCH_EXCEPTION({
173
7.15k
            size_t block_size = _options.data_page_size;
174
7.15k
            _count = 0;
175
7.15k
            _raw_data_size = 0;
176
7.15k
            _data.clear();
177
7.15k
            _data.reserve(block_size);
178
7.15k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
7.15k
                    << "buffer must be naturally-aligned";
180
7.15k
            _buffer.clear();
181
7.15k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
7.15k
            _finished = false;
183
7.15k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
7.15k
        });
185
7.16k
        return Status::OK();
186
7.15k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
171
19.2k
    Status reset() override {
172
19.2k
        RETURN_IF_CATCH_EXCEPTION({
173
19.2k
            size_t block_size = _options.data_page_size;
174
19.2k
            _count = 0;
175
19.2k
            _raw_data_size = 0;
176
19.2k
            _data.clear();
177
19.2k
            _data.reserve(block_size);
178
19.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
19.2k
                    << "buffer must be naturally-aligned";
180
19.2k
            _buffer.clear();
181
19.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
19.2k
            _finished = false;
183
19.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
19.2k
        });
185
19.2k
        return Status::OK();
186
19.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
171
266
    Status reset() override {
172
266
        RETURN_IF_CATCH_EXCEPTION({
173
266
            size_t block_size = _options.data_page_size;
174
266
            _count = 0;
175
266
            _raw_data_size = 0;
176
266
            _data.clear();
177
266
            _data.reserve(block_size);
178
266
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
266
                    << "buffer must be naturally-aligned";
180
266
            _buffer.clear();
181
266
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
266
            _finished = false;
183
266
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
266
        });
185
266
        return Status::OK();
186
266
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
171
33.1k
    Status reset() override {
172
33.1k
        RETURN_IF_CATCH_EXCEPTION({
173
33.1k
            size_t block_size = _options.data_page_size;
174
33.1k
            _count = 0;
175
33.1k
            _raw_data_size = 0;
176
33.1k
            _data.clear();
177
33.1k
            _data.reserve(block_size);
178
33.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
33.1k
                    << "buffer must be naturally-aligned";
180
33.1k
            _buffer.clear();
181
33.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
33.1k
            _finished = false;
183
33.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
33.1k
        });
185
33.1k
        return Status::OK();
186
33.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
171
29.8k
    Status reset() override {
172
29.8k
        RETURN_IF_CATCH_EXCEPTION({
173
29.8k
            size_t block_size = _options.data_page_size;
174
29.8k
            _count = 0;
175
29.8k
            _raw_data_size = 0;
176
29.8k
            _data.clear();
177
29.8k
            _data.reserve(block_size);
178
29.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
29.8k
                    << "buffer must be naturally-aligned";
180
29.8k
            _buffer.clear();
181
29.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
29.8k
            _finished = false;
183
29.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
29.8k
        });
185
29.8k
        return Status::OK();
186
29.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
171
615
    Status reset() override {
172
615
        RETURN_IF_CATCH_EXCEPTION({
173
615
            size_t block_size = _options.data_page_size;
174
615
            _count = 0;
175
615
            _raw_data_size = 0;
176
615
            _data.clear();
177
615
            _data.reserve(block_size);
178
615
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
615
                    << "buffer must be naturally-aligned";
180
615
            _buffer.clear();
181
615
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
615
            _finished = false;
183
615
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
615
        });
185
616
        return Status::OK();
186
615
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
171
196
    Status reset() override {
172
196
        RETURN_IF_CATCH_EXCEPTION({
173
196
            size_t block_size = _options.data_page_size;
174
196
            _count = 0;
175
196
            _raw_data_size = 0;
176
196
            _data.clear();
177
196
            _data.reserve(block_size);
178
196
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
196
                    << "buffer must be naturally-aligned";
180
196
            _buffer.clear();
181
196
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
196
            _finished = false;
183
196
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
196
        });
185
196
        return Status::OK();
186
196
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
171
5.99k
    Status reset() override {
172
5.99k
        RETURN_IF_CATCH_EXCEPTION({
173
5.99k
            size_t block_size = _options.data_page_size;
174
5.99k
            _count = 0;
175
5.99k
            _raw_data_size = 0;
176
5.99k
            _data.clear();
177
5.99k
            _data.reserve(block_size);
178
5.99k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
5.99k
                    << "buffer must be naturally-aligned";
180
5.99k
            _buffer.clear();
181
5.99k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
5.99k
            _finished = false;
183
5.99k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
5.99k
        });
185
5.99k
        return Status::OK();
186
5.99k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
171
12.6k
    Status reset() override {
172
12.6k
        RETURN_IF_CATCH_EXCEPTION({
173
12.6k
            size_t block_size = _options.data_page_size;
174
12.6k
            _count = 0;
175
12.6k
            _raw_data_size = 0;
176
12.6k
            _data.clear();
177
12.6k
            _data.reserve(block_size);
178
12.6k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
12.6k
                    << "buffer must be naturally-aligned";
180
12.6k
            _buffer.clear();
181
12.6k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
12.6k
            _finished = false;
183
12.6k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
12.6k
        });
185
12.6k
        return Status::OK();
186
12.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
171
10.7k
    Status reset() override {
172
10.7k
        RETURN_IF_CATCH_EXCEPTION({
173
10.7k
            size_t block_size = _options.data_page_size;
174
10.7k
            _count = 0;
175
10.7k
            _raw_data_size = 0;
176
10.7k
            _data.clear();
177
10.7k
            _data.reserve(block_size);
178
10.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
10.7k
                    << "buffer must be naturally-aligned";
180
10.7k
            _buffer.clear();
181
10.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
10.7k
            _finished = false;
183
10.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
10.7k
        });
185
10.7k
        return Status::OK();
186
10.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Line
Count
Source
171
1.69k
    Status reset() override {
172
1.69k
        RETURN_IF_CATCH_EXCEPTION({
173
1.69k
            size_t block_size = _options.data_page_size;
174
1.69k
            _count = 0;
175
1.69k
            _raw_data_size = 0;
176
1.69k
            _data.clear();
177
1.69k
            _data.reserve(block_size);
178
1.69k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
1.69k
                    << "buffer must be naturally-aligned";
180
1.69k
            _buffer.clear();
181
1.69k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
1.69k
            _finished = false;
183
1.69k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
1.69k
        });
185
1.69k
        return Status::OK();
186
1.69k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Line
Count
Source
171
990
    Status reset() override {
172
990
        RETURN_IF_CATCH_EXCEPTION({
173
990
            size_t block_size = _options.data_page_size;
174
990
            _count = 0;
175
990
            _raw_data_size = 0;
176
990
            _data.clear();
177
990
            _data.reserve(block_size);
178
990
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
990
                    << "buffer must be naturally-aligned";
180
990
            _buffer.clear();
181
990
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
990
            _finished = false;
183
990
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
990
        });
185
990
        return Status::OK();
186
990
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
171
800
    Status reset() override {
172
800
        RETURN_IF_CATCH_EXCEPTION({
173
800
            size_t block_size = _options.data_page_size;
174
800
            _count = 0;
175
800
            _raw_data_size = 0;
176
800
            _data.clear();
177
800
            _data.reserve(block_size);
178
800
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
179
800
                    << "buffer must be naturally-aligned";
180
800
            _buffer.clear();
181
800
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
182
800
            _finished = false;
183
800
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
184
800
        });
185
800
        return Status::OK();
186
800
    }
187
188
2.08M
    size_t count() const override { return _count; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
188
2.08M
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5countEv
189
190
26.4k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
190
14.2k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
190
2.44k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
190
813
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
190
1.66k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
190
756
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
190
1.21k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
190
562
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
190
619
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4sizeEv
Line
Count
Source
190
6
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4sizeEv
Line
Count
Source
190
1.14k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
190
1.80k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4sizeEv
Line
Count
Source
190
13
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4sizeEv
Line
Count
Source
190
2
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4sizeEv
Line
Count
Source
190
119
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
190
180
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
190
823
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4sizeEv
Line
Count
Source
190
10
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4sizeEv
Line
Count
Source
190
10
    uint64_t size() const override { return _buffer.size(); }
191
192
185k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
192
36.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
192
17.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
192
3.75k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
192
33.4k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
192
23.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
192
5.76k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
192
3.58k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
192
9.99k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE17get_raw_data_sizeEv
Line
Count
Source
192
139
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
192
19.4k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
192
15.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
192
385
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
192
51
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
192
2.99k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
192
6.99k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
192
5.91k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE17get_raw_data_sizeEv
Line
Count
Source
192
792
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Line
Count
Source
192
448
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
192
353
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
193
194
0
    Status get_first_value(void* value) const override {
195
0
        DCHECK(_finished);
196
0
        if (_count == 0) {
197
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
198
0
        }
199
0
        memcpy(value, &_first_value, SIZE_OF_TYPE);
200
0
        return Status::OK();
201
0
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE15get_first_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE15get_first_valueEPv
202
3
    Status get_last_value(void* value) const override {
203
3
        DCHECK(_finished);
204
3
        if (_count == 0) {
205
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
206
0
        }
207
3
        memcpy(value, &_last_value, SIZE_OF_TYPE);
208
3
        return Status::OK();
209
3
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE14get_last_valueEPv
Line
Count
Source
202
3
    Status get_last_value(void* value) const override {
203
3
        DCHECK(_finished);
204
3
        if (_count == 0) {
205
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
206
0
        }
207
3
        memcpy(value, &_last_value, SIZE_OF_TYPE);
208
3
        return Status::OK();
209
3
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE14get_last_valueEPv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE14get_last_valueEPv
210
211
private:
212
    BitshufflePageBuilder(const PageBuilderOptions& options)
213
295k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
159k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
16.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
3.73k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
30.3k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
22.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
5.48k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
3.57k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
9.21k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
127
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
13.6k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
14.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
231
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
145
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
3.00k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
5.64k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
4.87k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
898
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
541
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
213
447
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
214
215
306k
    OwnedSlice _finish(int final_size_of_type) {
216
306k
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
306k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
306k
        int padding_elems = num_elems_after_padding - _count;
221
306k
        int padding_bytes = padding_elems * final_size_of_type;
222
7.66M
        for (int i = 0; i < padding_bytes; i++) {
223
7.36M
            _data.push_back(0);
224
7.36M
        }
225
226
        // reserve enough place for compression
227
306k
        _buffer.resize(
228
306k
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
306k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
306k
        int64_t bytes =
232
306k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
306k
                                         num_elems_after_padding, final_size_of_type, 0);
234
306k
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
306k
        encode_fixed32_le(&_buffer[0], _count);
244
306k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
306k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
306k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
306k
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
306k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
306k
        return _buffer.build();
251
306k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
215
157k
    OwnedSlice _finish(int final_size_of_type) {
216
157k
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
157k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
157k
        int padding_elems = num_elems_after_padding - _count;
221
157k
        int padding_bytes = padding_elems * final_size_of_type;
222
2.82M
        for (int i = 0; i < padding_bytes; i++) {
223
2.66M
            _data.push_back(0);
224
2.66M
        }
225
226
        // reserve enough place for compression
227
157k
        _buffer.resize(
228
157k
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
157k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
157k
        int64_t bytes =
232
157k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
157k
                                         num_elems_after_padding, final_size_of_type, 0);
234
157k
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
157k
        encode_fixed32_le(&_buffer[0], _count);
244
157k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
157k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
157k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
157k
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
157k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
157k
        return _buffer.build();
251
157k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
215
17.0k
    OwnedSlice _finish(int final_size_of_type) {
216
17.0k
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
17.0k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
17.0k
        int padding_elems = num_elems_after_padding - _count;
221
17.0k
        int padding_bytes = padding_elems * final_size_of_type;
222
95.4k
        for (int i = 0; i < padding_bytes; i++) {
223
78.4k
            _data.push_back(0);
224
78.4k
        }
225
226
        // reserve enough place for compression
227
17.0k
        _buffer.resize(
228
17.0k
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
17.0k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
17.0k
        int64_t bytes =
232
17.0k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
17.0k
                                         num_elems_after_padding, final_size_of_type, 0);
234
17.0k
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
17.0k
        encode_fixed32_le(&_buffer[0], _count);
244
17.0k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
17.0k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
17.0k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
17.0k
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
17.0k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
17.0k
        return _buffer.build();
251
17.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
215
3.75k
    OwnedSlice _finish(int final_size_of_type) {
216
3.75k
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
3.75k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
3.75k
        int padding_elems = num_elems_after_padding - _count;
221
3.75k
        int padding_bytes = padding_elems * final_size_of_type;
222
30.3k
        for (int i = 0; i < padding_bytes; i++) {
223
26.6k
            _data.push_back(0);
224
26.6k
        }
225
226
        // reserve enough place for compression
227
3.75k
        _buffer.resize(
228
3.75k
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
3.75k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
3.75k
        int64_t bytes =
232
3.75k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
3.75k
                                         num_elems_after_padding, final_size_of_type, 0);
234
3.75k
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
3.75k
        encode_fixed32_le(&_buffer[0], _count);
244
3.75k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
3.75k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
3.75k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
3.75k
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
3.75k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
3.75k
        return _buffer.build();
251
3.75k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
215
33.4k
    OwnedSlice _finish(int final_size_of_type) {
216
33.4k
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
33.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
33.4k
        int padding_elems = num_elems_after_padding - _count;
221
33.4k
        int padding_bytes = padding_elems * final_size_of_type;
222
1.26M
        for (int i = 0; i < padding_bytes; i++) {
223
1.22M
            _data.push_back(0);
224
1.22M
        }
225
226
        // reserve enough place for compression
227
33.4k
        _buffer.resize(
228
33.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
33.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
33.4k
        int64_t bytes =
232
33.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
33.4k
                                         num_elems_after_padding, final_size_of_type, 0);
234
33.4k
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
33.4k
        encode_fixed32_le(&_buffer[0], _count);
244
33.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
33.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
33.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
33.4k
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
33.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
33.4k
        return _buffer.build();
251
33.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
215
23.0k
    OwnedSlice _finish(int final_size_of_type) {
216
23.0k
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
23.0k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
23.0k
        int padding_elems = num_elems_after_padding - _count;
221
23.0k
        int padding_bytes = padding_elems * final_size_of_type;
222
1.01M
        for (int i = 0; i < padding_bytes; i++) {
223
989k
            _data.push_back(0);
224
989k
        }
225
226
        // reserve enough place for compression
227
23.0k
        _buffer.resize(
228
23.0k
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
23.0k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
23.0k
        int64_t bytes =
232
23.0k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
23.0k
                                         num_elems_after_padding, final_size_of_type, 0);
234
23.0k
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
23.0k
        encode_fixed32_le(&_buffer[0], _count);
244
23.0k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
23.0k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
23.0k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
23.0k
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
23.0k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
23.0k
        return _buffer.build();
251
23.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
215
5.76k
    OwnedSlice _finish(int final_size_of_type) {
216
5.76k
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
5.76k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
5.76k
        int padding_elems = num_elems_after_padding - _count;
221
5.76k
        int padding_bytes = padding_elems * final_size_of_type;
222
254k
        for (int i = 0; i < padding_bytes; i++) {
223
248k
            _data.push_back(0);
224
248k
        }
225
226
        // reserve enough place for compression
227
5.76k
        _buffer.resize(
228
5.76k
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
5.76k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
5.76k
        int64_t bytes =
232
5.76k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
5.76k
                                         num_elems_after_padding, final_size_of_type, 0);
234
5.76k
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
5.76k
        encode_fixed32_le(&_buffer[0], _count);
244
5.76k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
5.76k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
5.76k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
5.76k
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
5.76k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
5.76k
        return _buffer.build();
251
5.76k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
215
3.58k
    OwnedSlice _finish(int final_size_of_type) {
216
3.58k
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
3.58k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
3.58k
        int padding_elems = num_elems_after_padding - _count;
221
3.58k
        int padding_bytes = padding_elems * final_size_of_type;
222
66.1k
        for (int i = 0; i < padding_bytes; i++) {
223
62.5k
            _data.push_back(0);
224
62.5k
        }
225
226
        // reserve enough place for compression
227
3.58k
        _buffer.resize(
228
3.58k
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
3.58k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
3.58k
        int64_t bytes =
232
3.58k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
3.58k
                                         num_elems_after_padding, final_size_of_type, 0);
234
3.58k
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
3.58k
        encode_fixed32_le(&_buffer[0], _count);
244
3.58k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
3.58k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
3.58k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
3.58k
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
3.58k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
3.58k
        return _buffer.build();
251
3.58k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
215
9.99k
    OwnedSlice _finish(int final_size_of_type) {
216
9.99k
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
9.99k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
9.99k
        int padding_elems = num_elems_after_padding - _count;
221
9.99k
        int padding_bytes = padding_elems * final_size_of_type;
222
450k
        for (int i = 0; i < padding_bytes; i++) {
223
440k
            _data.push_back(0);
224
440k
        }
225
226
        // reserve enough place for compression
227
9.99k
        _buffer.resize(
228
9.99k
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
9.99k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
9.99k
        int64_t bytes =
232
9.99k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
9.99k
                                         num_elems_after_padding, final_size_of_type, 0);
234
9.99k
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
9.99k
        encode_fixed32_le(&_buffer[0], _count);
244
9.99k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
9.99k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
9.99k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
9.99k
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
9.99k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
9.99k
        return _buffer.build();
251
9.99k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
215
139
    OwnedSlice _finish(int final_size_of_type) {
216
139
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
139
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
139
        int padding_elems = num_elems_after_padding - _count;
221
139
        int padding_bytes = padding_elems * final_size_of_type;
222
1.46k
        for (int i = 0; i < padding_bytes; i++) {
223
1.32k
            _data.push_back(0);
224
1.32k
        }
225
226
        // reserve enough place for compression
227
139
        _buffer.resize(
228
139
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
139
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
139
        int64_t bytes =
232
139
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
139
                                         num_elems_after_padding, final_size_of_type, 0);
234
139
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
139
        encode_fixed32_le(&_buffer[0], _count);
244
139
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
139
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
139
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
139
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
139
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
139
        return _buffer.build();
251
139
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
215
19.4k
    OwnedSlice _finish(int final_size_of_type) {
216
19.4k
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
19.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
19.4k
        int padding_elems = num_elems_after_padding - _count;
221
19.4k
        int padding_bytes = padding_elems * final_size_of_type;
222
312k
        for (int i = 0; i < padding_bytes; i++) {
223
293k
            _data.push_back(0);
224
293k
        }
225
226
        // reserve enough place for compression
227
19.4k
        _buffer.resize(
228
19.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
19.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
19.4k
        int64_t bytes =
232
19.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
19.4k
                                         num_elems_after_padding, final_size_of_type, 0);
234
19.4k
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
19.4k
        encode_fixed32_le(&_buffer[0], _count);
244
19.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
19.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
19.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
19.4k
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
19.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
19.4k
        return _buffer.build();
251
19.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
215
15.1k
    OwnedSlice _finish(int final_size_of_type) {
216
15.1k
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
15.1k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
15.1k
        int padding_elems = num_elems_after_padding - _count;
221
15.1k
        int padding_bytes = padding_elems * final_size_of_type;
222
544k
        for (int i = 0; i < padding_bytes; i++) {
223
529k
            _data.push_back(0);
224
529k
        }
225
226
        // reserve enough place for compression
227
15.1k
        _buffer.resize(
228
15.1k
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
15.1k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
15.1k
        int64_t bytes =
232
15.1k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
15.1k
                                         num_elems_after_padding, final_size_of_type, 0);
234
15.1k
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
15.1k
        encode_fixed32_le(&_buffer[0], _count);
244
15.1k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
15.1k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
15.1k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
15.1k
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
15.1k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
15.1k
        return _buffer.build();
251
15.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
215
385
    OwnedSlice _finish(int final_size_of_type) {
216
385
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
385
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
385
        int padding_elems = num_elems_after_padding - _count;
221
385
        int padding_bytes = padding_elems * final_size_of_type;
222
4.12k
        for (int i = 0; i < padding_bytes; i++) {
223
3.73k
            _data.push_back(0);
224
3.73k
        }
225
226
        // reserve enough place for compression
227
385
        _buffer.resize(
228
385
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
385
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
385
        int64_t bytes =
232
385
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
385
                                         num_elems_after_padding, final_size_of_type, 0);
234
385
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
385
        encode_fixed32_le(&_buffer[0], _count);
244
385
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
385
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
385
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
385
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
385
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
385
        return _buffer.build();
251
385
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
215
51
    OwnedSlice _finish(int final_size_of_type) {
216
51
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
51
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
51
        int padding_elems = num_elems_after_padding - _count;
221
51
        int padding_bytes = padding_elems * final_size_of_type;
222
2.24k
        for (int i = 0; i < padding_bytes; i++) {
223
2.19k
            _data.push_back(0);
224
2.19k
        }
225
226
        // reserve enough place for compression
227
51
        _buffer.resize(
228
51
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
51
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
51
        int64_t bytes =
232
51
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
51
                                         num_elems_after_padding, final_size_of_type, 0);
234
51
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
51
        encode_fixed32_le(&_buffer[0], _count);
244
51
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
51
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
51
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
51
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
51
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
51
        return _buffer.build();
251
51
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
215
2.99k
    OwnedSlice _finish(int final_size_of_type) {
216
2.99k
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
2.99k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
2.99k
        int padding_elems = num_elems_after_padding - _count;
221
2.99k
        int padding_bytes = padding_elems * final_size_of_type;
222
66.2k
        for (int i = 0; i < padding_bytes; i++) {
223
63.3k
            _data.push_back(0);
224
63.3k
        }
225
226
        // reserve enough place for compression
227
2.99k
        _buffer.resize(
228
2.99k
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
2.99k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
2.99k
        int64_t bytes =
232
2.99k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
2.99k
                                         num_elems_after_padding, final_size_of_type, 0);
234
2.99k
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
2.99k
        encode_fixed32_le(&_buffer[0], _count);
244
2.99k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
2.99k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
2.99k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
2.99k
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
2.99k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
2.99k
        return _buffer.build();
251
2.99k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
215
6.99k
    OwnedSlice _finish(int final_size_of_type) {
216
6.99k
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
6.99k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
6.99k
        int padding_elems = num_elems_after_padding - _count;
221
6.99k
        int padding_bytes = padding_elems * final_size_of_type;
222
254k
        for (int i = 0; i < padding_bytes; i++) {
223
247k
            _data.push_back(0);
224
247k
        }
225
226
        // reserve enough place for compression
227
6.99k
        _buffer.resize(
228
6.99k
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
6.99k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
6.99k
        int64_t bytes =
232
6.99k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
6.99k
                                         num_elems_after_padding, final_size_of_type, 0);
234
6.99k
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
6.99k
        encode_fixed32_le(&_buffer[0], _count);
244
6.99k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
6.99k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
6.99k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
6.99k
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
6.99k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
6.99k
        return _buffer.build();
251
6.99k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
215
5.91k
    OwnedSlice _finish(int final_size_of_type) {
216
5.91k
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
5.91k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
5.91k
        int padding_elems = num_elems_after_padding - _count;
221
5.91k
        int padding_bytes = padding_elems * final_size_of_type;
222
331k
        for (int i = 0; i < padding_bytes; i++) {
223
325k
            _data.push_back(0);
224
325k
        }
225
226
        // reserve enough place for compression
227
5.91k
        _buffer.resize(
228
5.91k
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
5.91k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
5.91k
        int64_t bytes =
232
5.91k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
5.91k
                                         num_elems_after_padding, final_size_of_type, 0);
234
5.91k
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
5.91k
        encode_fixed32_le(&_buffer[0], _count);
244
5.91k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
5.91k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
5.91k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
5.91k
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
5.91k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
5.91k
        return _buffer.build();
251
5.91k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE7_finishEi
Line
Count
Source
215
792
    OwnedSlice _finish(int final_size_of_type) {
216
792
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
792
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
792
        int padding_elems = num_elems_after_padding - _count;
221
792
        int padding_bytes = padding_elems * final_size_of_type;
222
118k
        for (int i = 0; i < padding_bytes; i++) {
223
117k
            _data.push_back(0);
224
117k
        }
225
226
        // reserve enough place for compression
227
792
        _buffer.resize(
228
792
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
792
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
792
        int64_t bytes =
232
792
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
792
                                         num_elems_after_padding, final_size_of_type, 0);
234
792
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
792
        encode_fixed32_le(&_buffer[0], _count);
244
792
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
792
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
792
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
792
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
792
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
792
        return _buffer.build();
251
792
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Line
Count
Source
215
448
    OwnedSlice _finish(int final_size_of_type) {
216
448
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
448
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
448
        int padding_elems = num_elems_after_padding - _count;
221
448
        int padding_bytes = padding_elems * final_size_of_type;
222
9.65k
        for (int i = 0; i < padding_bytes; i++) {
223
9.20k
            _data.push_back(0);
224
9.20k
        }
225
226
        // reserve enough place for compression
227
448
        _buffer.resize(
228
448
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
448
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
448
        int64_t bytes =
232
448
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
448
                                         num_elems_after_padding, final_size_of_type, 0);
234
448
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
448
        encode_fixed32_le(&_buffer[0], _count);
244
448
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
448
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
448
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
448
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
448
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
448
        return _buffer.build();
251
448
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
215
353
    OwnedSlice _finish(int final_size_of_type) {
216
353
        _data.resize(final_size_of_type * _count);
217
218
        // Do padding so that the input num of element is multiple of 8.
219
353
        int num_elems_after_padding = ALIGN_UP(_count, 8);
220
353
        int padding_elems = num_elems_after_padding - _count;
221
353
        int padding_bytes = padding_elems * final_size_of_type;
222
26.9k
        for (int i = 0; i < padding_bytes; i++) {
223
26.6k
            _data.push_back(0);
224
26.6k
        }
225
226
        // reserve enough place for compression
227
353
        _buffer.resize(
228
353
                BITSHUFFLE_PAGE_HEADER_SIZE +
229
353
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
230
231
353
        int64_t bytes =
232
353
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
233
353
                                         num_elems_after_padding, final_size_of_type, 0);
234
353
        if (bytes < 0) [[unlikely]] {
235
            // This means the bitshuffle function fails.
236
            // Ideally, this should not happen.
237
0
            warn_with_bitshuffle_error(bytes);
238
            // It does not matter what will be returned here,
239
            // since we have logged fatal in warn_with_bitshuffle_error().
240
0
            return OwnedSlice();
241
0
        }
242
        // update header
243
353
        encode_fixed32_le(&_buffer[0], _count);
244
353
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
245
353
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
246
353
        encode_fixed32_le(&_buffer[12], final_size_of_type);
247
353
        _finished = true;
248
        // before build(), update buffer length to the actual compressed size
249
353
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
250
353
        return _buffer.build();
251
353
    }
252
253
    using CppType = typename TypeTraits<Type>::CppType;
254
255
596k
    CppType cell(int idx) const {
256
596k
        DCHECK_GE(idx, 0);
257
596k
        CppType ret;
258
596k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
596k
        return ret;
260
596k
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4cellEi
Line
Count
Source
255
303k
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
303k
        CppType ret;
258
303k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
303k
        return ret;
260
303k
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4cellEi
Line
Count
Source
255
33.7k
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
33.7k
        CppType ret;
258
33.7k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
33.7k
        return ret;
260
33.7k
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4cellEi
Line
Count
Source
255
7.43k
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
7.43k
        CppType ret;
258
7.43k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
7.43k
        return ret;
260
7.43k
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4cellEi
Line
Count
Source
255
66.3k
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
66.3k
        CppType ret;
258
66.3k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
66.3k
        return ret;
260
66.3k
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4cellEi
Line
Count
Source
255
46.0k
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
46.0k
        CppType ret;
258
46.0k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
46.0k
        return ret;
260
46.0k
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4cellEi
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4cellEi
Line
Count
Source
255
11.2k
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
11.2k
        CppType ret;
258
11.2k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
11.2k
        return ret;
260
11.2k
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4cellEi
Line
Count
Source
255
6.99k
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
6.99k
        CppType ret;
258
6.99k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
6.99k
        return ret;
260
6.99k
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4cellEi
Line
Count
Source
255
19.7k
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
19.7k
        CppType ret;
258
19.7k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
19.7k
        return ret;
260
19.7k
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4cellEi
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4cellEi
Line
Count
Source
255
268
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
268
        CppType ret;
258
268
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
268
        return ret;
260
268
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4cellEi
Line
Count
Source
255
37.9k
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
37.9k
        CppType ret;
258
37.9k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
37.9k
        return ret;
260
37.9k
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4cellEi
Line
Count
Source
255
28.9k
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
28.9k
        CppType ret;
258
28.9k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
28.9k
        return ret;
260
28.9k
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4cellEi
Line
Count
Source
255
570
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
570
        CppType ret;
258
570
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
570
        return ret;
260
570
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4cellEi
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4cellEi
Line
Count
Source
255
94
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
94
        CppType ret;
258
94
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
94
        return ret;
260
94
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4cellEi
Line
Count
Source
255
5.72k
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
5.72k
        CppType ret;
258
5.72k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
5.72k
        return ret;
260
5.72k
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4cellEi
Line
Count
Source
255
13.5k
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
13.5k
        CppType ret;
258
13.5k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
13.5k
        return ret;
260
13.5k
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4cellEi
Line
Count
Source
255
11.6k
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
11.6k
        CppType ret;
258
11.6k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
11.6k
        return ret;
260
11.6k
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4cellEi
Line
Count
Source
255
1.48k
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
1.48k
        CppType ret;
258
1.48k
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
1.48k
        return ret;
260
1.48k
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4cellEi
Line
Count
Source
255
876
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
876
        CppType ret;
258
876
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
876
        return ret;
260
876
    }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4cellEi
Line
Count
Source
255
662
    CppType cell(int idx) const {
256
        DCHECK_GE(idx, 0);
257
662
        CppType ret;
258
662
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
259
662
        return ret;
260
662
    }
261
262
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
263
    PageBuilderOptions _options;
264
    uint32_t _count;
265
    uint32_t _remain_element_capacity;
266
    bool _finished;
267
    faststring _data;
268
    faststring _buffer;
269
    CppType _first_value;
270
    CppType _last_value;
271
    uint64_t _raw_data_size = 0;
272
};
273
274
inline Status parse_bit_shuffle_header(const Slice& data, size_t& num_elements,
275
                                       size_t& compressed_size, size_t& num_element_after_padding,
276
568k
                                       int& size_of_element) {
277
568k
    if (data.size < BITSHUFFLE_PAGE_HEADER_SIZE) {
278
0
        return Status::InternalError("file corruption: invalid data size:{}, header size:{}",
279
0
                                     data.size, BITSHUFFLE_PAGE_HEADER_SIZE);
280
0
    }
281
282
568k
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
283
568k
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
284
568k
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
285
568k
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
286
568k
    if (num_element_after_padding != ALIGN_UP(num_elements, 8)) {
287
0
        return Status::InternalError(
288
0
                "num of element information corrupted,"
289
0
                " _num_element_after_padding:{}, _num_elements:{}, expected_padding:{},"
290
0
                " compressed_size:{}, size_of_element:{}, data_size:{}",
291
0
                num_element_after_padding, num_elements, ALIGN_UP(num_elements, 8), compressed_size,
292
0
                size_of_element, data.size);
293
0
    }
294
568k
    switch (size_of_element) {
295
34.4k
    case 1:
296
40.0k
    case 2:
297
42.4k
    case 3:
298
394k
    case 4:
299
537k
    case 8:
300
537k
    case 12:
301
568k
    case 16:
302
568k
    case 32:
303
568k
        break;
304
0
    default:
305
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
306
568k
    }
307
568k
    return Status::OK();
308
568k
}
309
310
template <FieldType Type>
311
class BitShufflePageDecoder : public PageDecoder {
312
public:
313
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
314
368k
            : _data(data),
315
368k
              _options(options),
316
368k
              _parsed(false),
317
368k
              _num_elements(0),
318
368k
              _num_element_after_padding(0),
319
368k
              _size_of_element(0),
320
368k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
191k
            : _data(data),
315
191k
              _options(options),
316
191k
              _parsed(false),
317
191k
              _num_elements(0),
318
191k
              _num_element_after_padding(0),
319
191k
              _size_of_element(0),
320
191k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
23.8k
            : _data(data),
315
23.8k
              _options(options),
316
23.8k
              _parsed(false),
317
23.8k
              _num_elements(0),
318
23.8k
              _num_element_after_padding(0),
319
23.8k
              _size_of_element(0),
320
23.8k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
3.23k
            : _data(data),
315
3.23k
              _options(options),
316
3.23k
              _parsed(false),
317
3.23k
              _num_elements(0),
318
3.23k
              _num_element_after_padding(0),
319
3.23k
              _size_of_element(0),
320
3.23k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
13.0k
            : _data(data),
315
13.0k
              _options(options),
316
13.0k
              _parsed(false),
317
13.0k
              _num_elements(0),
318
13.0k
              _num_element_after_padding(0),
319
13.0k
              _size_of_element(0),
320
13.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
24.9k
            : _data(data),
315
24.9k
              _options(options),
316
24.9k
              _parsed(false),
317
24.9k
              _num_elements(0),
318
24.9k
              _num_element_after_padding(0),
319
24.9k
              _size_of_element(0),
320
24.9k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
4.75k
            : _data(data),
315
4.75k
              _options(options),
316
4.75k
              _parsed(false),
317
4.75k
              _num_elements(0),
318
4.75k
              _num_element_after_padding(0),
319
4.75k
              _size_of_element(0),
320
4.75k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
7.17k
            : _data(data),
315
7.17k
              _options(options),
316
7.17k
              _parsed(false),
317
7.17k
              _num_elements(0),
318
7.17k
              _num_element_after_padding(0),
319
7.17k
              _size_of_element(0),
320
7.17k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
12.6k
            : _data(data),
315
12.6k
              _options(options),
316
12.6k
              _parsed(false),
317
12.6k
              _num_elements(0),
318
12.6k
              _num_element_after_padding(0),
319
12.6k
              _size_of_element(0),
320
12.6k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
1.70k
            : _data(data),
315
1.70k
              _options(options),
316
1.70k
              _parsed(false),
317
1.70k
              _num_elements(0),
318
1.70k
              _num_element_after_padding(0),
319
1.70k
              _size_of_element(0),
320
1.70k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
19.0k
            : _data(data),
315
19.0k
              _options(options),
316
19.0k
              _parsed(false),
317
19.0k
              _num_elements(0),
318
19.0k
              _num_element_after_padding(0),
319
19.0k
              _size_of_element(0),
320
19.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
29.8k
            : _data(data),
315
29.8k
              _options(options),
316
29.8k
              _parsed(false),
317
29.8k
              _num_elements(0),
318
29.8k
              _num_element_after_padding(0),
319
29.8k
              _size_of_element(0),
320
29.8k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
2.46k
            : _data(data),
315
2.46k
              _options(options),
316
2.46k
              _parsed(false),
317
2.46k
              _num_elements(0),
318
2.46k
              _num_element_after_padding(0),
319
2.46k
              _size_of_element(0),
320
2.46k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
45
            : _data(data),
315
45
              _options(options),
316
45
              _parsed(false),
317
45
              _num_elements(0),
318
45
              _num_element_after_padding(0),
319
45
              _size_of_element(0),
320
45
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
5.24k
            : _data(data),
315
5.24k
              _options(options),
316
5.24k
              _parsed(false),
317
5.24k
              _num_elements(0),
318
5.24k
              _num_element_after_padding(0),
319
5.24k
              _size_of_element(0),
320
5.24k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
12.1k
            : _data(data),
315
12.1k
              _options(options),
316
12.1k
              _parsed(false),
317
12.1k
              _num_elements(0),
318
12.1k
              _num_element_after_padding(0),
319
12.1k
              _size_of_element(0),
320
12.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
15.7k
            : _data(data),
315
15.7k
              _options(options),
316
15.7k
              _parsed(false),
317
15.7k
              _num_elements(0),
318
15.7k
              _num_element_after_padding(0),
319
15.7k
              _size_of_element(0),
320
15.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
190
            : _data(data),
315
190
              _options(options),
316
190
              _parsed(false),
317
190
              _num_elements(0),
318
190
              _num_element_after_padding(0),
319
190
              _size_of_element(0),
320
190
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
437
            : _data(data),
315
437
              _options(options),
316
437
              _parsed(false),
317
437
              _num_elements(0),
318
437
              _num_element_after_padding(0),
319
437
              _size_of_element(0),
320
437
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
314
288
            : _data(data),
315
288
              _options(options),
316
288
              _parsed(false),
317
288
              _num_elements(0),
318
288
              _num_element_after_padding(0),
319
288
              _size_of_element(0),
320
288
              _cur_index(0) {}
321
322
368k
    Status init() override {
323
368k
        CHECK(!_parsed);
324
368k
        size_t unused;
325
368k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
368k
                                                 _num_element_after_padding, _size_of_element));
327
328
368k
        if (_data.size !=
329
368k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
368k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
368k
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
368k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
368k
        _parsed = true;
349
368k
        return Status::OK();
350
368k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
322
191k
    Status init() override {
323
191k
        CHECK(!_parsed);
324
191k
        size_t unused;
325
191k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
191k
                                                 _num_element_after_padding, _size_of_element));
327
328
191k
        if (_data.size !=
329
191k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
191k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
191k
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
191k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
191k
        _parsed = true;
349
191k
        return Status::OK();
350
191k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
322
23.8k
    Status init() override {
323
23.8k
        CHECK(!_parsed);
324
23.8k
        size_t unused;
325
23.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
23.8k
                                                 _num_element_after_padding, _size_of_element));
327
328
23.8k
        if (_data.size !=
329
23.8k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
23.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
23.8k
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
23.8k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
23.8k
        _parsed = true;
349
23.8k
        return Status::OK();
350
23.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
322
3.23k
    Status init() override {
323
3.23k
        CHECK(!_parsed);
324
3.23k
        size_t unused;
325
3.23k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
3.23k
                                                 _num_element_after_padding, _size_of_element));
327
328
3.23k
        if (_data.size !=
329
3.23k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
3.23k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
3.23k
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
3.23k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
3.23k
        _parsed = true;
349
3.23k
        return Status::OK();
350
3.23k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
322
13.0k
    Status init() override {
323
13.0k
        CHECK(!_parsed);
324
13.0k
        size_t unused;
325
13.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
13.0k
                                                 _num_element_after_padding, _size_of_element));
327
328
13.0k
        if (_data.size !=
329
13.0k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
13.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
13.0k
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
13.0k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
13.0k
        _parsed = true;
349
13.0k
        return Status::OK();
350
13.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
322
24.9k
    Status init() override {
323
24.9k
        CHECK(!_parsed);
324
24.9k
        size_t unused;
325
24.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
24.9k
                                                 _num_element_after_padding, _size_of_element));
327
328
24.9k
        if (_data.size !=
329
24.9k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
24.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
24.9k
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
24.9k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
24.9k
        _parsed = true;
349
24.9k
        return Status::OK();
350
24.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
322
4.75k
    Status init() override {
323
4.75k
        CHECK(!_parsed);
324
4.75k
        size_t unused;
325
4.75k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
4.75k
                                                 _num_element_after_padding, _size_of_element));
327
328
4.75k
        if (_data.size !=
329
4.75k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
4.75k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
4.75k
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
4.75k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
4.75k
        _parsed = true;
349
4.75k
        return Status::OK();
350
4.75k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
322
7.17k
    Status init() override {
323
7.17k
        CHECK(!_parsed);
324
7.17k
        size_t unused;
325
7.17k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
7.17k
                                                 _num_element_after_padding, _size_of_element));
327
328
7.17k
        if (_data.size !=
329
7.17k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
7.17k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
7.17k
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
7.17k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
7.17k
        _parsed = true;
349
7.17k
        return Status::OK();
350
7.17k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
322
12.6k
    Status init() override {
323
12.6k
        CHECK(!_parsed);
324
12.6k
        size_t unused;
325
12.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
12.6k
                                                 _num_element_after_padding, _size_of_element));
327
328
12.6k
        if (_data.size !=
329
12.6k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
12.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
12.6k
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
12.6k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
12.6k
        _parsed = true;
349
12.6k
        return Status::OK();
350
12.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
322
1.70k
    Status init() override {
323
1.70k
        CHECK(!_parsed);
324
1.70k
        size_t unused;
325
1.70k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
1.70k
                                                 _num_element_after_padding, _size_of_element));
327
328
1.70k
        if (_data.size !=
329
1.70k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
1.70k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
1.70k
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
1.70k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
1.70k
        _parsed = true;
349
1.70k
        return Status::OK();
350
1.70k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
322
19.0k
    Status init() override {
323
19.0k
        CHECK(!_parsed);
324
19.0k
        size_t unused;
325
19.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
19.0k
                                                 _num_element_after_padding, _size_of_element));
327
328
19.0k
        if (_data.size !=
329
19.0k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
19.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
19.0k
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
19.0k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
19.0k
        _parsed = true;
349
19.0k
        return Status::OK();
350
19.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
322
29.8k
    Status init() override {
323
29.8k
        CHECK(!_parsed);
324
29.8k
        size_t unused;
325
29.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
29.8k
                                                 _num_element_after_padding, _size_of_element));
327
328
29.8k
        if (_data.size !=
329
29.8k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
29.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
29.8k
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
29.8k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
29.8k
        _parsed = true;
349
29.8k
        return Status::OK();
350
29.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
322
2.46k
    Status init() override {
323
2.46k
        CHECK(!_parsed);
324
2.46k
        size_t unused;
325
2.46k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
2.46k
                                                 _num_element_after_padding, _size_of_element));
327
328
2.46k
        if (_data.size !=
329
2.46k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
2.46k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
2.46k
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
2.46k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
2.46k
        _parsed = true;
349
2.46k
        return Status::OK();
350
2.46k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
322
45
    Status init() override {
323
45
        CHECK(!_parsed);
324
45
        size_t unused;
325
45
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
45
                                                 _num_element_after_padding, _size_of_element));
327
328
45
        if (_data.size !=
329
45
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
45
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
45
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
45
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
45
        _parsed = true;
349
45
        return Status::OK();
350
45
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
322
5.23k
    Status init() override {
323
5.23k
        CHECK(!_parsed);
324
5.23k
        size_t unused;
325
5.23k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
5.23k
                                                 _num_element_after_padding, _size_of_element));
327
328
5.23k
        if (_data.size !=
329
5.23k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
5.23k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
5.23k
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
5.23k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
5.23k
        _parsed = true;
349
5.23k
        return Status::OK();
350
5.23k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
322
12.1k
    Status init() override {
323
12.1k
        CHECK(!_parsed);
324
12.1k
        size_t unused;
325
12.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
12.1k
                                                 _num_element_after_padding, _size_of_element));
327
328
12.1k
        if (_data.size !=
329
12.1k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
12.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
12.1k
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
12.1k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
12.1k
        _parsed = true;
349
12.1k
        return Status::OK();
350
12.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
322
15.7k
    Status init() override {
323
15.7k
        CHECK(!_parsed);
324
15.7k
        size_t unused;
325
15.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
15.7k
                                                 _num_element_after_padding, _size_of_element));
327
328
15.7k
        if (_data.size !=
329
15.7k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
15.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
15.7k
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
15.7k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
15.7k
        _parsed = true;
349
15.7k
        return Status::OK();
350
15.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
322
190
    Status init() override {
323
190
        CHECK(!_parsed);
324
190
        size_t unused;
325
190
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
190
                                                 _num_element_after_padding, _size_of_element));
327
328
190
        if (_data.size !=
329
190
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
190
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
190
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
190
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
190
        _parsed = true;
349
190
        return Status::OK();
350
190
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
322
437
    Status init() override {
323
437
        CHECK(!_parsed);
324
437
        size_t unused;
325
437
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
437
                                                 _num_element_after_padding, _size_of_element));
327
328
437
        if (_data.size !=
329
437
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
437
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
437
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
437
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
437
        _parsed = true;
349
437
        return Status::OK();
350
437
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
322
288
    Status init() override {
323
288
        CHECK(!_parsed);
324
288
        size_t unused;
325
288
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
326
288
                                                 _num_element_after_padding, _size_of_element));
327
328
288
        if (_data.size !=
329
288
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
330
0
            std::stringstream ss;
331
0
            ss << "Size information unmatched, _data.size:" << _data.size
332
0
               << ", _num_elements:" << _num_elements << ", expected size is "
333
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
334
0
            return Status::InternalError(ss.str());
335
0
        }
336
337
        // Currently, only the UINT32 block encoder supports expanding size:
338
288
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
339
288
                     _size_of_element != SIZE_OF_TYPE)) {
340
0
            return Status::InternalError(
341
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
342
0
                    _size_of_element, SIZE_OF_TYPE, Type);
343
0
        }
344
288
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
345
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
346
0
                                         _size_of_element, SIZE_OF_TYPE);
347
0
        }
348
288
        _parsed = true;
349
288
        return Status::OK();
350
288
    }
351
352
    // If the page only contains null, then _num_elements == 0, and the nullmap has
353
    // some value. But in _seek_columns --> seek_to_ordinal --> _seek_to_pos_in_page
354
    // in this call stack it will pass pos == 0 to this method. Although we can add some
355
    // code such as check if the count == 0, then skip seek, but there are other method such
356
    // as init will also call seek with pos == 0. And the seek is useless when _num_elements
357
    // == 0, because next batch will return empty in this method.
358
1.17M
    Status seek_to_position_in_page(size_t pos) override {
359
18.4E
        DCHECK(_parsed) << "Must call init()";
360
1.17M
        if (_num_elements == 0) [[unlikely]] {
361
1.32k
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
1.32k
        }
366
367
1.17M
        DCHECK_LE(pos, _num_elements);
368
1.17M
        _cur_index = pos;
369
1.17M
        return Status::OK();
370
1.17M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
358
946k
    Status seek_to_position_in_page(size_t pos) override {
359
18.4E
        DCHECK(_parsed) << "Must call init()";
360
946k
        if (_num_elements == 0) [[unlikely]] {
361
1.30k
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
1.30k
        }
366
367
946k
        DCHECK_LE(pos, _num_elements);
368
946k
        _cur_index = pos;
369
946k
        return Status::OK();
370
946k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
358
49.1k
    Status seek_to_position_in_page(size_t pos) override {
359
49.1k
        DCHECK(_parsed) << "Must call init()";
360
49.1k
        if (_num_elements == 0) [[unlikely]] {
361
0
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
0
        }
366
367
49.1k
        DCHECK_LE(pos, _num_elements);
368
49.1k
        _cur_index = pos;
369
49.1k
        return Status::OK();
370
49.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
358
263
    Status seek_to_position_in_page(size_t pos) override {
359
263
        DCHECK(_parsed) << "Must call init()";
360
263
        if (_num_elements == 0) [[unlikely]] {
361
0
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
0
        }
366
367
263
        DCHECK_LE(pos, _num_elements);
368
263
        _cur_index = pos;
369
263
        return Status::OK();
370
263
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
358
9.95k
    Status seek_to_position_in_page(size_t pos) override {
359
18.4E
        DCHECK(_parsed) << "Must call init()";
360
9.95k
        if (_num_elements == 0) [[unlikely]] {
361
16
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
16
        }
366
367
9.95k
        DCHECK_LE(pos, _num_elements);
368
9.95k
        _cur_index = pos;
369
9.95k
        return Status::OK();
370
9.95k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
358
4.76k
    Status seek_to_position_in_page(size_t pos) override {
359
18.4E
        DCHECK(_parsed) << "Must call init()";
360
4.76k
        if (_num_elements == 0) [[unlikely]] {
361
0
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
0
        }
366
367
4.76k
        DCHECK_LE(pos, _num_elements);
368
4.76k
        _cur_index = pos;
369
4.76k
        return Status::OK();
370
4.76k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
358
1.18k
    Status seek_to_position_in_page(size_t pos) override {
359
1.18k
        DCHECK(_parsed) << "Must call init()";
360
1.18k
        if (_num_elements == 0) [[unlikely]] {
361
0
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
0
        }
366
367
1.18k
        DCHECK_LE(pos, _num_elements);
368
1.18k
        _cur_index = pos;
369
1.18k
        return Status::OK();
370
1.18k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
358
16.1k
    Status seek_to_position_in_page(size_t pos) override {
359
16.1k
        DCHECK(_parsed) << "Must call init()";
360
16.1k
        if (_num_elements == 0) [[unlikely]] {
361
0
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
0
        }
366
367
16.1k
        DCHECK_LE(pos, _num_elements);
368
16.1k
        _cur_index = pos;
369
16.1k
        return Status::OK();
370
16.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
358
12.1k
    Status seek_to_position_in_page(size_t pos) override {
359
12.1k
        DCHECK(_parsed) << "Must call init()";
360
12.1k
        if (_num_elements == 0) [[unlikely]] {
361
0
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
0
        }
366
367
12.1k
        DCHECK_LE(pos, _num_elements);
368
12.1k
        _cur_index = pos;
369
12.1k
        return Status::OK();
370
12.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
358
8.41k
    Status seek_to_position_in_page(size_t pos) override {
359
8.41k
        DCHECK(_parsed) << "Must call init()";
360
8.41k
        if (_num_elements == 0) [[unlikely]] {
361
0
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
0
        }
366
367
8.41k
        DCHECK_LE(pos, _num_elements);
368
8.41k
        _cur_index = pos;
369
8.41k
        return Status::OK();
370
8.41k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
358
66.7k
    Status seek_to_position_in_page(size_t pos) override {
359
18.4E
        DCHECK(_parsed) << "Must call init()";
360
66.7k
        if (_num_elements == 0) [[unlikely]] {
361
1
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
1
        }
366
367
66.7k
        DCHECK_LE(pos, _num_elements);
368
66.7k
        _cur_index = pos;
369
66.7k
        return Status::OK();
370
66.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
358
41.2k
    Status seek_to_position_in_page(size_t pos) override {
359
18.4E
        DCHECK(_parsed) << "Must call init()";
360
41.2k
        if (_num_elements == 0) [[unlikely]] {
361
3
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
3
        }
366
367
41.2k
        DCHECK_LE(pos, _num_elements);
368
41.2k
        _cur_index = pos;
369
41.2k
        return Status::OK();
370
41.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
358
6.49k
    Status seek_to_position_in_page(size_t pos) override {
359
6.49k
        DCHECK(_parsed) << "Must call init()";
360
6.49k
        if (_num_elements == 0) [[unlikely]] {
361
0
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
0
        }
366
367
6.49k
        DCHECK_LE(pos, _num_elements);
368
6.49k
        _cur_index = pos;
369
6.49k
        return Status::OK();
370
6.49k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
Line
Count
Source
358
1
    Status seek_to_position_in_page(size_t pos) override {
359
1
        DCHECK(_parsed) << "Must call init()";
360
1
        if (_num_elements == 0) [[unlikely]] {
361
0
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
0
        }
366
367
1
        DCHECK_LE(pos, _num_elements);
368
1
        _cur_index = pos;
369
1
        return Status::OK();
370
1
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Line
Count
Source
358
245
    Status seek_to_position_in_page(size_t pos) override {
359
245
        DCHECK(_parsed) << "Must call init()";
360
245
        if (_num_elements == 0) [[unlikely]] {
361
2
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
2
        }
366
367
245
        DCHECK_LE(pos, _num_elements);
368
245
        _cur_index = pos;
369
245
        return Status::OK();
370
245
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
358
7.95k
    Status seek_to_position_in_page(size_t pos) override {
359
7.95k
        DCHECK(_parsed) << "Must call init()";
360
7.95k
        if (_num_elements == 0) [[unlikely]] {
361
0
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
0
        }
366
367
7.95k
        DCHECK_LE(pos, _num_elements);
368
7.95k
        _cur_index = pos;
369
7.95k
        return Status::OK();
370
7.95k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Line
Count
Source
358
8.31k
    Status seek_to_position_in_page(size_t pos) override {
359
8.31k
        DCHECK(_parsed) << "Must call init()";
360
8.31k
        if (_num_elements == 0) [[unlikely]] {
361
0
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
0
        }
366
367
8.31k
        DCHECK_LE(pos, _num_elements);
368
8.31k
        _cur_index = pos;
369
8.31k
        return Status::OK();
370
8.31k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE24seek_to_position_in_pageEm
Line
Count
Source
358
44
    Status seek_to_position_in_page(size_t pos) override {
359
44
        DCHECK(_parsed) << "Must call init()";
360
44
        if (_num_elements == 0) [[unlikely]] {
361
0
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
0
        }
366
367
44
        DCHECK_LE(pos, _num_elements);
368
44
        _cur_index = pos;
369
44
        return Status::OK();
370
44
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE24seek_to_position_in_pageEm
Line
Count
Source
358
67
    Status seek_to_position_in_page(size_t pos) override {
359
67
        DCHECK(_parsed) << "Must call init()";
360
67
        if (_num_elements == 0) [[unlikely]] {
361
0
            if (pos != 0) {
362
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
363
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
364
0
            }
365
0
        }
366
367
67
        DCHECK_LE(pos, _num_elements);
368
67
        _cur_index = pos;
369
67
        return Status::OK();
370
67
    }
371
372
0
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
373
0
        DCHECK(_parsed) << "Must call init() firstly";
374
375
0
        if (_num_elements == 0) {
376
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
377
0
        }
378
379
0
        size_t left = 0;
380
0
        size_t right = _num_elements;
381
382
0
        void* mid_value = nullptr;
383
384
        // find the first value >= target. after loop,
385
        // - left == index of first value >= target when found
386
        // - left == _num_elements when not found (all values < target)
387
0
        while (left < right) {
388
0
            size_t mid = left + (right - left) / 2;
389
0
            mid_value = get_data(mid);
390
0
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
391
0
                left = mid + 1;
392
0
            } else {
393
0
                right = mid;
394
0
            }
395
0
        }
396
0
        if (left >= _num_elements) {
397
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
398
0
        }
399
0
        void* find_value = get_data(left);
400
0
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
401
0
            *exact_match = true;
402
0
        } else {
403
0
            *exact_match = false;
404
0
        }
405
406
0
        _cur_index = left;
407
0
        return Status::OK();
408
0
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE22seek_at_or_after_valueEPKvPb
409
410
    template <bool forward_index = true>
411
484k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
484k
        DCHECK(_parsed);
413
484k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
484k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
484k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
484k
        *n = max_fetch;
422
484k
        if constexpr (forward_index) {
423
402k
            _cur_index += max_fetch;
424
402k
        }
425
426
484k
        return Status::OK();
427
484k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
76.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
76.9k
        DCHECK(_parsed);
413
76.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
76.9k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
76.9k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
76.9k
        *n = max_fetch;
422
76.9k
        if constexpr (forward_index) {
423
76.9k
            _cur_index += max_fetch;
424
76.9k
        }
425
426
76.9k
        return Status::OK();
427
76.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
97.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
97.5k
        DCHECK(_parsed);
413
97.5k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
97.5k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
97.5k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
97.5k
        *n = max_fetch;
422
97.5k
        if constexpr (forward_index) {
423
97.5k
            _cur_index += max_fetch;
424
97.5k
        }
425
426
97.5k
        return Status::OK();
427
97.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
2.90k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
2.90k
        DCHECK(_parsed);
413
2.90k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
2.90k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
2.90k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
2.90k
        *n = max_fetch;
422
2.90k
        if constexpr (forward_index) {
423
2.90k
            _cur_index += max_fetch;
424
2.90k
        }
425
426
2.90k
        return Status::OK();
427
2.90k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
21.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
21.2k
        DCHECK(_parsed);
413
21.2k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
21.2k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
21.2k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
21.2k
        *n = max_fetch;
422
21.2k
        if constexpr (forward_index) {
423
21.2k
            _cur_index += max_fetch;
424
21.2k
        }
425
426
21.2k
        return Status::OK();
427
21.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
53.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
53.6k
        DCHECK(_parsed);
413
53.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
53.6k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
53.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
53.6k
        *n = max_fetch;
422
53.6k
        if constexpr (forward_index) {
423
53.6k
            _cur_index += max_fetch;
424
53.6k
        }
425
426
53.6k
        return Status::OK();
427
53.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
81.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
81.8k
        DCHECK(_parsed);
413
81.8k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
81.8k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
81.8k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
81.8k
        *n = max_fetch;
422
        if constexpr (forward_index) {
423
            _cur_index += max_fetch;
424
        }
425
426
81.8k
        return Status::OK();
427
81.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
4.14k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
4.14k
        DCHECK(_parsed);
413
4.14k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
4.14k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
4.14k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
4.14k
        *n = max_fetch;
422
4.14k
        if constexpr (forward_index) {
423
4.14k
            _cur_index += max_fetch;
424
4.14k
        }
425
426
4.14k
        return Status::OK();
427
4.14k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
5.29k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
5.29k
        DCHECK(_parsed);
413
5.29k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
5.29k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
5.29k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
5.29k
        *n = max_fetch;
422
5.29k
        if constexpr (forward_index) {
423
5.29k
            _cur_index += max_fetch;
424
5.29k
        }
425
426
5.29k
        return Status::OK();
427
5.29k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
7.66k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
7.66k
        DCHECK(_parsed);
413
7.66k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
7.66k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
7.66k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
7.66k
        *n = max_fetch;
422
7.66k
        if constexpr (forward_index) {
423
7.66k
            _cur_index += max_fetch;
424
7.66k
        }
425
426
7.66k
        return Status::OK();
427
7.66k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
895
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
895
        DCHECK(_parsed);
413
895
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
895
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
895
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
895
        *n = max_fetch;
422
895
        if constexpr (forward_index) {
423
895
            _cur_index += max_fetch;
424
895
        }
425
426
895
        return Status::OK();
427
895
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
69.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
69.2k
        DCHECK(_parsed);
413
69.2k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
69.2k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
69.2k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
69.2k
        *n = max_fetch;
422
69.2k
        if constexpr (forward_index) {
423
69.2k
            _cur_index += max_fetch;
424
69.2k
        }
425
426
69.2k
        return Status::OK();
427
69.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
44.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
44.9k
        DCHECK(_parsed);
413
44.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
44.9k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
44.9k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
44.9k
        *n = max_fetch;
422
44.9k
        if constexpr (forward_index) {
423
44.9k
            _cur_index += max_fetch;
424
44.9k
        }
425
426
44.9k
        return Status::OK();
427
44.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
1.23k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
1.23k
        DCHECK(_parsed);
413
1.23k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
1.23k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
1.23k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
1.23k
        *n = max_fetch;
422
1.23k
        if constexpr (forward_index) {
423
1.23k
            _cur_index += max_fetch;
424
1.23k
        }
425
426
1.23k
        return Status::OK();
427
1.23k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
41
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
41
        DCHECK(_parsed);
413
41
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
41
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
41
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
41
        *n = max_fetch;
422
41
        if constexpr (forward_index) {
423
41
            _cur_index += max_fetch;
424
41
        }
425
426
41
        return Status::OK();
427
41
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
3.75k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
3.75k
        DCHECK(_parsed);
413
3.75k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
3.75k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
3.75k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
3.75k
        *n = max_fetch;
422
3.75k
        if constexpr (forward_index) {
423
3.75k
            _cur_index += max_fetch;
424
3.75k
        }
425
426
3.75k
        return Status::OK();
427
3.75k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
2.67k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
2.67k
        DCHECK(_parsed);
413
2.67k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
2.67k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
2.67k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
2.67k
        *n = max_fetch;
422
2.67k
        if constexpr (forward_index) {
423
2.67k
            _cur_index += max_fetch;
424
2.67k
        }
425
426
2.67k
        return Status::OK();
427
2.67k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
10.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
10.1k
        DCHECK(_parsed);
413
10.1k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
10.1k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
10.1k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
10.1k
        *n = max_fetch;
422
10.1k
        if constexpr (forward_index) {
423
10.1k
            _cur_index += max_fetch;
424
10.1k
        }
425
426
10.1k
        return Status::OK();
427
10.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
113
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
113
        DCHECK(_parsed);
413
113
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
113
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
113
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
113
        *n = max_fetch;
422
113
        if constexpr (forward_index) {
423
113
            _cur_index += max_fetch;
424
113
        }
425
426
113
        return Status::OK();
427
113
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
227
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
227
        DCHECK(_parsed);
413
227
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
227
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
227
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
227
        *n = max_fetch;
422
227
        if constexpr (forward_index) {
423
227
            _cur_index += max_fetch;
424
227
        }
425
426
227
        return Status::OK();
427
227
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
411
182
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
412
182
        DCHECK(_parsed);
413
182
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
414
0
            *n = 0;
415
0
            return Status::OK();
416
0
        }
417
418
182
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
419
420
182
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
421
182
        *n = max_fetch;
422
182
        if constexpr (forward_index) {
423
182
            _cur_index += max_fetch;
424
182
        }
425
426
182
        return Status::OK();
427
182
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
428
429
403k
    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
429
76.9k
    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
429
97.8k
    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
429
2.90k
    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
429
21.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
429
53.5k
    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_9FieldTypeE9EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
429
4.14k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
429
5.29k
    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
429
7.66k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
429
895
    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
429
69.2k
    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
429
44.9k
    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
429
1.24k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
429
41
    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
429
3.75k
    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
429
2.67k
    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
429
10.1k
    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
429
113
    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
429
227
    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
429
182
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
430
431
    Status read_by_rowids(const rowid_t* rowids, ordinal_t page_first_ordinal, size_t* n,
432
120k
                          MutableColumnPtr& dst) override {
433
120k
        DCHECK(_parsed);
434
120k
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
120k
        auto total = *n;
440
120k
        auto read_count = 0;
441
120k
        _buffer.resize(total);
442
37.6M
        for (size_t i = 0; i < total; ++i) {
443
37.5M
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
37.5M
            if (UNLIKELY(ord >= _num_elements)) {
445
4.32k
                break;
446
4.32k
            }
447
448
37.5M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
37.5M
        }
450
451
120k
        if (LIKELY(read_count > 0)) {
452
120k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
120k
        }
454
455
120k
        *n = read_count;
456
120k
        return Status::OK();
457
120k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
25.7k
                          MutableColumnPtr& dst) override {
433
25.7k
        DCHECK(_parsed);
434
25.7k
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
25.7k
        auto total = *n;
440
25.7k
        auto read_count = 0;
441
25.7k
        _buffer.resize(total);
442
2.93M
        for (size_t i = 0; i < total; ++i) {
443
2.90M
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
2.90M
            if (UNLIKELY(ord >= _num_elements)) {
445
9
                break;
446
9
            }
447
448
2.90M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
2.90M
        }
450
451
25.7k
        if (LIKELY(read_count > 0)) {
452
25.7k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
25.7k
        }
454
455
25.7k
        *n = read_count;
456
25.7k
        return Status::OK();
457
25.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
7.85k
                          MutableColumnPtr& dst) override {
433
7.85k
        DCHECK(_parsed);
434
7.85k
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
7.85k
        auto total = *n;
440
7.85k
        auto read_count = 0;
441
7.85k
        _buffer.resize(total);
442
844k
        for (size_t i = 0; i < total; ++i) {
443
836k
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
836k
            if (UNLIKELY(ord >= _num_elements)) {
445
0
                break;
446
0
            }
447
448
836k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
836k
        }
450
451
7.85k
        if (LIKELY(read_count > 0)) {
452
7.85k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
7.85k
        }
454
455
7.85k
        *n = read_count;
456
7.85k
        return Status::OK();
457
7.85k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
1.42k
                          MutableColumnPtr& dst) override {
433
1.42k
        DCHECK(_parsed);
434
1.42k
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
1.42k
        auto total = *n;
440
1.42k
        auto read_count = 0;
441
1.42k
        _buffer.resize(total);
442
6.15k
        for (size_t i = 0; i < total; ++i) {
443
4.73k
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
4.73k
            if (UNLIKELY(ord >= _num_elements)) {
445
0
                break;
446
0
            }
447
448
4.73k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
4.73k
        }
450
451
1.42k
        if (LIKELY(read_count > 0)) {
452
1.42k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
1.42k
        }
454
455
1.42k
        *n = read_count;
456
1.42k
        return Status::OK();
457
1.42k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
8.31k
                          MutableColumnPtr& dst) override {
433
8.31k
        DCHECK(_parsed);
434
8.31k
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
8.31k
        auto total = *n;
440
8.31k
        auto read_count = 0;
441
8.31k
        _buffer.resize(total);
442
1.52M
        for (size_t i = 0; i < total; ++i) {
443
1.52M
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
1.52M
            if (UNLIKELY(ord >= _num_elements)) {
445
368
                break;
446
368
            }
447
448
1.52M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
1.52M
        }
450
451
8.31k
        if (LIKELY(read_count > 0)) {
452
8.31k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
8.31k
        }
454
455
8.31k
        *n = read_count;
456
8.31k
        return Status::OK();
457
8.31k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
6.97k
                          MutableColumnPtr& dst) override {
433
6.97k
        DCHECK(_parsed);
434
6.97k
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
6.97k
        auto total = *n;
440
6.97k
        auto read_count = 0;
441
6.97k
        _buffer.resize(total);
442
493k
        for (size_t i = 0; i < total; ++i) {
443
486k
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
486k
            if (UNLIKELY(ord >= _num_elements)) {
445
0
                break;
446
0
            }
447
448
486k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
486k
        }
450
451
6.97k
        if (LIKELY(read_count > 0)) {
452
6.97k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
6.97k
        }
454
455
6.97k
        *n = read_count;
456
6.97k
        return Status::OK();
457
6.97k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
1.74k
                          MutableColumnPtr& dst) override {
433
1.74k
        DCHECK(_parsed);
434
1.74k
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
1.74k
        auto total = *n;
440
1.74k
        auto read_count = 0;
441
1.74k
        _buffer.resize(total);
442
4.64k
        for (size_t i = 0; i < total; ++i) {
443
2.89k
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
2.89k
            if (UNLIKELY(ord >= _num_elements)) {
445
0
                break;
446
0
            }
447
448
2.89k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
2.89k
        }
450
451
1.74k
        if (LIKELY(read_count > 0)) {
452
1.74k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
1.74k
        }
454
455
1.74k
        *n = read_count;
456
1.74k
        return Status::OK();
457
1.74k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
4.35k
                          MutableColumnPtr& dst) override {
433
4.35k
        DCHECK(_parsed);
434
4.35k
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
4.35k
        auto total = *n;
440
4.35k
        auto read_count = 0;
441
4.35k
        _buffer.resize(total);
442
1.14M
        for (size_t i = 0; i < total; ++i) {
443
1.14M
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
1.14M
            if (UNLIKELY(ord >= _num_elements)) {
445
29
                break;
446
29
            }
447
448
1.14M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
1.14M
        }
450
451
4.35k
        if (LIKELY(read_count > 0)) {
452
4.35k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
4.35k
        }
454
455
4.35k
        *n = read_count;
456
4.35k
        return Status::OK();
457
4.35k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
8.82k
                          MutableColumnPtr& dst) override {
433
8.82k
        DCHECK(_parsed);
434
8.82k
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
8.82k
        auto total = *n;
440
8.82k
        auto read_count = 0;
441
8.82k
        _buffer.resize(total);
442
4.94M
        for (size_t i = 0; i < total; ++i) {
443
4.93M
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
4.93M
            if (UNLIKELY(ord >= _num_elements)) {
445
791
                break;
446
791
            }
447
448
4.93M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
4.93M
        }
450
451
8.82k
        if (LIKELY(read_count > 0)) {
452
8.82k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
8.82k
        }
454
455
8.82k
        *n = read_count;
456
8.82k
        return Status::OK();
457
8.82k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
1.80k
                          MutableColumnPtr& dst) override {
433
1.80k
        DCHECK(_parsed);
434
1.80k
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
1.80k
        auto total = *n;
440
1.80k
        auto read_count = 0;
441
1.80k
        _buffer.resize(total);
442
424k
        for (size_t i = 0; i < total; ++i) {
443
423k
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
423k
            if (UNLIKELY(ord >= _num_elements)) {
445
13
                break;
446
13
            }
447
448
423k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
423k
        }
450
451
1.80k
        if (LIKELY(read_count > 0)) {
452
1.80k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
1.80k
        }
454
455
1.80k
        *n = read_count;
456
1.80k
        return Status::OK();
457
1.80k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
12.2k
                          MutableColumnPtr& dst) override {
433
12.2k
        DCHECK(_parsed);
434
12.2k
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
12.2k
        auto total = *n;
440
12.2k
        auto read_count = 0;
441
12.2k
        _buffer.resize(total);
442
1.22M
        for (size_t i = 0; i < total; ++i) {
443
1.21M
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
1.21M
            if (UNLIKELY(ord >= _num_elements)) {
445
398
                break;
446
398
            }
447
448
1.21M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
1.21M
        }
450
451
12.2k
        if (LIKELY(read_count > 0)) {
452
12.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
12.2k
        }
454
455
12.2k
        *n = read_count;
456
12.2k
        return Status::OK();
457
12.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
13.9k
                          MutableColumnPtr& dst) override {
433
13.9k
        DCHECK(_parsed);
434
13.9k
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
13.9k
        auto total = *n;
440
13.9k
        auto read_count = 0;
441
13.9k
        _buffer.resize(total);
442
7.27M
        for (size_t i = 0; i < total; ++i) {
443
7.26M
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
7.26M
            if (UNLIKELY(ord >= _num_elements)) {
445
98
                break;
446
98
            }
447
448
7.26M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
7.26M
        }
450
451
13.9k
        if (LIKELY(read_count > 0)) {
452
13.9k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
13.9k
        }
454
455
13.9k
        *n = read_count;
456
13.9k
        return Status::OK();
457
13.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
1.98k
                          MutableColumnPtr& dst) override {
433
1.98k
        DCHECK(_parsed);
434
1.98k
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
1.98k
        auto total = *n;
440
1.98k
        auto read_count = 0;
441
1.98k
        _buffer.resize(total);
442
450k
        for (size_t i = 0; i < total; ++i) {
443
448k
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
448k
            if (UNLIKELY(ord >= _num_elements)) {
445
87
                break;
446
87
            }
447
448
448k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
448k
        }
450
451
1.98k
        if (LIKELY(read_count > 0)) {
452
1.98k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
1.98k
        }
454
455
1.98k
        *n = read_count;
456
1.98k
        return Status::OK();
457
1.98k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
1.95k
                          MutableColumnPtr& dst) override {
433
1.95k
        DCHECK(_parsed);
434
1.95k
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
1.95k
        auto total = *n;
440
1.95k
        auto read_count = 0;
441
1.95k
        _buffer.resize(total);
442
12.9k
        for (size_t i = 0; i < total; ++i) {
443
10.9k
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
10.9k
            if (UNLIKELY(ord >= _num_elements)) {
445
0
                break;
446
0
            }
447
448
10.9k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
10.9k
        }
450
451
1.95k
        if (LIKELY(read_count > 0)) {
452
1.95k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
1.95k
        }
454
455
1.95k
        *n = read_count;
456
1.95k
        return Status::OK();
457
1.95k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
14.0k
                          MutableColumnPtr& dst) override {
433
14.0k
        DCHECK(_parsed);
434
14.0k
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
14.0k
        auto total = *n;
440
14.0k
        auto read_count = 0;
441
14.0k
        _buffer.resize(total);
442
6.31M
        for (size_t i = 0; i < total; ++i) {
443
6.30M
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
6.30M
            if (UNLIKELY(ord >= _num_elements)) {
445
2.07k
                break;
446
2.07k
            }
447
448
6.30M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
6.30M
        }
450
451
14.0k
        if (LIKELY(read_count > 0)) {
452
14.0k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
14.0k
        }
454
455
14.0k
        *n = read_count;
456
14.0k
        return Status::OK();
457
14.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
8.82k
                          MutableColumnPtr& dst) override {
433
8.82k
        DCHECK(_parsed);
434
8.82k
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
8.82k
        auto total = *n;
440
8.82k
        auto read_count = 0;
441
8.82k
        _buffer.resize(total);
442
10.0M
        for (size_t i = 0; i < total; ++i) {
443
10.0M
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
10.0M
            if (UNLIKELY(ord >= _num_elements)) {
445
448
                break;
446
448
            }
447
448
10.0M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
10.0M
        }
450
451
8.83k
        if (LIKELY(read_count > 0)) {
452
8.83k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
8.83k
        }
454
455
8.82k
        *n = read_count;
456
8.82k
        return Status::OK();
457
8.82k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
66
                          MutableColumnPtr& dst) override {
433
66
        DCHECK(_parsed);
434
66
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
66
        auto total = *n;
440
66
        auto read_count = 0;
441
66
        _buffer.resize(total);
442
552
        for (size_t i = 0; i < total; ++i) {
443
486
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
486
            if (UNLIKELY(ord >= _num_elements)) {
445
0
                break;
446
0
            }
447
448
486
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
486
        }
450
451
66
        if (LIKELY(read_count > 0)) {
452
66
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
66
        }
454
455
66
        *n = read_count;
456
66
        return Status::OK();
457
66
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
235
                          MutableColumnPtr& dst) override {
433
235
        DCHECK(_parsed);
434
235
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
235
        auto total = *n;
440
235
        auto read_count = 0;
441
235
        _buffer.resize(total);
442
541
        for (size_t i = 0; i < total; ++i) {
443
306
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
306
            if (UNLIKELY(ord >= _num_elements)) {
445
0
                break;
446
0
            }
447
448
306
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
306
        }
450
451
237
        if (LIKELY(read_count > 0)) {
452
237
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
237
        }
454
455
235
        *n = read_count;
456
235
        return Status::OK();
457
235
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
432
93
                          MutableColumnPtr& dst) override {
433
93
        DCHECK(_parsed);
434
93
        if (*n == 0) [[unlikely]] {
435
0
            *n = 0;
436
0
            return Status::OK();
437
0
        }
438
439
93
        auto total = *n;
440
93
        auto read_count = 0;
441
93
        _buffer.resize(total);
442
261
        for (size_t i = 0; i < total; ++i) {
443
168
            ordinal_t ord = rowids[i] - page_first_ordinal;
444
168
            if (UNLIKELY(ord >= _num_elements)) {
445
0
                break;
446
0
            }
447
448
168
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
449
168
        }
450
451
95
        if (LIKELY(read_count > 0)) {
452
95
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
453
95
        }
454
455
93
        *n = read_count;
456
93
        return Status::OK();
457
93
    }
458
459
81.8k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
460
81.8k
        return next_batch<false>(n, dst);
461
81.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
459
81.8k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
460
81.8k
        return next_batch<false>(n, dst);
461
81.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
462
463
3
    size_t count() const override { return _num_elements; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
463
3
    size_t count() const override { return _num_elements; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE5countEv
464
465
1.90M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
465
1.84M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
465
42
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
465
21
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
465
2.15k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
465
6
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE13current_indexEv
Line
Count
Source
465
13.9k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
465
7.48k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
465
6.47k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
465
12.4k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
465
12.1k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
465
4.34k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE13current_indexEv
Line
Count
Source
465
1
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE13current_indexEv
Line
Count
Source
465
541
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
465
12
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
465
3.48k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE13current_indexEv
Line
Count
Source
465
17
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
Line
Count
Source
465
78
    size_t current_index() const override { return _cur_index; }
466
467
38.9M
    char* get_data(size_t index) const {
468
38.9M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
38.9M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
467
3.88M
    char* get_data(size_t index) const {
468
3.88M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
3.88M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
467
933k
    char* get_data(size_t index) const {
468
933k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
933k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
467
7.63k
    char* get_data(size_t index) const {
468
7.63k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
7.63k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
467
1.54M
    char* get_data(size_t index) const {
468
1.54M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
1.54M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
467
621k
    char* get_data(size_t index) const {
468
621k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
621k
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
467
7.03k
    char* get_data(size_t index) const {
468
7.03k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
7.03k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
467
1.15M
    char* get_data(size_t index) const {
468
1.15M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
1.15M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
467
4.93M
    char* get_data(size_t index) const {
468
4.93M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
4.93M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
467
423k
    char* get_data(size_t index) const {
468
423k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
423k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
467
1.28M
    char* get_data(size_t index) const {
468
1.28M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
1.28M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
467
7.31M
    char* get_data(size_t index) const {
468
7.31M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
7.31M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
467
450k
    char* get_data(size_t index) const {
468
450k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
450k
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
467
41
    char* get_data(size_t index) const {
468
41
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
41
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
467
14.7k
    char* get_data(size_t index) const {
468
14.7k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
14.7k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
467
6.30M
    char* get_data(size_t index) const {
468
6.30M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
6.30M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
467
10.0M
    char* get_data(size_t index) const {
468
10.0M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
10.0M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
467
599
    char* get_data(size_t index) const {
468
599
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
599
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Line
Count
Source
467
533
    char* get_data(size_t index) const {
468
533
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
533
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
Line
Count
Source
467
350
    char* get_data(size_t index) const {
468
350
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
469
350
    }
470
471
private:
472
    void _copy_next_values(size_t n, void* data) {
473
        memcpy(data, get_data(_cur_index), n * SIZE_OF_TYPE);
474
    }
475
476
    using CppType = typename TypeTraits<Type>::CppType;
477
478
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
479
480
    Slice _data;
481
    PageDecoderOptions _options;
482
    bool _parsed;
483
    size_t _num_elements;
484
    size_t _num_element_after_padding;
485
486
    int _size_of_element;
487
    size_t _cur_index;
488
489
    std::vector<std::conditional_t<std::is_same_v<CppType, bool>, uint8_t, CppType>> _buffer;
490
491
    friend class BinaryDictPageDecoder;
492
};
493
494
#include "common/compile_check_end.h"
495
} // namespace segment_v2
496
} // namespace doris