Coverage Report

Created: 2026-05-22 06:23

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/storage/segment/bitshuffle_page.h
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#pragma once
19
20
#include <glog/logging.h>
21
22
#include <algorithm>
23
#include <cstddef>
24
#include <cstdint>
25
#include <cstring>
26
#include <ostream>
27
#include <type_traits>
28
29
#include "common/cast_set.h"
30
#include "common/compiler_util.h" // IWYU pragma: keep
31
#include "common/status.h"
32
#include "core/column/column.h"
33
#include "core/data_type/data_type.h"
34
#include "core/types.h"
35
#include "storage/olap_common.h"
36
#include "storage/segment/bitshuffle_wrapper.h"
37
#include "storage/segment/common.h"
38
#include "storage/segment/options.h"
39
#include "storage/segment/page_builder.h"
40
#include "storage/segment/page_decoder.h"
41
#include "storage/types.h"
42
#include "util/alignment.h"
43
#include "util/coding.h"
44
#include "util/faststring.h"
45
#include "util/slice.h"
46
47
namespace doris {
48
namespace segment_v2 {
49
50
enum { BITSHUFFLE_PAGE_HEADER_SIZE = 16 };
51
52
void warn_with_bitshuffle_error(int64_t val);
53
54
// BitshufflePageBuilder bitshuffles and compresses the bits of fixed
55
// size type blocks with lz4.
56
//
57
// The page format is as follows:
58
//
59
// 1. Header: (16 bytes total)
60
//
61
//    <num_elements> [32-bit]
62
//      The number of elements encoded in the page.
63
//
64
//    <compressed_size> [32-bit]
65
//      The post-compression size of the page, including this header.
66
//
67
//    <padded_num_elements> [32-bit]
68
//      Padding is needed to meet the requirements of the bitshuffle
69
//      library such that the input/output is a multiple of 8. Some
70
//      ignored elements are appended to the end of the page if necessary
71
//      to meet this requirement.
72
//
73
//      This header field is the post-padding element count.
74
//
75
//    <elem_size_bytes> [32-bit]
76
//      The size of the elements, in bytes, as actually encoded. In the
77
//      case that all of the data in a page can fit into a smaller
78
//      integer type, then we may choose to encode that smaller type
79
//      to save CPU costs.
80
//
81
//      This is currently only implemented in the UINT32 page type.
82
//
83
//   NOTE: all on-disk ints are encoded little-endian
84
//
85
// 2. Element data
86
//
87
//    The header is followed by the bitshuffle-compressed element data.
88
//
89
template <FieldType Type>
90
class BitshufflePageBuilder : public PageBuilderHelper<BitshufflePageBuilder<Type>> {
91
public:
92
    using Self = BitshufflePageBuilder<Type>;
93
    friend class PageBuilderHelper<Self>;
94
95
125k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
75.4k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
14.8k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
729
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
23.9k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
95
3.58k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
446
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
95
574
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
95
562
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
4
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
845
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
95
3.61k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
11
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
2
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
95
240
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
95
452
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
95
448
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
96
97
18.9M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
18.9M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
15.5k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
649
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
43.6k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
3.89k
    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
97
336
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12is_page_fullEv
Line
Count
Source
97
528
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
97
548
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12is_page_fullEv
Line
Count
Source
97
4
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
839
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
3.60k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
97
11
    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
97
2
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
97
214
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
420
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
97
408
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
98
99
742k
    Status add(const uint8_t* vals, size_t* count) override {
100
742k
        return add_internal<false>(vals, count);
101
742k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
99
672k
    Status add(const uint8_t* vals, size_t* count) override {
100
672k
        return add_internal<false>(vals, count);
101
672k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
15.5k
    Status add(const uint8_t* vals, size_t* count) override {
100
15.5k
        return add_internal<false>(vals, count);
101
15.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
649
    Status add(const uint8_t* vals, size_t* count) override {
100
649
        return add_internal<false>(vals, count);
101
649
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
43.6k
    Status add(const uint8_t* vals, size_t* count) override {
100
43.6k
        return add_internal<false>(vals, count);
101
43.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
3.89k
    Status add(const uint8_t* vals, size_t* count) override {
100
3.89k
        return add_internal<false>(vals, count);
101
3.89k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
338
    Status add(const uint8_t* vals, size_t* count) override {
100
338
        return add_internal<false>(vals, count);
101
338
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
99
528
    Status add(const uint8_t* vals, size_t* count) override {
100
528
        return add_internal<false>(vals, count);
101
528
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
99
548
    Status add(const uint8_t* vals, size_t* count) override {
100
548
        return add_internal<false>(vals, count);
101
548
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
4
    Status add(const uint8_t* vals, size_t* count) override {
100
4
        return add_internal<false>(vals, count);
101
4
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
839
    Status add(const uint8_t* vals, size_t* count) override {
100
839
        return add_internal<false>(vals, count);
101
839
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
3.60k
    Status add(const uint8_t* vals, size_t* count) override {
100
3.60k
        return add_internal<false>(vals, count);
101
3.60k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
99
11
    Status add(const uint8_t* vals, size_t* count) override {
100
11
        return add_internal<false>(vals, count);
101
11
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
2
    Status add(const uint8_t* vals, size_t* count) override {
100
2
        return add_internal<false>(vals, count);
101
2
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
99
214
    Status add(const uint8_t* vals, size_t* count) override {
100
214
        return add_internal<false>(vals, count);
101
214
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
420
    Status add(const uint8_t* vals, size_t* count) override {
100
420
        return add_internal<false>(vals, count);
101
420
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
99
408
    Status add(const uint8_t* vals, size_t* count) override {
100
408
        return add_internal<false>(vals, count);
101
408
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
102
103
18.2M
    Status single_add(const uint8_t* vals, size_t* count) {
104
18.2M
        return add_internal<true>(vals, count);
105
18.2M
    }
106
107
    template <bool single>
108
18.9M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
18.9M
        DCHECK(!_finished);
110
18.9M
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
18.9M
        uint32_t to_add = cast_set<UInt32>(
126
18.9M
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
18.9M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
18.9M
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
18.9M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
18.9M
        _count += to_add;
134
18.9M
        _remain_element_capacity -= to_add;
135
18.9M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
18.9M
        *num_written = to_add;
138
18.9M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
18.2M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
18.2M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
18.2M
                        *reinterpret_cast<const uint32_t*>(vals);
149
18.2M
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
18.2M
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
0
        memcpy(&_data[orig_size], vals, to_add_size);
158
18.9M
        return Status::OK();
159
18.9M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
672k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
672k
        DCHECK(!_finished);
110
672k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
672k
        uint32_t to_add = cast_set<UInt32>(
126
672k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
672k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
672k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
672k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
672k
        _count += to_add;
134
672k
        _remain_element_capacity -= to_add;
135
672k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
672k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
672k
        memcpy(&_data[orig_size], vals, to_add_size);
158
672k
        return Status::OK();
159
672k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
18.1M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
18.1M
        DCHECK(!_finished);
110
18.1M
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
18.1M
        uint32_t to_add = cast_set<UInt32>(
126
18.1M
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
18.1M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
18.1M
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
18.1M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
18.2M
        _count += to_add;
134
18.2M
        _remain_element_capacity -= to_add;
135
18.2M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
18.2M
        *num_written = to_add;
138
18.2M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
18.2M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
18.2M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
18.2M
                        *reinterpret_cast<const uint32_t*>(vals);
149
18.2M
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
18.2M
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
0
        memcpy(&_data[orig_size], vals, to_add_size);
158
18.2M
        return Status::OK();
159
18.1M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
15.5k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
15.5k
        DCHECK(!_finished);
110
15.5k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
15.5k
        uint32_t to_add = cast_set<UInt32>(
126
15.5k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
15.5k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
15.5k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
15.5k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
15.5k
        _count += to_add;
134
15.5k
        _remain_element_capacity -= to_add;
135
15.5k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
15.5k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
15.5k
        memcpy(&_data[orig_size], vals, to_add_size);
158
15.5k
        return Status::OK();
159
15.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
649
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
649
        DCHECK(!_finished);
110
649
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
649
        uint32_t to_add = cast_set<UInt32>(
126
649
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
649
        int to_add_size = to_add * SIZE_OF_TYPE;
129
649
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
649
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
649
        _count += to_add;
134
649
        _remain_element_capacity -= to_add;
135
649
        _raw_data_size += to_add_size;
136
        // return added number through count
137
649
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
649
        memcpy(&_data[orig_size], vals, to_add_size);
158
649
        return Status::OK();
159
649
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
43.6k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
43.6k
        DCHECK(!_finished);
110
43.6k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
43.6k
        uint32_t to_add = cast_set<UInt32>(
126
43.6k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
43.6k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
43.6k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
43.6k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
43.6k
        _count += to_add;
134
43.6k
        _remain_element_capacity -= to_add;
135
43.6k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
43.6k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
43.6k
        memcpy(&_data[orig_size], vals, to_add_size);
158
43.6k
        return Status::OK();
159
43.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
3.89k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
3.89k
        DCHECK(!_finished);
110
3.89k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
3.89k
        uint32_t to_add = cast_set<UInt32>(
126
3.89k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
3.89k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
3.89k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
3.89k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
3.89k
        _count += to_add;
134
3.89k
        _remain_element_capacity -= to_add;
135
3.89k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
3.89k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
3.89k
        memcpy(&_data[orig_size], vals, to_add_size);
158
3.89k
        return Status::OK();
159
3.89k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
336
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
336
        DCHECK(!_finished);
110
336
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
336
        uint32_t to_add = cast_set<UInt32>(
126
336
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
336
        int to_add_size = to_add * SIZE_OF_TYPE;
129
336
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
336
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
336
        _count += to_add;
134
336
        _remain_element_capacity -= to_add;
135
336
        _raw_data_size += to_add_size;
136
        // return added number through count
137
336
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
336
        memcpy(&_data[orig_size], vals, to_add_size);
158
336
        return Status::OK();
159
336
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
528
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
528
        DCHECK(!_finished);
110
528
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
528
        uint32_t to_add = cast_set<UInt32>(
126
528
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
528
        int to_add_size = to_add * SIZE_OF_TYPE;
129
528
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
528
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
528
        _count += to_add;
134
528
        _remain_element_capacity -= to_add;
135
528
        _raw_data_size += to_add_size;
136
        // return added number through count
137
528
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
528
        memcpy(&_data[orig_size], vals, to_add_size);
158
528
        return Status::OK();
159
528
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
548
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
548
        DCHECK(!_finished);
110
548
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
548
        uint32_t to_add = cast_set<UInt32>(
126
548
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
548
        int to_add_size = to_add * SIZE_OF_TYPE;
129
548
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
548
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
548
        _count += to_add;
134
548
        _remain_element_capacity -= to_add;
135
548
        _raw_data_size += to_add_size;
136
        // return added number through count
137
548
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
548
        memcpy(&_data[orig_size], vals, to_add_size);
158
548
        return Status::OK();
159
548
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
4
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
4
        DCHECK(!_finished);
110
4
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
4
        uint32_t to_add = cast_set<UInt32>(
126
4
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
4
        int to_add_size = to_add * SIZE_OF_TYPE;
129
4
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
4
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
4
        _count += to_add;
134
4
        _remain_element_capacity -= to_add;
135
4
        _raw_data_size += to_add_size;
136
        // return added number through count
137
4
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
4
        memcpy(&_data[orig_size], vals, to_add_size);
158
4
        return Status::OK();
159
4
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
839
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
839
        DCHECK(!_finished);
110
839
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
839
        uint32_t to_add = cast_set<UInt32>(
126
839
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
839
        int to_add_size = to_add * SIZE_OF_TYPE;
129
839
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
839
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
839
        _count += to_add;
134
839
        _remain_element_capacity -= to_add;
135
839
        _raw_data_size += to_add_size;
136
        // return added number through count
137
839
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
839
        memcpy(&_data[orig_size], vals, to_add_size);
158
839
        return Status::OK();
159
839
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
3.60k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
3.60k
        DCHECK(!_finished);
110
3.60k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
3.60k
        uint32_t to_add = cast_set<UInt32>(
126
3.60k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
3.60k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
3.60k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
3.60k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
3.60k
        _count += to_add;
134
3.60k
        _remain_element_capacity -= to_add;
135
3.60k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
3.60k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
3.60k
        memcpy(&_data[orig_size], vals, to_add_size);
158
3.60k
        return Status::OK();
159
3.60k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
11
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
11
        DCHECK(!_finished);
110
11
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
11
        uint32_t to_add = cast_set<UInt32>(
126
11
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
11
        int to_add_size = to_add * SIZE_OF_TYPE;
129
11
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
11
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
11
        _count += to_add;
134
11
        _remain_element_capacity -= to_add;
135
11
        _raw_data_size += to_add_size;
136
        // return added number through count
137
11
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
11
        memcpy(&_data[orig_size], vals, to_add_size);
158
11
        return Status::OK();
159
11
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
2
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
2
        DCHECK(!_finished);
110
2
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
2
        uint32_t to_add = cast_set<UInt32>(
126
2
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
2
        int to_add_size = to_add * SIZE_OF_TYPE;
129
2
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
2
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
2
        _count += to_add;
134
2
        _remain_element_capacity -= to_add;
135
2
        _raw_data_size += to_add_size;
136
        // return added number through count
137
2
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
2
        memcpy(&_data[orig_size], vals, to_add_size);
158
2
        return Status::OK();
159
2
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
214
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
214
        DCHECK(!_finished);
110
214
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
214
        uint32_t to_add = cast_set<UInt32>(
126
214
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
214
        int to_add_size = to_add * SIZE_OF_TYPE;
129
214
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
214
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
214
        _count += to_add;
134
214
        _remain_element_capacity -= to_add;
135
214
        _raw_data_size += to_add_size;
136
        // return added number through count
137
214
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
214
        memcpy(&_data[orig_size], vals, to_add_size);
158
214
        return Status::OK();
159
214
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
420
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
420
        DCHECK(!_finished);
110
420
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
420
        uint32_t to_add = cast_set<UInt32>(
126
420
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
420
        int to_add_size = to_add * SIZE_OF_TYPE;
129
420
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
420
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
420
        _count += to_add;
134
420
        _remain_element_capacity -= to_add;
135
420
        _raw_data_size += to_add_size;
136
        // return added number through count
137
420
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
420
        memcpy(&_data[orig_size], vals, to_add_size);
158
420
        return Status::OK();
159
420
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
408
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
408
        DCHECK(!_finished);
110
408
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
408
        uint32_t to_add = cast_set<UInt32>(
126
408
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
408
        int to_add_size = to_add * SIZE_OF_TYPE;
129
408
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
408
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
408
        _count += to_add;
134
408
        _remain_element_capacity -= to_add;
135
408
        _raw_data_size += to_add_size;
136
        // return added number through count
137
408
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                *reinterpret_cast<uint8_t*>(&_data[orig_size]) = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
408
        memcpy(&_data[orig_size], vals, to_add_size);
158
408
        return Status::OK();
159
408
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
160
161
126k
    Status finish(OwnedSlice* slice) override {
162
126k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
126k
        return Status::OK();
164
126k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
75.9k
    Status finish(OwnedSlice* slice) override {
162
75.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
75.9k
        return Status::OK();
164
75.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
14.8k
    Status finish(OwnedSlice* slice) override {
162
14.8k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
14.8k
        return Status::OK();
164
14.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
721
    Status finish(OwnedSlice* slice) override {
162
721
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
721
        return Status::OK();
164
721
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
24.1k
    Status finish(OwnedSlice* slice) override {
162
24.1k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
24.1k
        return Status::OK();
164
24.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
3.62k
    Status finish(OwnedSlice* slice) override {
162
3.62k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
3.62k
        return Status::OK();
164
3.62k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
412
    Status finish(OwnedSlice* slice) override {
162
412
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
414
        return Status::OK();
164
412
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
566
    Status finish(OwnedSlice* slice) override {
162
566
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
566
        return Status::OK();
164
566
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
552
    Status finish(OwnedSlice* slice) override {
162
552
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
552
        return Status::OK();
164
552
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
4
    Status finish(OwnedSlice* slice) override {
162
4
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
4
        return Status::OK();
164
4
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
841
    Status finish(OwnedSlice* slice) override {
162
841
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
841
        return Status::OK();
164
841
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
3.62k
    Status finish(OwnedSlice* slice) override {
162
3.62k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
3.62k
        return Status::OK();
164
3.62k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
11
    Status finish(OwnedSlice* slice) override {
162
11
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
11
        return Status::OK();
164
11
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
2
    Status finish(OwnedSlice* slice) override {
162
2
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
2
        return Status::OK();
164
2
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
240
    Status finish(OwnedSlice* slice) override {
162
240
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
240
        return Status::OK();
164
240
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
444
    Status finish(OwnedSlice* slice) override {
162
444
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
444
        return Status::OK();
164
444
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
440
    Status finish(OwnedSlice* slice) override {
162
440
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
440
        return Status::OK();
164
440
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
165
166
304k
    Status reset() override {
167
304k
        RETURN_IF_CATCH_EXCEPTION({
168
304k
            size_t block_size = _options.data_page_size;
169
304k
            _count = 0;
170
304k
            _raw_data_size = 0;
171
304k
            _data.clear();
172
304k
            _data.reserve(block_size);
173
304k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
304k
                    << "buffer must be naturally-aligned";
175
304k
            _buffer.clear();
176
304k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
304k
            _finished = false;
178
304k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
304k
        });
180
305k
        return Status::OK();
181
304k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
166
204k
    Status reset() override {
167
204k
        RETURN_IF_CATCH_EXCEPTION({
168
204k
            size_t block_size = _options.data_page_size;
169
204k
            _count = 0;
170
204k
            _raw_data_size = 0;
171
204k
            _data.clear();
172
204k
            _data.reserve(block_size);
173
204k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
204k
                    << "buffer must be naturally-aligned";
175
204k
            _buffer.clear();
176
204k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
204k
            _finished = false;
178
204k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
204k
        });
180
204k
        return Status::OK();
181
204k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
29.6k
    Status reset() override {
167
29.6k
        RETURN_IF_CATCH_EXCEPTION({
168
29.6k
            size_t block_size = _options.data_page_size;
169
29.6k
            _count = 0;
170
29.6k
            _raw_data_size = 0;
171
29.6k
            _data.clear();
172
29.6k
            _data.reserve(block_size);
173
29.6k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
29.6k
                    << "buffer must be naturally-aligned";
175
29.6k
            _buffer.clear();
176
29.6k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
29.6k
            _finished = false;
178
29.6k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
29.6k
        });
180
29.6k
        return Status::OK();
181
29.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
166
1.44k
    Status reset() override {
167
1.44k
        RETURN_IF_CATCH_EXCEPTION({
168
1.44k
            size_t block_size = _options.data_page_size;
169
1.44k
            _count = 0;
170
1.44k
            _raw_data_size = 0;
171
1.44k
            _data.clear();
172
1.44k
            _data.reserve(block_size);
173
1.44k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.44k
                    << "buffer must be naturally-aligned";
175
1.44k
            _buffer.clear();
176
1.44k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.44k
            _finished = false;
178
1.44k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.44k
        });
180
1.45k
        return Status::OK();
181
1.44k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
48.1k
    Status reset() override {
167
48.1k
        RETURN_IF_CATCH_EXCEPTION({
168
48.1k
            size_t block_size = _options.data_page_size;
169
48.1k
            _count = 0;
170
48.1k
            _raw_data_size = 0;
171
48.1k
            _data.clear();
172
48.1k
            _data.reserve(block_size);
173
48.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
48.1k
                    << "buffer must be naturally-aligned";
175
48.1k
            _buffer.clear();
176
48.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
48.1k
            _finished = false;
178
48.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
48.1k
        });
180
48.1k
        return Status::OK();
181
48.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
166
7.20k
    Status reset() override {
167
7.20k
        RETURN_IF_CATCH_EXCEPTION({
168
7.20k
            size_t block_size = _options.data_page_size;
169
7.20k
            _count = 0;
170
7.20k
            _raw_data_size = 0;
171
7.20k
            _data.clear();
172
7.20k
            _data.reserve(block_size);
173
7.20k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
7.20k
                    << "buffer must be naturally-aligned";
175
7.20k
            _buffer.clear();
176
7.20k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
7.20k
            _finished = false;
178
7.20k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
7.20k
        });
180
7.20k
        return Status::OK();
181
7.20k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
166
860
    Status reset() override {
167
860
        RETURN_IF_CATCH_EXCEPTION({
168
860
            size_t block_size = _options.data_page_size;
169
860
            _count = 0;
170
860
            _raw_data_size = 0;
171
860
            _data.clear();
172
860
            _data.reserve(block_size);
173
860
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
860
                    << "buffer must be naturally-aligned";
175
860
            _buffer.clear();
176
860
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
860
            _finished = false;
178
860
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
860
        });
180
860
        return Status::OK();
181
860
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
166
1.14k
    Status reset() override {
167
1.14k
        RETURN_IF_CATCH_EXCEPTION({
168
1.14k
            size_t block_size = _options.data_page_size;
169
1.14k
            _count = 0;
170
1.14k
            _raw_data_size = 0;
171
1.14k
            _data.clear();
172
1.14k
            _data.reserve(block_size);
173
1.14k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.14k
                    << "buffer must be naturally-aligned";
175
1.14k
            _buffer.clear();
176
1.14k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.14k
            _finished = false;
178
1.14k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.14k
        });
180
1.14k
        return Status::OK();
181
1.14k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
166
1.11k
    Status reset() override {
167
1.11k
        RETURN_IF_CATCH_EXCEPTION({
168
1.11k
            size_t block_size = _options.data_page_size;
169
1.11k
            _count = 0;
170
1.11k
            _raw_data_size = 0;
171
1.11k
            _data.clear();
172
1.11k
            _data.reserve(block_size);
173
1.11k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.11k
                    << "buffer must be naturally-aligned";
175
1.11k
            _buffer.clear();
176
1.11k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.11k
            _finished = false;
178
1.11k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.11k
        });
180
1.11k
        return Status::OK();
181
1.11k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
166
8
    Status reset() override {
167
8
        RETURN_IF_CATCH_EXCEPTION({
168
8
            size_t block_size = _options.data_page_size;
169
8
            _count = 0;
170
8
            _raw_data_size = 0;
171
8
            _data.clear();
172
8
            _data.reserve(block_size);
173
8
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
8
                    << "buffer must be naturally-aligned";
175
8
            _buffer.clear();
176
8
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
8
            _finished = false;
178
8
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
8
        });
180
8
        return Status::OK();
181
8
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
166
1.68k
    Status reset() override {
167
1.68k
        RETURN_IF_CATCH_EXCEPTION({
168
1.68k
            size_t block_size = _options.data_page_size;
169
1.68k
            _count = 0;
170
1.68k
            _raw_data_size = 0;
171
1.68k
            _data.clear();
172
1.68k
            _data.reserve(block_size);
173
1.68k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.68k
                    << "buffer must be naturally-aligned";
175
1.68k
            _buffer.clear();
176
1.68k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.68k
            _finished = false;
178
1.68k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.68k
        });
180
1.69k
        return Status::OK();
181
1.68k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
166
7.23k
    Status reset() override {
167
7.23k
        RETURN_IF_CATCH_EXCEPTION({
168
7.23k
            size_t block_size = _options.data_page_size;
169
7.23k
            _count = 0;
170
7.23k
            _raw_data_size = 0;
171
7.23k
            _data.clear();
172
7.23k
            _data.reserve(block_size);
173
7.23k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
7.23k
                    << "buffer must be naturally-aligned";
175
7.23k
            _buffer.clear();
176
7.23k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
7.23k
            _finished = false;
178
7.23k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
7.23k
        });
180
7.24k
        return Status::OK();
181
7.23k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
166
22
    Status reset() override {
167
22
        RETURN_IF_CATCH_EXCEPTION({
168
22
            size_t block_size = _options.data_page_size;
169
22
            _count = 0;
170
22
            _raw_data_size = 0;
171
22
            _data.clear();
172
22
            _data.reserve(block_size);
173
22
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
22
                    << "buffer must be naturally-aligned";
175
22
            _buffer.clear();
176
22
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
22
            _finished = false;
178
22
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
22
        });
180
22
        return Status::OK();
181
22
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
166
4
    Status reset() override {
167
4
        RETURN_IF_CATCH_EXCEPTION({
168
4
            size_t block_size = _options.data_page_size;
169
4
            _count = 0;
170
4
            _raw_data_size = 0;
171
4
            _data.clear();
172
4
            _data.reserve(block_size);
173
4
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
4
                    << "buffer must be naturally-aligned";
175
4
            _buffer.clear();
176
4
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
4
            _finished = false;
178
4
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
4
        });
180
4
        return Status::OK();
181
4
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
166
480
    Status reset() override {
167
480
        RETURN_IF_CATCH_EXCEPTION({
168
480
            size_t block_size = _options.data_page_size;
169
480
            _count = 0;
170
480
            _raw_data_size = 0;
171
480
            _data.clear();
172
480
            _data.reserve(block_size);
173
480
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
480
                    << "buffer must be naturally-aligned";
175
480
            _buffer.clear();
176
480
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
480
            _finished = false;
178
480
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
480
        });
180
480
        return Status::OK();
181
480
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
896
    Status reset() override {
167
896
        RETURN_IF_CATCH_EXCEPTION({
168
896
            size_t block_size = _options.data_page_size;
169
896
            _count = 0;
170
896
            _raw_data_size = 0;
171
896
            _data.clear();
172
896
            _data.reserve(block_size);
173
896
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
896
                    << "buffer must be naturally-aligned";
175
896
            _buffer.clear();
176
896
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
896
            _finished = false;
178
896
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
896
        });
180
896
        return Status::OK();
181
896
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
166
888
    Status reset() override {
167
888
        RETURN_IF_CATCH_EXCEPTION({
168
888
            size_t block_size = _options.data_page_size;
169
888
            _count = 0;
170
888
            _raw_data_size = 0;
171
888
            _data.clear();
172
888
            _data.reserve(block_size);
173
888
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
888
                    << "buffer must be naturally-aligned";
175
888
            _buffer.clear();
176
888
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
888
            _finished = false;
178
888
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
888
        });
180
888
        return Status::OK();
181
888
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
182
183
3
    size_t count() const override { return _count; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
183
3
    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
184
185
48.2k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
28.6k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
185
8.67k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
185
167
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
8.58k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
1.50k
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
8
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
30
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
185
28
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4sizeEv
Line
Count
Source
185
6
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4sizeEv
Line
Count
Source
185
185
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
392
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4sizeEv
Line
Count
Source
185
13
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4sizeEv
Line
Count
Source
185
2
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4sizeEv
Line
Count
Source
185
28
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
185
24
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
185
40
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4sizeEv
186
187
72.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
21.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
14.8k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
721
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
24.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
3.62k
    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
187
412
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
187
566
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
552
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE17get_raw_data_sizeEv
Line
Count
Source
187
4
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
187
841
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
187
3.62k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
187
11
    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
187
2
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
187
240
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
444
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
187
440
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
125k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
75.3k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
14.8k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
729
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
23.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
3.58k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
446
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
574
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
562
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
4
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
847
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
3.61k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
11
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
2
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
240
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
452
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
448
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
192
193
126k
    OwnedSlice _finish(int final_size_of_type) {
194
126k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
126k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
126k
        int padding_elems = num_elems_after_padding - _count;
199
126k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.09M
        for (int i = 0; i < padding_bytes; i++) {
201
2.97M
            _data.push_back(0);
202
2.97M
        }
203
204
        // reserve enough place for compression
205
126k
        _buffer.resize(
206
126k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
126k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
126k
        int64_t bytes =
210
126k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
126k
                                         num_elems_after_padding, final_size_of_type, 0);
212
126k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
126k
        encode_fixed32_le(&_buffer[0], _count);
222
126k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
126k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
126k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
126k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
126k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
126k
        return _buffer.build();
229
126k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
75.9k
    OwnedSlice _finish(int final_size_of_type) {
194
75.9k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
75.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
75.9k
        int padding_elems = num_elems_after_padding - _count;
199
75.9k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.52M
        for (int i = 0; i < padding_bytes; i++) {
201
1.45M
            _data.push_back(0);
202
1.45M
        }
203
204
        // reserve enough place for compression
205
75.9k
        _buffer.resize(
206
75.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
75.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
75.9k
        int64_t bytes =
210
75.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
75.9k
                                         num_elems_after_padding, final_size_of_type, 0);
212
75.9k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
75.9k
        encode_fixed32_le(&_buffer[0], _count);
222
75.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
75.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
75.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
75.9k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
75.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
75.9k
        return _buffer.build();
229
75.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
14.8k
    OwnedSlice _finish(int final_size_of_type) {
194
14.8k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
14.8k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
14.8k
        int padding_elems = num_elems_after_padding - _count;
199
14.8k
        int padding_bytes = padding_elems * final_size_of_type;
200
92.3k
        for (int i = 0; i < padding_bytes; i++) {
201
77.5k
            _data.push_back(0);
202
77.5k
        }
203
204
        // reserve enough place for compression
205
14.8k
        _buffer.resize(
206
14.8k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
14.8k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
14.8k
        int64_t bytes =
210
14.8k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
14.8k
                                         num_elems_after_padding, final_size_of_type, 0);
212
14.8k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
14.8k
        encode_fixed32_le(&_buffer[0], _count);
222
14.8k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
14.8k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
14.8k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
14.8k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
14.8k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
14.8k
        return _buffer.build();
229
14.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
721
    OwnedSlice _finish(int final_size_of_type) {
194
721
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
721
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
721
        int padding_elems = num_elems_after_padding - _count;
199
721
        int padding_bytes = padding_elems * final_size_of_type;
200
8.55k
        for (int i = 0; i < padding_bytes; i++) {
201
7.83k
            _data.push_back(0);
202
7.83k
        }
203
204
        // reserve enough place for compression
205
721
        _buffer.resize(
206
721
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
721
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
721
        int64_t bytes =
210
721
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
721
                                         num_elems_after_padding, final_size_of_type, 0);
212
721
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
721
        encode_fixed32_le(&_buffer[0], _count);
222
721
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
721
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
721
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
721
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
721
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
721
        return _buffer.build();
229
721
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
24.1k
    OwnedSlice _finish(int final_size_of_type) {
194
24.1k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
24.1k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
24.1k
        int padding_elems = num_elems_after_padding - _count;
199
24.1k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.02M
        for (int i = 0; i < padding_bytes; i++) {
201
998k
            _data.push_back(0);
202
998k
        }
203
204
        // reserve enough place for compression
205
24.1k
        _buffer.resize(
206
24.1k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
24.1k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
24.1k
        int64_t bytes =
210
24.1k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
24.1k
                                         num_elems_after_padding, final_size_of_type, 0);
212
24.1k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
24.1k
        encode_fixed32_le(&_buffer[0], _count);
222
24.1k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
24.1k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
24.1k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
24.1k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
24.1k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
24.1k
        return _buffer.build();
229
24.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
3.62k
    OwnedSlice _finish(int final_size_of_type) {
194
3.62k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
3.62k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
3.62k
        int padding_elems = num_elems_after_padding - _count;
199
3.62k
        int padding_bytes = padding_elems * final_size_of_type;
200
130k
        for (int i = 0; i < padding_bytes; i++) {
201
127k
            _data.push_back(0);
202
127k
        }
203
204
        // reserve enough place for compression
205
3.62k
        _buffer.resize(
206
3.62k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
3.62k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
3.62k
        int64_t bytes =
210
3.62k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
3.62k
                                         num_elems_after_padding, final_size_of_type, 0);
212
3.62k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
3.62k
        encode_fixed32_le(&_buffer[0], _count);
222
3.62k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
3.62k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
3.62k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
3.62k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
3.62k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
3.62k
        return _buffer.build();
229
3.62k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
412
    OwnedSlice _finish(int final_size_of_type) {
194
412
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
412
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
412
        int padding_elems = num_elems_after_padding - _count;
199
412
        int padding_bytes = padding_elems * final_size_of_type;
200
35.2k
        for (int i = 0; i < padding_bytes; i++) {
201
34.8k
            _data.push_back(0);
202
34.8k
        }
203
204
        // reserve enough place for compression
205
412
        _buffer.resize(
206
412
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
412
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
412
        int64_t bytes =
210
412
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
412
                                         num_elems_after_padding, final_size_of_type, 0);
212
412
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
412
        encode_fixed32_le(&_buffer[0], _count);
222
412
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
412
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
412
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
412
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
412
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
412
        return _buffer.build();
229
412
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
566
    OwnedSlice _finish(int final_size_of_type) {
194
566
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
566
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
566
        int padding_elems = num_elems_after_padding - _count;
199
566
        int padding_bytes = padding_elems * final_size_of_type;
200
12.6k
        for (int i = 0; i < padding_bytes; i++) {
201
12.1k
            _data.push_back(0);
202
12.1k
        }
203
204
        // reserve enough place for compression
205
566
        _buffer.resize(
206
566
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
566
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
566
        int64_t bytes =
210
566
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
566
                                         num_elems_after_padding, final_size_of_type, 0);
212
566
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
566
        encode_fixed32_le(&_buffer[0], _count);
222
566
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
566
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
566
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
566
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
566
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
566
        return _buffer.build();
229
566
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
552
    OwnedSlice _finish(int final_size_of_type) {
194
552
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
552
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
552
        int padding_elems = num_elems_after_padding - _count;
199
552
        int padding_bytes = padding_elems * final_size_of_type;
200
21.9k
        for (int i = 0; i < padding_bytes; i++) {
201
21.4k
            _data.push_back(0);
202
21.4k
        }
203
204
        // reserve enough place for compression
205
552
        _buffer.resize(
206
552
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
552
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
552
        int64_t bytes =
210
552
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
552
                                         num_elems_after_padding, final_size_of_type, 0);
212
552
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
552
        encode_fixed32_le(&_buffer[0], _count);
222
552
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
552
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
552
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
552
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
552
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
552
        return _buffer.build();
229
552
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
4
    OwnedSlice _finish(int final_size_of_type) {
194
4
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
4
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
4
        int padding_elems = num_elems_after_padding - _count;
199
4
        int padding_bytes = padding_elems * final_size_of_type;
200
82
        for (int i = 0; i < padding_bytes; i++) {
201
78
            _data.push_back(0);
202
78
        }
203
204
        // reserve enough place for compression
205
4
        _buffer.resize(
206
4
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
4
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
4
        int64_t bytes =
210
4
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
4
                                         num_elems_after_padding, final_size_of_type, 0);
212
4
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
4
        encode_fixed32_le(&_buffer[0], _count);
222
4
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
4
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
4
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
4
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
4
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
4
        return _buffer.build();
229
4
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
193
841
    OwnedSlice _finish(int final_size_of_type) {
194
841
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
841
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
841
        int padding_elems = num_elems_after_padding - _count;
199
841
        int padding_bytes = padding_elems * final_size_of_type;
200
20.0k
        for (int i = 0; i < padding_bytes; i++) {
201
19.1k
            _data.push_back(0);
202
19.1k
        }
203
204
        // reserve enough place for compression
205
841
        _buffer.resize(
206
841
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
841
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
841
        int64_t bytes =
210
841
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
841
                                         num_elems_after_padding, final_size_of_type, 0);
212
841
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
841
        encode_fixed32_le(&_buffer[0], _count);
222
841
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
841
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
841
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
841
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
841
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
841
        return _buffer.build();
229
841
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
193
3.62k
    OwnedSlice _finish(int final_size_of_type) {
194
3.62k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
3.62k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
3.62k
        int padding_elems = num_elems_after_padding - _count;
199
3.62k
        int padding_bytes = padding_elems * final_size_of_type;
200
160k
        for (int i = 0; i < padding_bytes; i++) {
201
156k
            _data.push_back(0);
202
156k
        }
203
204
        // reserve enough place for compression
205
3.62k
        _buffer.resize(
206
3.62k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
3.62k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
3.62k
        int64_t bytes =
210
3.62k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
3.62k
                                         num_elems_after_padding, final_size_of_type, 0);
212
3.62k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
3.62k
        encode_fixed32_le(&_buffer[0], _count);
222
3.62k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
3.62k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
3.62k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
3.62k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
3.62k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
3.62k
        return _buffer.build();
229
3.62k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
193
11
    OwnedSlice _finish(int final_size_of_type) {
194
11
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
11
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
11
        int padding_elems = num_elems_after_padding - _count;
199
11
        int padding_bytes = padding_elems * final_size_of_type;
200
571
        for (int i = 0; i < padding_bytes; i++) {
201
560
            _data.push_back(0);
202
560
        }
203
204
        // reserve enough place for compression
205
11
        _buffer.resize(
206
11
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
11
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
11
        int64_t bytes =
210
11
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
11
                                         num_elems_after_padding, final_size_of_type, 0);
212
11
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
11
        encode_fixed32_le(&_buffer[0], _count);
222
11
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
11
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
11
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
11
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
11
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
11
        return _buffer.build();
229
11
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
193
2
    OwnedSlice _finish(int final_size_of_type) {
194
2
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
2
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
2
        int padding_elems = num_elems_after_padding - _count;
199
2
        int padding_bytes = padding_elems * final_size_of_type;
200
170
        for (int i = 0; i < padding_bytes; i++) {
201
168
            _data.push_back(0);
202
168
        }
203
204
        // reserve enough place for compression
205
2
        _buffer.resize(
206
2
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
2
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
2
        int64_t bytes =
210
2
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
2
                                         num_elems_after_padding, final_size_of_type, 0);
212
2
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
2
        encode_fixed32_le(&_buffer[0], _count);
222
2
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
2
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
2
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
2
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
2
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
2
        return _buffer.build();
229
2
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
193
240
    OwnedSlice _finish(int final_size_of_type) {
194
240
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
240
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
240
        int padding_elems = num_elems_after_padding - _count;
199
240
        int padding_bytes = padding_elems * final_size_of_type;
200
5.41k
        for (int i = 0; i < padding_bytes; i++) {
201
5.17k
            _data.push_back(0);
202
5.17k
        }
203
204
        // reserve enough place for compression
205
240
        _buffer.resize(
206
240
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
240
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
240
        int64_t bytes =
210
240
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
240
                                         num_elems_after_padding, final_size_of_type, 0);
212
240
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
240
        encode_fixed32_le(&_buffer[0], _count);
222
240
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
240
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
240
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
240
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
240
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
240
        return _buffer.build();
229
240
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
444
    OwnedSlice _finish(int final_size_of_type) {
194
444
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
444
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
444
        int padding_elems = num_elems_after_padding - _count;
199
444
        int padding_bytes = padding_elems * final_size_of_type;
200
18.4k
        for (int i = 0; i < padding_bytes; i++) {
201
18.0k
            _data.push_back(0);
202
18.0k
        }
203
204
        // reserve enough place for compression
205
444
        _buffer.resize(
206
444
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
444
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
444
        int64_t bytes =
210
444
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
444
                                         num_elems_after_padding, final_size_of_type, 0);
212
444
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
444
        encode_fixed32_le(&_buffer[0], _count);
222
444
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
444
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
444
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
444
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
444
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
444
        return _buffer.build();
229
444
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
193
440
    OwnedSlice _finish(int final_size_of_type) {
194
440
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
440
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
440
        int padding_elems = num_elems_after_padding - _count;
199
440
        int padding_bytes = padding_elems * final_size_of_type;
200
40.8k
        for (int i = 0; i < padding_bytes; i++) {
201
40.4k
            _data.push_back(0);
202
40.4k
        }
203
204
        // reserve enough place for compression
205
440
        _buffer.resize(
206
440
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
440
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
440
        int64_t bytes =
210
440
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
440
                                         num_elems_after_padding, final_size_of_type, 0);
212
440
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
440
        encode_fixed32_le(&_buffer[0], _count);
222
440
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
440
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
440
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
440
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
440
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
440
        return _buffer.build();
229
440
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE7_finishEi
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
230
231
    using CppType = typename TypeTraits<Type>::CppType;
232
233
    CppType cell(int idx) const {
234
        DCHECK_GE(idx, 0);
235
        CppType ret;
236
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
237
        return ret;
238
    }
239
240
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
241
    PageBuilderOptions _options;
242
    uint32_t _count;
243
    uint32_t _remain_element_capacity;
244
    bool _finished;
245
    faststring _data;
246
    faststring _buffer;
247
    uint64_t _raw_data_size = 0;
248
};
249
250
inline Status parse_bit_shuffle_header(const Slice& data, size_t& num_elements,
251
                                       size_t& compressed_size, size_t& num_element_after_padding,
252
338k
                                       int& size_of_element) {
253
338k
    if (data.size < BITSHUFFLE_PAGE_HEADER_SIZE) {
254
0
        return Status::InternalError("file corruption: invalid data size:{}, header size:{}",
255
0
                                     data.size, BITSHUFFLE_PAGE_HEADER_SIZE);
256
0
    }
257
258
338k
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
338k
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
338k
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
338k
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
338k
    if (num_element_after_padding != ALIGN_UP(num_elements, 8)) {
263
0
        return Status::InternalError(
264
0
                "num of element information corrupted,"
265
0
                " _num_element_after_padding:{}, _num_elements:{}, expected_padding:{},"
266
0
                " compressed_size:{}, size_of_element:{}, data_size:{}",
267
0
                num_element_after_padding, num_elements, ALIGN_UP(num_elements, 8), compressed_size,
268
0
                size_of_element, data.size);
269
0
    }
270
338k
    switch (size_of_element) {
271
81.7k
    case 1:
272
83.9k
    case 2:
273
84.8k
    case 3:
274
265k
    case 4:
275
335k
    case 8:
276
335k
    case 12:
277
338k
    case 16:
278
338k
    case 32:
279
338k
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
338k
    }
283
338k
    return Status::OK();
284
338k
}
285
286
template <FieldType Type>
287
class BitShufflePageDecoder : public PageDecoder {
288
public:
289
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
290
169k
            : _data(data),
291
169k
              _options(options),
292
169k
              _parsed(false),
293
169k
              _num_elements(0),
294
169k
              _num_element_after_padding(0),
295
169k
              _size_of_element(0),
296
169k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
87.7k
            : _data(data),
291
87.7k
              _options(options),
292
87.7k
              _parsed(false),
293
87.7k
              _num_elements(0),
294
87.7k
              _num_element_after_padding(0),
295
87.7k
              _size_of_element(0),
296
87.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
40.8k
            : _data(data),
291
40.8k
              _options(options),
292
40.8k
              _parsed(false),
293
40.8k
              _num_elements(0),
294
40.8k
              _num_element_after_padding(0),
295
40.8k
              _size_of_element(0),
296
40.8k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.14k
            : _data(data),
291
1.14k
              _options(options),
292
1.14k
              _parsed(false),
293
1.14k
              _num_elements(0),
294
1.14k
              _num_element_after_padding(0),
295
1.14k
              _size_of_element(0),
296
1.14k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
24.8k
            : _data(data),
291
24.8k
              _options(options),
292
24.8k
              _parsed(false),
293
24.8k
              _num_elements(0),
294
24.8k
              _num_element_after_padding(0),
295
24.8k
              _size_of_element(0),
296
24.8k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
3.73k
            : _data(data),
291
3.73k
              _options(options),
292
3.73k
              _parsed(false),
293
3.73k
              _num_elements(0),
294
3.73k
              _num_element_after_padding(0),
295
3.73k
              _size_of_element(0),
296
3.73k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
800
            : _data(data),
291
800
              _options(options),
292
800
              _parsed(false),
293
800
              _num_elements(0),
294
800
              _num_element_after_padding(0),
295
800
              _size_of_element(0),
296
800
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
871
            : _data(data),
291
871
              _options(options),
292
871
              _parsed(false),
293
871
              _num_elements(0),
294
871
              _num_element_after_padding(0),
295
871
              _size_of_element(0),
296
871
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
852
            : _data(data),
291
852
              _options(options),
292
852
              _parsed(false),
293
852
              _num_elements(0),
294
852
              _num_element_after_padding(0),
295
852
              _size_of_element(0),
296
852
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
440
            : _data(data),
291
440
              _options(options),
292
440
              _parsed(false),
293
440
              _num_elements(0),
294
440
              _num_element_after_padding(0),
295
440
              _size_of_element(0),
296
440
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.50k
            : _data(data),
291
1.50k
              _options(options),
292
1.50k
              _parsed(false),
293
1.50k
              _num_elements(0),
294
1.50k
              _num_element_after_padding(0),
295
1.50k
              _size_of_element(0),
296
1.50k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
4.51k
            : _data(data),
291
4.51k
              _options(options),
292
4.51k
              _parsed(false),
293
4.51k
              _num_elements(0),
294
4.51k
              _num_element_after_padding(0),
295
4.51k
              _size_of_element(0),
296
4.51k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
321
            : _data(data),
291
321
              _options(options),
292
321
              _parsed(false),
293
321
              _num_elements(0),
294
321
              _num_element_after_padding(0),
295
321
              _size_of_element(0),
296
321
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
118
            : _data(data),
291
118
              _options(options),
292
118
              _parsed(false),
293
118
              _num_elements(0),
294
118
              _num_element_after_padding(0),
295
118
              _size_of_element(0),
296
118
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
408
            : _data(data),
291
408
              _options(options),
292
408
              _parsed(false),
293
408
              _num_elements(0),
294
408
              _num_element_after_padding(0),
295
408
              _size_of_element(0),
296
408
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
656
            : _data(data),
291
656
              _options(options),
292
656
              _parsed(false),
293
656
              _num_elements(0),
294
656
              _num_element_after_padding(0),
295
656
              _size_of_element(0),
296
656
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
770
            : _data(data),
291
770
              _options(options),
292
770
              _parsed(false),
293
770
              _num_elements(0),
294
770
              _num_element_after_padding(0),
295
770
              _size_of_element(0),
296
770
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
297
298
169k
    Status init() override {
299
169k
        CHECK(!_parsed);
300
169k
        size_t unused;
301
169k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
169k
                                                 _num_element_after_padding, _size_of_element));
303
304
169k
        if (_data.size !=
305
169k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
169k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
169k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
169k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
169k
        _parsed = true;
325
169k
        return Status::OK();
326
169k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
298
87.7k
    Status init() override {
299
87.7k
        CHECK(!_parsed);
300
87.7k
        size_t unused;
301
87.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
87.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
87.7k
        if (_data.size !=
305
87.7k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
87.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
87.7k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
87.7k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
87.7k
        _parsed = true;
325
87.7k
        return Status::OK();
326
87.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
40.8k
    Status init() override {
299
40.8k
        CHECK(!_parsed);
300
40.8k
        size_t unused;
301
40.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
40.8k
                                                 _num_element_after_padding, _size_of_element));
303
304
40.8k
        if (_data.size !=
305
40.8k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
40.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
40.8k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
40.8k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
40.8k
        _parsed = true;
325
40.8k
        return Status::OK();
326
40.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
1.14k
    Status init() override {
299
1.14k
        CHECK(!_parsed);
300
1.14k
        size_t unused;
301
1.14k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.14k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.14k
        if (_data.size !=
305
1.14k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.14k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.14k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.14k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.14k
        _parsed = true;
325
1.14k
        return Status::OK();
326
1.14k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
24.8k
    Status init() override {
299
24.8k
        CHECK(!_parsed);
300
24.8k
        size_t unused;
301
24.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
24.8k
                                                 _num_element_after_padding, _size_of_element));
303
304
24.8k
        if (_data.size !=
305
24.8k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
24.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
24.8k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
24.8k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
24.8k
        _parsed = true;
325
24.8k
        return Status::OK();
326
24.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
298
3.73k
    Status init() override {
299
3.73k
        CHECK(!_parsed);
300
3.73k
        size_t unused;
301
3.73k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
3.73k
                                                 _num_element_after_padding, _size_of_element));
303
304
3.73k
        if (_data.size !=
305
3.73k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
3.73k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
3.73k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
3.73k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
3.73k
        _parsed = true;
325
3.73k
        return Status::OK();
326
3.73k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
298
800
    Status init() override {
299
800
        CHECK(!_parsed);
300
800
        size_t unused;
301
800
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
800
                                                 _num_element_after_padding, _size_of_element));
303
304
800
        if (_data.size !=
305
800
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
800
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
800
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
800
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
800
        _parsed = true;
325
800
        return Status::OK();
326
800
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
298
871
    Status init() override {
299
871
        CHECK(!_parsed);
300
871
        size_t unused;
301
871
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
871
                                                 _num_element_after_padding, _size_of_element));
303
304
871
        if (_data.size !=
305
871
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
871
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
871
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
871
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
871
        _parsed = true;
325
871
        return Status::OK();
326
871
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
298
852
    Status init() override {
299
852
        CHECK(!_parsed);
300
852
        size_t unused;
301
852
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
852
                                                 _num_element_after_padding, _size_of_element));
303
304
852
        if (_data.size !=
305
852
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
852
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
852
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
852
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
852
        _parsed = true;
325
852
        return Status::OK();
326
852
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
440
    Status init() override {
299
440
        CHECK(!_parsed);
300
440
        size_t unused;
301
440
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
440
                                                 _num_element_after_padding, _size_of_element));
303
304
440
        if (_data.size !=
305
440
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
440
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
440
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
440
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
440
        _parsed = true;
325
440
        return Status::OK();
326
440
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
1.50k
    Status init() override {
299
1.50k
        CHECK(!_parsed);
300
1.50k
        size_t unused;
301
1.50k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.50k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.50k
        if (_data.size !=
305
1.50k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.50k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.50k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.50k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.50k
        _parsed = true;
325
1.50k
        return Status::OK();
326
1.50k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
298
4.51k
    Status init() override {
299
4.51k
        CHECK(!_parsed);
300
4.51k
        size_t unused;
301
4.51k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
4.51k
                                                 _num_element_after_padding, _size_of_element));
303
304
4.51k
        if (_data.size !=
305
4.51k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
4.51k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
4.51k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
4.51k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
4.51k
        _parsed = true;
325
4.51k
        return Status::OK();
326
4.51k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
298
321
    Status init() override {
299
321
        CHECK(!_parsed);
300
321
        size_t unused;
301
321
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
321
                                                 _num_element_after_padding, _size_of_element));
303
304
321
        if (_data.size !=
305
321
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
321
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
321
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
321
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
321
        _parsed = true;
325
321
        return Status::OK();
326
321
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
298
118
    Status init() override {
299
118
        CHECK(!_parsed);
300
118
        size_t unused;
301
118
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
118
                                                 _num_element_after_padding, _size_of_element));
303
304
118
        if (_data.size !=
305
118
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
118
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
118
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
118
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
118
        _parsed = true;
325
118
        return Status::OK();
326
118
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
298
408
    Status init() override {
299
408
        CHECK(!_parsed);
300
408
        size_t unused;
301
408
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
408
                                                 _num_element_after_padding, _size_of_element));
303
304
408
        if (_data.size !=
305
408
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
408
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
408
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
408
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
408
        _parsed = true;
325
408
        return Status::OK();
326
408
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
298
656
    Status init() override {
299
656
        CHECK(!_parsed);
300
656
        size_t unused;
301
656
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
656
                                                 _num_element_after_padding, _size_of_element));
303
304
656
        if (_data.size !=
305
656
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
656
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
656
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
656
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
656
        _parsed = true;
325
656
        return Status::OK();
326
656
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
298
770
    Status init() override {
299
770
        CHECK(!_parsed);
300
770
        size_t unused;
301
770
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
770
                                                 _num_element_after_padding, _size_of_element));
303
304
770
        if (_data.size !=
305
770
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
770
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
770
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
770
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
770
        _parsed = true;
325
770
        return Status::OK();
326
770
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
327
328
    // If the page only contains null, then _num_elements == 0, and the nullmap has
329
    // some value. But in _seek_columns --> seek_to_ordinal --> _seek_to_pos_in_page
330
    // in this call stack it will pass pos == 0 to this method. Although we can add some
331
    // code such as check if the count == 0, then skip seek, but there are other method such
332
    // as init will also call seek with pos == 0. And the seek is useless when _num_elements
333
    // == 0, because next batch will return empty in this method.
334
43.3k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
43.3k
        if (_num_elements == 0) [[unlikely]] {
337
1.70k
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
1.70k
        }
342
343
43.3k
        DCHECK_LE(pos, _num_elements);
344
43.3k
        _cur_index = pos;
345
43.3k
        return Status::OK();
346
43.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
13.7k
    Status seek_to_position_in_page(size_t pos) override {
335
13.7k
        DCHECK(_parsed) << "Must call init()";
336
13.7k
        if (_num_elements == 0) [[unlikely]] {
337
310
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
310
        }
342
343
13.7k
        DCHECK_LE(pos, _num_elements);
344
13.7k
        _cur_index = pos;
345
13.7k
        return Status::OK();
346
13.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
6.53k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
6.53k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
6.53k
        DCHECK_LE(pos, _num_elements);
344
6.53k
        _cur_index = pos;
345
6.53k
        return Status::OK();
346
6.53k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
2.89k
    Status seek_to_position_in_page(size_t pos) override {
335
2.89k
        DCHECK(_parsed) << "Must call init()";
336
2.89k
        if (_num_elements == 0) [[unlikely]] {
337
1.35k
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
1.35k
        }
342
343
2.89k
        DCHECK_LE(pos, _num_elements);
344
2.89k
        _cur_index = pos;
345
2.89k
        return Status::OK();
346
2.89k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
526
    Status seek_to_position_in_page(size_t pos) override {
335
526
        DCHECK(_parsed) << "Must call init()";
336
526
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
526
        DCHECK_LE(pos, _num_elements);
344
526
        _cur_index = pos;
345
526
        return Status::OK();
346
526
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
334
37
    Status seek_to_position_in_page(size_t pos) override {
335
37
        DCHECK(_parsed) << "Must call init()";
336
37
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
37
        DCHECK_LE(pos, _num_elements);
344
37
        _cur_index = pos;
345
37
        return Status::OK();
346
37
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
334
254
    Status seek_to_position_in_page(size_t pos) override {
335
254
        DCHECK(_parsed) << "Must call init()";
336
254
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
254
        DCHECK_LE(pos, _num_elements);
344
254
        _cur_index = pos;
345
254
        return Status::OK();
346
254
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
12
    Status seek_to_position_in_page(size_t pos) override {
335
12
        DCHECK(_parsed) << "Must call init()";
336
12
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
12
        DCHECK_LE(pos, _num_elements);
344
12
        _cur_index = pos;
345
12
        return Status::OK();
346
12
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
334
10.2k
    Status seek_to_position_in_page(size_t pos) override {
335
10.2k
        DCHECK(_parsed) << "Must call init()";
336
10.2k
        if (_num_elements == 0) [[unlikely]] {
337
4
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
4
        }
342
343
10.2k
        DCHECK_LE(pos, _num_elements);
344
10.2k
        _cur_index = pos;
345
10.2k
        return Status::OK();
346
10.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
334
8.24k
    Status seek_to_position_in_page(size_t pos) override {
335
8.24k
        DCHECK(_parsed) << "Must call init()";
336
8.24k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
8.24k
        DCHECK_LE(pos, _num_elements);
344
8.24k
        _cur_index = pos;
345
8.24k
        return Status::OK();
346
8.24k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
334
384
    Status seek_to_position_in_page(size_t pos) override {
335
384
        DCHECK(_parsed) << "Must call init()";
336
384
        if (_num_elements == 0) [[unlikely]] {
337
4
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
4
        }
342
343
384
        DCHECK_LE(pos, _num_elements);
344
384
        _cur_index = pos;
345
384
        return Status::OK();
346
384
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
329
    Status seek_to_position_in_page(size_t pos) override {
335
329
        DCHECK(_parsed) << "Must call init()";
336
329
        if (_num_elements == 0) [[unlikely]] {
337
16
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
16
        }
342
343
329
        DCHECK_LE(pos, _num_elements);
344
329
        _cur_index = pos;
345
329
        return Status::OK();
346
329
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
Line
Count
Source
334
112
    Status seek_to_position_in_page(size_t pos) override {
335
112
        DCHECK(_parsed) << "Must call init()";
336
112
        if (_num_elements == 0) [[unlikely]] {
337
12
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
12
        }
342
343
112
        DCHECK_LE(pos, _num_elements);
344
112
        _cur_index = pos;
345
112
        return Status::OK();
346
112
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE24seek_to_position_in_pageEm
347
348
0
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
349
0
        DCHECK(_parsed) << "Must call init() firstly";
350
351
0
        if (_num_elements == 0) {
352
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
353
0
        }
354
355
0
        size_t left = 0;
356
0
        size_t right = _num_elements;
357
358
0
        void* mid_value = nullptr;
359
360
        // find the first value >= target. after loop,
361
        // - left == index of first value >= target when found
362
        // - left == _num_elements when not found (all values < target)
363
0
        while (left < right) {
364
0
            size_t mid = left + (right - left) / 2;
365
0
            mid_value = get_data(mid);
366
0
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
367
0
                left = mid + 1;
368
0
            } else {
369
0
                right = mid;
370
0
            }
371
0
        }
372
0
        if (left >= _num_elements) {
373
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
374
0
        }
375
0
        void* find_value = get_data(left);
376
0
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
377
0
            *exact_match = true;
378
0
        } else {
379
0
            *exact_match = false;
380
0
        }
381
382
0
        _cur_index = left;
383
0
        return Status::OK();
384
0
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_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
385
386
    template <bool forward_index = true>
387
116k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
116k
        DCHECK(_parsed);
389
116k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
116k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
116k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
116k
        *n = max_fetch;
398
116k
        if constexpr (forward_index) {
399
112k
            _cur_index += max_fetch;
400
112k
        }
401
402
116k
        return Status::OK();
403
116k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
28.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
28.5k
        DCHECK(_parsed);
389
28.5k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
28.5k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
28.5k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
28.5k
        *n = max_fetch;
398
28.5k
        if constexpr (forward_index) {
399
28.5k
            _cur_index += max_fetch;
400
28.5k
        }
401
402
28.5k
        return Status::OK();
403
28.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
30.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
30.2k
        DCHECK(_parsed);
389
30.2k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
30.2k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
30.2k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
30.2k
        *n = max_fetch;
398
30.2k
        if constexpr (forward_index) {
399
30.2k
            _cur_index += max_fetch;
400
30.2k
        }
401
402
30.2k
        return Status::OK();
403
30.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
1.99k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.99k
        DCHECK(_parsed);
389
1.99k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.99k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
1.99k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.99k
        *n = max_fetch;
398
1.99k
        if constexpr (forward_index) {
399
1.99k
            _cur_index += max_fetch;
400
1.99k
        }
401
402
1.99k
        return Status::OK();
403
1.99k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
20.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
20.7k
        DCHECK(_parsed);
389
20.7k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
20.7k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
20.7k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
20.7k
        *n = max_fetch;
398
20.7k
        if constexpr (forward_index) {
399
20.7k
            _cur_index += max_fetch;
400
20.7k
        }
401
402
20.7k
        return Status::OK();
403
20.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.84k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.84k
        DCHECK(_parsed);
389
3.84k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.84k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
3.84k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.84k
        *n = max_fetch;
398
3.84k
        if constexpr (forward_index) {
399
3.84k
            _cur_index += max_fetch;
400
3.84k
        }
401
402
3.84k
        return Status::OK();
403
3.84k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.70k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.70k
        DCHECK(_parsed);
389
3.70k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.70k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
3.70k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.70k
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
3.70k
        return Status::OK();
403
3.70k
    }
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
387
576
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
576
        DCHECK(_parsed);
389
576
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
576
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
576
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
576
        *n = max_fetch;
398
576
        if constexpr (forward_index) {
399
576
            _cur_index += max_fetch;
400
576
        }
401
402
576
        return Status::OK();
403
576
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
523
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
523
        DCHECK(_parsed);
389
523
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
523
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
523
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
523
        *n = max_fetch;
398
523
        if constexpr (forward_index) {
399
523
            _cur_index += max_fetch;
400
523
        }
401
402
523
        return Status::OK();
403
523
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
598
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
598
        DCHECK(_parsed);
389
598
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
598
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
598
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
598
        *n = max_fetch;
398
598
        if constexpr (forward_index) {
399
598
            _cur_index += max_fetch;
400
598
        }
401
402
598
        return Status::OK();
403
598
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
11.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
11.6k
        DCHECK(_parsed);
389
11.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
11.6k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
11.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
11.6k
        *n = max_fetch;
398
11.6k
        if constexpr (forward_index) {
399
11.6k
            _cur_index += max_fetch;
400
11.6k
        }
401
402
11.6k
        return Status::OK();
403
11.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
10.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
10.6k
        DCHECK(_parsed);
389
10.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
10.6k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
10.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
10.6k
        *n = max_fetch;
398
10.6k
        if constexpr (forward_index) {
399
10.6k
            _cur_index += max_fetch;
400
10.6k
        }
401
402
10.6k
        return Status::OK();
403
10.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
2.36k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
2.36k
        DCHECK(_parsed);
389
2.36k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
2.36k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
2.36k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
2.36k
        *n = max_fetch;
398
2.36k
        if constexpr (forward_index) {
399
2.36k
            _cur_index += max_fetch;
400
2.36k
        }
401
402
2.36k
        return Status::OK();
403
2.36k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
421
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
421
        DCHECK(_parsed);
389
421
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
421
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
421
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
421
        *n = max_fetch;
398
421
        if constexpr (forward_index) {
399
421
            _cur_index += max_fetch;
400
421
        }
401
402
421
        return Status::OK();
403
421
    }
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
387
132
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
132
        DCHECK(_parsed);
389
132
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
132
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
132
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
132
        *n = max_fetch;
398
132
        if constexpr (forward_index) {
399
132
            _cur_index += max_fetch;
400
132
        }
401
402
132
        return Status::OK();
403
132
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
72
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
72
        DCHECK(_parsed);
389
72
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
72
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
72
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
72
        *n = max_fetch;
398
72
        if constexpr (forward_index) {
399
72
            _cur_index += max_fetch;
400
72
        }
401
402
72
        return Status::OK();
403
72
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
312
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
312
        DCHECK(_parsed);
389
312
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
312
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
312
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
312
        *n = max_fetch;
398
312
        if constexpr (forward_index) {
399
312
            _cur_index += max_fetch;
400
312
        }
401
402
312
        return Status::OK();
403
312
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
236
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
236
        DCHECK(_parsed);
389
236
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
236
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elements - _cur_index));
395
396
236
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
236
        *n = max_fetch;
398
236
        if constexpr (forward_index) {
399
236
            _cur_index += max_fetch;
400
236
        }
401
402
236
        return Status::OK();
403
236
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
404
405
112k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
28.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
30.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
1.99k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
20.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
3.84k
    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
405
576
    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
405
523
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
598
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
11.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
10.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
2.36k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
421
    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
405
132
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
72
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
312
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
236
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
406
407
    Status read_by_rowids(const rowid_t* rowids, ordinal_t page_first_ordinal, size_t* n,
408
50.4k
                          MutableColumnPtr& dst) override {
409
50.4k
        DCHECK(_parsed);
410
50.4k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
50.4k
        auto total = *n;
416
50.4k
        auto read_count = 0;
417
50.4k
        _buffer.resize(total);
418
3.53M
        for (size_t i = 0; i < total; ++i) {
419
3.48M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
3.48M
            if (UNLIKELY(ord >= _num_elements)) {
421
9
                break;
422
9
            }
423
424
3.48M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
3.48M
        }
426
427
50.4k
        if (LIKELY(read_count > 0)) {
428
50.4k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
50.4k
        }
430
431
50.4k
        *n = read_count;
432
50.4k
        return Status::OK();
433
50.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.7k
                          MutableColumnPtr& dst) override {
409
13.7k
        DCHECK(_parsed);
410
13.7k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.7k
        auto total = *n;
416
13.7k
        auto read_count = 0;
417
13.7k
        _buffer.resize(total);
418
2.85M
        for (size_t i = 0; i < total; ++i) {
419
2.83M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
2.83M
            if (UNLIKELY(ord >= _num_elements)) {
421
9
                break;
422
9
            }
423
424
2.83M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
2.83M
        }
426
427
13.7k
        if (LIKELY(read_count > 0)) {
428
13.7k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.7k
        }
430
431
13.7k
        *n = read_count;
432
13.7k
        return Status::OK();
433
13.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
18.1k
                          MutableColumnPtr& dst) override {
409
18.1k
        DCHECK(_parsed);
410
18.1k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
18.1k
        auto total = *n;
416
18.1k
        auto read_count = 0;
417
18.1k
        _buffer.resize(total);
418
591k
        for (size_t i = 0; i < total; ++i) {
419
573k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
573k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
573k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
573k
        }
426
427
18.1k
        if (LIKELY(read_count > 0)) {
428
18.1k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
18.1k
        }
430
431
18.1k
        *n = read_count;
432
18.1k
        return Status::OK();
433
18.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
538
                          MutableColumnPtr& dst) override {
409
538
        DCHECK(_parsed);
410
538
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
538
        auto total = *n;
416
538
        auto read_count = 0;
417
538
        _buffer.resize(total);
418
1.08k
        for (size_t i = 0; i < total; ++i) {
419
550
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
550
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
550
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
550
        }
426
427
538
        if (LIKELY(read_count > 0)) {
428
538
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
538
        }
430
431
538
        *n = read_count;
432
538
        return Status::OK();
433
538
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
11.8k
                          MutableColumnPtr& dst) override {
409
11.8k
        DCHECK(_parsed);
410
11.8k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
11.8k
        auto total = *n;
416
11.8k
        auto read_count = 0;
417
11.8k
        _buffer.resize(total);
418
35.1k
        for (size_t i = 0; i < total; ++i) {
419
23.3k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
23.3k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
23.3k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
23.3k
        }
426
427
11.8k
        if (LIKELY(read_count > 0)) {
428
11.8k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
11.8k
        }
430
431
11.8k
        *n = read_count;
432
11.8k
        return Status::OK();
433
11.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
524
                          MutableColumnPtr& dst) override {
409
524
        DCHECK(_parsed);
410
524
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
524
        auto total = *n;
416
524
        auto read_count = 0;
417
524
        _buffer.resize(total);
418
7.59k
        for (size_t i = 0; i < total; ++i) {
419
7.07k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
7.07k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
7.07k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
7.07k
        }
426
427
524
        if (LIKELY(read_count > 0)) {
428
524
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
524
        }
430
431
524
        *n = read_count;
432
524
        return Status::OK();
433
524
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
330
                          MutableColumnPtr& dst) override {
409
330
        DCHECK(_parsed);
410
330
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
330
        auto total = *n;
416
330
        auto read_count = 0;
417
330
        _buffer.resize(total);
418
660
        for (size_t i = 0; i < total; ++i) {
419
330
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
330
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
330
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
330
        }
426
427
330
        if (LIKELY(read_count > 0)) {
428
330
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
330
        }
430
431
330
        *n = read_count;
432
330
        return Status::OK();
433
330
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
274
                          MutableColumnPtr& dst) override {
409
274
        DCHECK(_parsed);
410
274
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
274
        auto total = *n;
416
274
        auto read_count = 0;
417
274
        _buffer.resize(total);
418
566
        for (size_t i = 0; i < total; ++i) {
419
292
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
292
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
292
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
292
        }
426
427
274
        if (LIKELY(read_count > 0)) {
428
274
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
274
        }
430
431
274
        *n = read_count;
432
274
        return Status::OK();
433
274
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
254
                          MutableColumnPtr& dst) override {
409
254
        DCHECK(_parsed);
410
254
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
254
        auto total = *n;
416
254
        auto read_count = 0;
417
254
        _buffer.resize(total);
418
508
        for (size_t i = 0; i < total; ++i) {
419
254
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
254
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
254
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
254
        }
426
427
254
        if (LIKELY(read_count > 0)) {
428
254
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
254
        }
430
431
254
        *n = read_count;
432
254
        return Status::OK();
433
254
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
244
                          MutableColumnPtr& dst) override {
409
244
        DCHECK(_parsed);
410
244
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
244
        auto total = *n;
416
244
        auto read_count = 0;
417
244
        _buffer.resize(total);
418
1.17k
        for (size_t i = 0; i < total; ++i) {
419
930
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
930
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
930
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
930
        }
426
427
244
        if (LIKELY(read_count > 0)) {
428
244
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
244
        }
430
431
244
        *n = read_count;
432
244
        return Status::OK();
433
244
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
860
                          MutableColumnPtr& dst) override {
409
860
        DCHECK(_parsed);
410
860
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
860
        auto total = *n;
416
860
        auto read_count = 0;
417
860
        _buffer.resize(total);
418
1.75k
        for (size_t i = 0; i < total; ++i) {
419
892
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
892
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
892
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
892
        }
426
427
860
        if (LIKELY(read_count > 0)) {
428
860
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
860
        }
430
431
860
        *n = read_count;
432
860
        return Status::OK();
433
860
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
2.41k
                          MutableColumnPtr& dst) override {
409
2.41k
        DCHECK(_parsed);
410
2.41k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
2.41k
        auto total = *n;
416
2.41k
        auto read_count = 0;
417
2.41k
        _buffer.resize(total);
418
41.7k
        for (size_t i = 0; i < total; ++i) {
419
39.3k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
39.3k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
39.3k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
39.3k
        }
426
427
2.41k
        if (LIKELY(read_count > 0)) {
428
2.41k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
2.41k
        }
430
431
2.41k
        *n = read_count;
432
2.41k
        return Status::OK();
433
2.41k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
180
                          MutableColumnPtr& dst) override {
409
180
        DCHECK(_parsed);
410
180
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
180
        auto total = *n;
416
180
        auto read_count = 0;
417
180
        _buffer.resize(total);
418
952
        for (size_t i = 0; i < total; ++i) {
419
772
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
772
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
772
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
772
        }
426
427
180
        if (LIKELY(read_count > 0)) {
428
180
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
180
        }
430
431
180
        *n = read_count;
432
180
        return Status::OK();
433
180
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
62
                          MutableColumnPtr& dst) override {
409
62
        DCHECK(_parsed);
410
62
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
62
        auto total = *n;
416
62
        auto read_count = 0;
417
62
        _buffer.resize(total);
418
124
        for (size_t i = 0; i < total; ++i) {
419
62
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
62
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
62
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
62
        }
426
427
62
        if (LIKELY(read_count > 0)) {
428
62
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
62
        }
430
431
62
        *n = read_count;
432
62
        return Status::OK();
433
62
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
280
                          MutableColumnPtr& dst) override {
409
280
        DCHECK(_parsed);
410
280
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
280
        auto total = *n;
416
280
        auto read_count = 0;
417
280
        _buffer.resize(total);
418
560
        for (size_t i = 0; i < total; ++i) {
419
280
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
280
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
280
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
280
        }
426
427
280
        if (LIKELY(read_count > 0)) {
428
280
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
280
        }
430
431
280
        *n = read_count;
432
280
        return Status::OK();
433
280
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
288
                          MutableColumnPtr& dst) override {
409
288
        DCHECK(_parsed);
410
288
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
288
        auto total = *n;
416
288
        auto read_count = 0;
417
288
        _buffer.resize(total);
418
576
        for (size_t i = 0; i < total; ++i) {
419
288
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
288
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
288
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
288
        }
426
427
288
        if (LIKELY(read_count > 0)) {
428
288
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
288
        }
430
431
288
        *n = read_count;
432
288
        return Status::OK();
433
288
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
464
                          MutableColumnPtr& dst) override {
409
464
        DCHECK(_parsed);
410
464
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
464
        auto total = *n;
416
464
        auto read_count = 0;
417
464
        _buffer.resize(total);
418
928
        for (size_t i = 0; i < total; ++i) {
419
464
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
464
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
464
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
464
        }
426
427
464
        if (LIKELY(read_count > 0)) {
428
464
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
464
        }
430
431
464
        *n = read_count;
432
464
        return Status::OK();
433
464
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
434
435
3.70k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
3.70k
        return next_batch<false>(n, dst);
437
3.70k
    }
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
435
3.70k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
3.70k
        return next_batch<false>(n, dst);
437
3.70k
    }
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
438
439
3
    size_t count() const override { return _num_elements; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
439
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
440
441
13.5k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
8.77k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
441
120
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
441
128
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
568
    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
441
92
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE13current_indexEv
Line
Count
Source
441
76
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
108
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
441
2.88k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
441
102
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
441
164
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
441
344
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE13current_indexEv
Line
Count
Source
441
8
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE13current_indexEv
Line
Count
Source
441
64
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
441
74
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
441
68
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
442
443
3.67M
    char* get_data(size_t index) const {
444
3.67M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
3.67M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
2.93M
    char* get_data(size_t index) const {
444
2.93M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
2.93M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
603k
    char* get_data(size_t index) const {
444
603k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
603k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
443
2.54k
    char* get_data(size_t index) const {
444
2.54k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
2.54k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
443
44.0k
    char* get_data(size_t index) const {
444
44.0k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
44.0k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
14.6k
    char* get_data(size_t index) const {
444
14.6k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
14.6k
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
906
    char* get_data(size_t index) const {
444
906
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
906
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
815
    char* get_data(size_t index) const {
444
815
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
815
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
852
    char* get_data(size_t index) const {
444
852
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
852
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
12.5k
    char* get_data(size_t index) const {
444
12.5k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
12.5k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
11.5k
    char* get_data(size_t index) const {
444
11.5k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
11.5k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
443
41.7k
    char* get_data(size_t index) const {
444
41.7k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
41.7k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
443
1.19k
    char* get_data(size_t index) const {
444
1.19k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.19k
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
443
194
    char* get_data(size_t index) const {
444
194
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
194
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
443
352
    char* get_data(size_t index) const {
444
352
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
352
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
443
600
    char* get_data(size_t index) const {
444
600
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
600
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
700
    char* get_data(size_t index) const {
444
700
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
700
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
446
447
private:
448
    void _copy_next_values(size_t n, void* data) {
449
        memcpy(data, get_data(_cur_index), n * SIZE_OF_TYPE);
450
    }
451
452
    using CppType = typename TypeTraits<Type>::CppType;
453
454
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
455
456
    Slice _data;
457
    PageDecoderOptions _options;
458
    bool _parsed;
459
    size_t _num_elements;
460
    size_t _num_element_after_padding;
461
462
    int _size_of_element;
463
    size_t _cur_index;
464
465
    std::vector<std::conditional_t<std::is_same_v<CppType, bool>, uint8_t, CppType>> _buffer;
466
467
    friend class BinaryDictPageDecoder;
468
};
469
470
} // namespace segment_v2
471
} // namespace doris