Coverage Report

Created: 2026-06-17 07:38

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
818k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
390k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
62.1k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
8.40k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
114k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
10.5k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
95
72.2k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
95
12.1k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
95
19.3k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
185
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
36.7k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
95
43.7k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
283
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
95
7.03k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
192
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
95
9.61k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
95
12.0k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
95
16.0k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
95
1.15k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
95
781
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
95
677
    Status init() override { return reset(); }
96
97
153M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
152M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
70.7k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
13.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
499k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
10.0k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
73.2k
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12is_page_fullEv
Line
Count
Source
97
11.8k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
97
21.5k
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12is_page_fullEv
Line
Count
Source
97
192
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
70.8k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
45.8k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
97
337
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
Line
Count
Source
97
7.03k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
97
100
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
97
5.11k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
23.6k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
97
17.0k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Line
Count
Source
97
1.36k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Line
Count
Source
97
710
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
97
3.10k
    bool is_page_full() override { return _remain_element_capacity == 0; }
98
99
1.50M
    Status add(const uint8_t* vals, size_t* count) override {
100
1.50M
        return add_internal<false>(vals, count);
101
1.50M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
99
627k
    Status add(const uint8_t* vals, size_t* count) override {
100
627k
        return add_internal<false>(vals, count);
101
627k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
70.7k
    Status add(const uint8_t* vals, size_t* count) override {
100
70.7k
        return add_internal<false>(vals, count);
101
70.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
13.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
13.3k
        return add_internal<false>(vals, count);
101
13.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
499k
    Status add(const uint8_t* vals, size_t* count) override {
100
499k
        return add_internal<false>(vals, count);
101
499k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
10.0k
    Status add(const uint8_t* vals, size_t* count) override {
100
10.0k
        return add_internal<false>(vals, count);
101
10.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
73.2k
    Status add(const uint8_t* vals, size_t* count) override {
100
73.2k
        return add_internal<false>(vals, count);
101
73.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
99
11.8k
    Status add(const uint8_t* vals, size_t* count) override {
100
11.8k
        return add_internal<false>(vals, count);
101
11.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
99
21.5k
    Status add(const uint8_t* vals, size_t* count) override {
100
21.5k
        return add_internal<false>(vals, count);
101
21.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
192
    Status add(const uint8_t* vals, size_t* count) override {
100
192
        return add_internal<false>(vals, count);
101
192
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
70.8k
    Status add(const uint8_t* vals, size_t* count) override {
100
70.8k
        return add_internal<false>(vals, count);
101
70.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
45.8k
    Status add(const uint8_t* vals, size_t* count) override {
100
45.8k
        return add_internal<false>(vals, count);
101
45.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
99
337
    Status add(const uint8_t* vals, size_t* count) override {
100
337
        return add_internal<false>(vals, count);
101
337
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
Line
Count
Source
99
7.03k
    Status add(const uint8_t* vals, size_t* count) override {
100
7.03k
        return add_internal<false>(vals, count);
101
7.03k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
100
    Status add(const uint8_t* vals, size_t* count) override {
100
100
        return add_internal<false>(vals, count);
101
100
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
99
5.11k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.11k
        return add_internal<false>(vals, count);
101
5.11k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
23.6k
    Status add(const uint8_t* vals, size_t* count) override {
100
23.6k
        return add_internal<false>(vals, count);
101
23.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
99
17.0k
    Status add(const uint8_t* vals, size_t* count) override {
100
17.0k
        return add_internal<false>(vals, count);
101
17.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Line
Count
Source
99
1.36k
    Status add(const uint8_t* vals, size_t* count) override {
100
1.36k
        return add_internal<false>(vals, count);
101
1.36k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Line
Count
Source
99
710
    Status add(const uint8_t* vals, size_t* count) override {
100
710
        return add_internal<false>(vals, count);
101
710
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
99
3.10k
    Status add(const uint8_t* vals, size_t* count) override {
100
3.10k
        return add_internal<false>(vals, count);
101
3.10k
    }
102
103
153M
    Status single_add(const uint8_t* vals, size_t* count) {
104
153M
        return add_internal<true>(vals, count);
105
153M
    }
106
107
    template <bool single>
108
153M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
153M
        DCHECK(!_finished);
110
153M
        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
153M
        uint32_t to_add = cast_set<UInt32>(
126
153M
                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
153M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
153M
        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
153M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
154M
        _count += to_add;
134
154M
        _remain_element_capacity -= to_add;
135
154M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
154M
        *num_written = to_add;
138
154M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
153M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
153M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
153M
                        *reinterpret_cast<const uint32_t*>(vals);
149
153M
                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
153M
        }
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
154M
        return Status::OK();
159
153M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
627k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
627k
        DCHECK(!_finished);
110
627k
        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
627k
        uint32_t to_add = cast_set<UInt32>(
126
627k
                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
627k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
627k
        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
627k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
627k
        _count += to_add;
134
627k
        _remain_element_capacity -= to_add;
135
627k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
627k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
627k
        memcpy(&_data[orig_size], vals, to_add_size);
158
627k
        return Status::OK();
159
627k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
152M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
152M
        DCHECK(!_finished);
110
152M
        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
152M
        uint32_t to_add = cast_set<UInt32>(
126
152M
                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
152M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
152M
        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
152M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
153M
        _count += to_add;
134
153M
        _remain_element_capacity -= to_add;
135
153M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
153M
        *num_written = to_add;
138
153M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
153M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
153M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
153M
                        *reinterpret_cast<const uint32_t*>(vals);
149
153M
                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
153M
        }
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
153M
        return Status::OK();
159
152M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
70.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
70.7k
        DCHECK(!_finished);
110
70.7k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
70.7k
        uint32_t to_add = cast_set<UInt32>(
126
70.7k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
70.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
70.7k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
70.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
70.7k
        _count += to_add;
134
70.7k
        _remain_element_capacity -= to_add;
135
70.7k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
70.7k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
70.7k
        memcpy(&_data[orig_size], vals, to_add_size);
158
70.7k
        return Status::OK();
159
70.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
13.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
13.3k
        DCHECK(!_finished);
110
13.3k
        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
13.3k
        uint32_t to_add = cast_set<UInt32>(
126
13.3k
                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
13.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
13.3k
        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
13.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
13.3k
        _count += to_add;
134
13.3k
        _remain_element_capacity -= to_add;
135
13.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
13.3k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
13.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
13.3k
        return Status::OK();
159
13.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
499k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
499k
        DCHECK(!_finished);
110
499k
        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
499k
        uint32_t to_add = cast_set<UInt32>(
126
499k
                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
499k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
499k
        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
499k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
499k
        _count += to_add;
134
499k
        _remain_element_capacity -= to_add;
135
499k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
499k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
499k
        memcpy(&_data[orig_size], vals, to_add_size);
158
499k
        return Status::OK();
159
499k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
10.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
10.0k
        DCHECK(!_finished);
110
10.0k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
10.0k
        uint32_t to_add = cast_set<UInt32>(
126
10.0k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
10.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
10.0k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
10.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
10.0k
        _count += to_add;
134
10.0k
        _remain_element_capacity -= to_add;
135
10.0k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
10.0k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
10.0k
        memcpy(&_data[orig_size], vals, to_add_size);
158
10.0k
        return Status::OK();
159
10.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
73.1k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
73.1k
        DCHECK(!_finished);
110
73.1k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
73.1k
        uint32_t to_add = cast_set<UInt32>(
126
73.1k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
73.1k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
73.1k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
73.1k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
73.2k
        _count += to_add;
134
73.2k
        _remain_element_capacity -= to_add;
135
73.2k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
73.2k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
73.2k
        memcpy(&_data[orig_size], vals, to_add_size);
158
73.2k
        return Status::OK();
159
73.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
11.8k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
11.8k
        DCHECK(!_finished);
110
11.8k
        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.8k
        uint32_t to_add = cast_set<UInt32>(
126
11.8k
                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.8k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
11.8k
        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.8k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
11.8k
        _count += to_add;
134
11.8k
        _remain_element_capacity -= to_add;
135
11.8k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
11.8k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
11.8k
        memcpy(&_data[orig_size], vals, to_add_size);
158
11.8k
        return Status::OK();
159
11.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
21.5k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
21.5k
        DCHECK(!_finished);
110
21.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
21.5k
        uint32_t to_add = cast_set<UInt32>(
126
21.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
21.5k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
21.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
21.5k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
21.5k
        _count += to_add;
134
21.5k
        _remain_element_capacity -= to_add;
135
21.5k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
21.5k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
21.5k
        memcpy(&_data[orig_size], vals, to_add_size);
158
21.5k
        return Status::OK();
159
21.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
192
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
192
        DCHECK(!_finished);
110
192
        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
192
        uint32_t to_add = cast_set<UInt32>(
126
192
                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
192
        int to_add_size = to_add * SIZE_OF_TYPE;
129
192
        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
192
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
192
        _count += to_add;
134
192
        _remain_element_capacity -= to_add;
135
192
        _raw_data_size += to_add_size;
136
        // return added number through count
137
192
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
192
        memcpy(&_data[orig_size], vals, to_add_size);
158
192
        return Status::OK();
159
192
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
70.8k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
70.8k
        DCHECK(!_finished);
110
70.8k
        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
70.8k
        uint32_t to_add = cast_set<UInt32>(
126
70.8k
                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
70.8k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
70.8k
        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
70.8k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
70.8k
        _count += to_add;
134
70.8k
        _remain_element_capacity -= to_add;
135
70.8k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
70.8k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
70.8k
        memcpy(&_data[orig_size], vals, to_add_size);
158
70.8k
        return Status::OK();
159
70.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
45.8k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
45.8k
        DCHECK(!_finished);
110
45.8k
        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
45.8k
        uint32_t to_add = cast_set<UInt32>(
126
45.8k
                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
45.8k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
45.8k
        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
45.8k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
45.8k
        _count += to_add;
134
45.8k
        _remain_element_capacity -= to_add;
135
45.8k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
45.8k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
45.8k
        memcpy(&_data[orig_size], vals, to_add_size);
158
45.8k
        return Status::OK();
159
45.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
337
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
337
        DCHECK(!_finished);
110
337
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
337
        uint32_t to_add = cast_set<UInt32>(
126
337
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
337
        int to_add_size = to_add * SIZE_OF_TYPE;
129
337
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
337
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
337
        _count += to_add;
134
337
        _remain_element_capacity -= to_add;
135
337
        _raw_data_size += to_add_size;
136
        // return added number through count
137
337
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
337
        memcpy(&_data[orig_size], vals, to_add_size);
158
337
        return Status::OK();
159
337
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
7.03k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
7.03k
        DCHECK(!_finished);
110
7.03k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
7.03k
        uint32_t to_add = cast_set<UInt32>(
126
7.03k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
7.03k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
7.03k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
7.03k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
7.03k
        _count += to_add;
134
7.03k
        _remain_element_capacity -= to_add;
135
7.03k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
7.03k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
7.03k
        memcpy(&_data[orig_size], vals, to_add_size);
158
7.03k
        return Status::OK();
159
7.03k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
100
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
100
        DCHECK(!_finished);
110
100
        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
100
        uint32_t to_add = cast_set<UInt32>(
126
100
                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
100
        int to_add_size = to_add * SIZE_OF_TYPE;
129
100
        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
100
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
100
        _count += to_add;
134
100
        _remain_element_capacity -= to_add;
135
100
        _raw_data_size += to_add_size;
136
        // return added number through count
137
100
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
100
        memcpy(&_data[orig_size], vals, to_add_size);
158
100
        return Status::OK();
159
100
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
5.11k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.11k
        DCHECK(!_finished);
110
5.11k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
5.11k
        uint32_t to_add = cast_set<UInt32>(
126
5.11k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
5.11k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.11k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
5.11k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.11k
        _count += to_add;
134
5.11k
        _remain_element_capacity -= to_add;
135
5.11k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.11k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
5.11k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.11k
        return Status::OK();
159
5.11k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
23.6k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
23.6k
        DCHECK(!_finished);
110
23.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
23.6k
        uint32_t to_add = cast_set<UInt32>(
126
23.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
23.6k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
23.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
23.6k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
23.6k
        _count += to_add;
134
23.6k
        _remain_element_capacity -= to_add;
135
23.6k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
23.6k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
23.6k
        memcpy(&_data[orig_size], vals, to_add_size);
158
23.6k
        return Status::OK();
159
23.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
17.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
17.0k
        DCHECK(!_finished);
110
17.0k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
17.0k
        uint32_t to_add = cast_set<UInt32>(
126
17.0k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
17.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
17.0k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
17.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
17.0k
        _count += to_add;
134
17.0k
        _remain_element_capacity -= to_add;
135
17.0k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
17.0k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
17.0k
        memcpy(&_data[orig_size], vals, to_add_size);
158
17.0k
        return Status::OK();
159
17.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
1.36k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
1.36k
        DCHECK(!_finished);
110
1.36k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
1.36k
        uint32_t to_add = cast_set<UInt32>(
126
1.36k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
1.36k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
1.36k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
1.36k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
1.36k
        _count += to_add;
134
1.36k
        _remain_element_capacity -= to_add;
135
1.36k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
1.36k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
1.36k
        memcpy(&_data[orig_size], vals, to_add_size);
158
1.36k
        return Status::OK();
159
1.36k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
710
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
710
        DCHECK(!_finished);
110
710
        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
710
        uint32_t to_add = cast_set<UInt32>(
126
710
                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
710
        int to_add_size = to_add * SIZE_OF_TYPE;
129
710
        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
710
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
710
        _count += to_add;
134
710
        _remain_element_capacity -= to_add;
135
710
        _raw_data_size += to_add_size;
136
        // return added number through count
137
710
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
710
        memcpy(&_data[orig_size], vals, to_add_size);
158
710
        return Status::OK();
159
710
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
3.10k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
3.10k
        DCHECK(!_finished);
110
3.10k
        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.10k
        uint32_t to_add = cast_set<UInt32>(
126
3.10k
                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.10k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
3.10k
        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.10k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
3.10k
        _count += to_add;
134
3.10k
        _remain_element_capacity -= to_add;
135
3.10k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
3.10k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
3.10k
        memcpy(&_data[orig_size], vals, to_add_size);
158
3.10k
        return Status::OK();
159
3.10k
    }
160
161
805k
    Status finish(OwnedSlice* slice) override {
162
805k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
805k
        return Status::OK();
164
805k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
371k
    Status finish(OwnedSlice* slice) override {
162
371k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
371k
        return Status::OK();
164
371k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
61.0k
    Status finish(OwnedSlice* slice) override {
162
61.0k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
61.0k
        return Status::OK();
164
61.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7.95k
    Status finish(OwnedSlice* slice) override {
162
7.95k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.95k
        return Status::OK();
164
7.95k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
118k
    Status finish(OwnedSlice* slice) override {
162
118k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
118k
        return Status::OK();
164
118k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
10.1k
    Status finish(OwnedSlice* slice) override {
162
10.1k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
10.1k
        return Status::OK();
164
10.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
72.0k
    Status finish(OwnedSlice* slice) override {
162
72.0k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
72.0k
        return Status::OK();
164
72.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
11.3k
    Status finish(OwnedSlice* slice) override {
162
11.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
11.3k
        return Status::OK();
164
11.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
19.2k
    Status finish(OwnedSlice* slice) override {
162
19.2k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
19.2k
        return Status::OK();
164
19.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
197
    Status finish(OwnedSlice* slice) override {
162
197
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
197
        return Status::OK();
164
197
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
37.3k
    Status finish(OwnedSlice* slice) override {
162
37.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
37.3k
        return Status::OK();
164
37.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
42.7k
    Status finish(OwnedSlice* slice) override {
162
42.7k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
42.7k
        return Status::OK();
164
42.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
437
    Status finish(OwnedSlice* slice) override {
162
437
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
437
        return Status::OK();
164
437
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7.12k
    Status finish(OwnedSlice* slice) override {
162
7.12k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.12k
        return Status::OK();
164
7.12k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
108
    Status finish(OwnedSlice* slice) override {
162
108
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
108
        return Status::OK();
164
108
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
9.60k
    Status finish(OwnedSlice* slice) override {
162
9.60k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
9.61k
        return Status::OK();
164
9.60k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
18.4k
    Status finish(OwnedSlice* slice) override {
162
18.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
18.5k
        return Status::OK();
164
18.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
16.1k
    Status finish(OwnedSlice* slice) override {
162
16.1k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
16.1k
        return Status::OK();
164
16.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
1.06k
    Status finish(OwnedSlice* slice) override {
162
1.06k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
1.06k
        return Status::OK();
164
1.06k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
696
    Status finish(OwnedSlice* slice) override {
162
696
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
696
        return Status::OK();
164
696
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
596
    Status finish(OwnedSlice* slice) override {
162
596
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
596
        return Status::OK();
164
596
    }
165
166
1.94M
    Status reset() override {
167
1.94M
        RETURN_IF_CATCH_EXCEPTION({
168
1.94M
            size_t block_size = _options.data_page_size;
169
1.94M
            _count = 0;
170
1.94M
            _raw_data_size = 0;
171
1.94M
            _data.clear();
172
1.94M
            _data.reserve(block_size);
173
1.94M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.94M
                    << "buffer must be naturally-aligned";
175
1.94M
            _buffer.clear();
176
1.94M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.94M
            _finished = false;
178
1.94M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.94M
        });
180
1.94M
        return Status::OK();
181
1.94M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
166
1.08M
    Status reset() override {
167
1.08M
        RETURN_IF_CATCH_EXCEPTION({
168
1.08M
            size_t block_size = _options.data_page_size;
169
1.08M
            _count = 0;
170
1.08M
            _raw_data_size = 0;
171
1.08M
            _data.clear();
172
1.08M
            _data.reserve(block_size);
173
1.08M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.08M
                    << "buffer must be naturally-aligned";
175
1.08M
            _buffer.clear();
176
1.08M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.08M
            _finished = false;
178
1.08M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.08M
        });
180
1.08M
        return Status::OK();
181
1.08M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
123k
    Status reset() override {
167
123k
        RETURN_IF_CATCH_EXCEPTION({
168
123k
            size_t block_size = _options.data_page_size;
169
123k
            _count = 0;
170
123k
            _raw_data_size = 0;
171
123k
            _data.clear();
172
123k
            _data.reserve(block_size);
173
123k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
123k
                    << "buffer must be naturally-aligned";
175
123k
            _buffer.clear();
176
123k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
123k
            _finished = false;
178
123k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
123k
        });
180
123k
        return Status::OK();
181
123k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
166
16.3k
    Status reset() override {
167
16.3k
        RETURN_IF_CATCH_EXCEPTION({
168
16.3k
            size_t block_size = _options.data_page_size;
169
16.3k
            _count = 0;
170
16.3k
            _raw_data_size = 0;
171
16.3k
            _data.clear();
172
16.3k
            _data.reserve(block_size);
173
16.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
16.3k
                    << "buffer must be naturally-aligned";
175
16.3k
            _buffer.clear();
176
16.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
16.3k
            _finished = false;
178
16.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
16.3k
        });
180
16.3k
        return Status::OK();
181
16.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
232k
    Status reset() override {
167
232k
        RETURN_IF_CATCH_EXCEPTION({
168
232k
            size_t block_size = _options.data_page_size;
169
232k
            _count = 0;
170
232k
            _raw_data_size = 0;
171
232k
            _data.clear();
172
232k
            _data.reserve(block_size);
173
232k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
232k
                    << "buffer must be naturally-aligned";
175
232k
            _buffer.clear();
176
232k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
232k
            _finished = false;
178
232k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
232k
        });
180
232k
        return Status::OK();
181
232k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
166
20.6k
    Status reset() override {
167
20.6k
        RETURN_IF_CATCH_EXCEPTION({
168
20.6k
            size_t block_size = _options.data_page_size;
169
20.6k
            _count = 0;
170
20.6k
            _raw_data_size = 0;
171
20.6k
            _data.clear();
172
20.6k
            _data.reserve(block_size);
173
20.6k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
20.6k
                    << "buffer must be naturally-aligned";
175
20.6k
            _buffer.clear();
176
20.6k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
20.6k
            _finished = false;
178
20.6k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
20.6k
        });
180
20.6k
        return Status::OK();
181
20.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
166
144k
    Status reset() override {
167
144k
        RETURN_IF_CATCH_EXCEPTION({
168
144k
            size_t block_size = _options.data_page_size;
169
144k
            _count = 0;
170
144k
            _raw_data_size = 0;
171
144k
            _data.clear();
172
144k
            _data.reserve(block_size);
173
144k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
144k
                    << "buffer must be naturally-aligned";
175
144k
            _buffer.clear();
176
144k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
144k
            _finished = false;
178
144k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
144k
        });
180
144k
        return Status::OK();
181
144k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
166
23.4k
    Status reset() override {
167
23.4k
        RETURN_IF_CATCH_EXCEPTION({
168
23.4k
            size_t block_size = _options.data_page_size;
169
23.4k
            _count = 0;
170
23.4k
            _raw_data_size = 0;
171
23.4k
            _data.clear();
172
23.4k
            _data.reserve(block_size);
173
23.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
23.4k
                    << "buffer must be naturally-aligned";
175
23.4k
            _buffer.clear();
176
23.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
23.4k
            _finished = false;
178
23.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
23.4k
        });
180
23.4k
        return Status::OK();
181
23.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
166
38.6k
    Status reset() override {
167
38.6k
        RETURN_IF_CATCH_EXCEPTION({
168
38.6k
            size_t block_size = _options.data_page_size;
169
38.6k
            _count = 0;
170
38.6k
            _raw_data_size = 0;
171
38.6k
            _data.clear();
172
38.6k
            _data.reserve(block_size);
173
38.6k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
38.6k
                    << "buffer must be naturally-aligned";
175
38.6k
            _buffer.clear();
176
38.6k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
38.6k
            _finished = false;
178
38.6k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
38.6k
        });
180
38.6k
        return Status::OK();
181
38.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
166
382
    Status reset() override {
167
382
        RETURN_IF_CATCH_EXCEPTION({
168
382
            size_t block_size = _options.data_page_size;
169
382
            _count = 0;
170
382
            _raw_data_size = 0;
171
382
            _data.clear();
172
382
            _data.reserve(block_size);
173
382
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
382
                    << "buffer must be naturally-aligned";
175
382
            _buffer.clear();
176
382
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
382
            _finished = false;
178
382
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
382
        });
180
382
        return Status::OK();
181
382
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
166
74.0k
    Status reset() override {
167
74.0k
        RETURN_IF_CATCH_EXCEPTION({
168
74.0k
            size_t block_size = _options.data_page_size;
169
74.0k
            _count = 0;
170
74.0k
            _raw_data_size = 0;
171
74.0k
            _data.clear();
172
74.0k
            _data.reserve(block_size);
173
74.0k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
74.0k
                    << "buffer must be naturally-aligned";
175
74.0k
            _buffer.clear();
176
74.0k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
74.0k
            _finished = false;
178
74.0k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
74.0k
        });
180
74.1k
        return Status::OK();
181
74.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
166
86.4k
    Status reset() override {
167
86.4k
        RETURN_IF_CATCH_EXCEPTION({
168
86.4k
            size_t block_size = _options.data_page_size;
169
86.4k
            _count = 0;
170
86.4k
            _raw_data_size = 0;
171
86.4k
            _data.clear();
172
86.4k
            _data.reserve(block_size);
173
86.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
86.4k
                    << "buffer must be naturally-aligned";
175
86.4k
            _buffer.clear();
176
86.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
86.4k
            _finished = false;
178
86.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
86.4k
        });
180
86.4k
        return Status::OK();
181
86.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
166
720
    Status reset() override {
167
720
        RETURN_IF_CATCH_EXCEPTION({
168
720
            size_t block_size = _options.data_page_size;
169
720
            _count = 0;
170
720
            _raw_data_size = 0;
171
720
            _data.clear();
172
720
            _data.reserve(block_size);
173
720
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
720
                    << "buffer must be naturally-aligned";
175
720
            _buffer.clear();
176
720
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
720
            _finished = false;
178
720
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
720
        });
180
720
        return Status::OK();
181
720
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
Line
Count
Source
166
14.1k
    Status reset() override {
167
14.1k
        RETURN_IF_CATCH_EXCEPTION({
168
14.1k
            size_t block_size = _options.data_page_size;
169
14.1k
            _count = 0;
170
14.1k
            _raw_data_size = 0;
171
14.1k
            _data.clear();
172
14.1k
            _data.reserve(block_size);
173
14.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
14.1k
                    << "buffer must be naturally-aligned";
175
14.1k
            _buffer.clear();
176
14.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
14.1k
            _finished = false;
178
14.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
14.1k
        });
180
14.2k
        return Status::OK();
181
14.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
166
300
    Status reset() override {
167
300
        RETURN_IF_CATCH_EXCEPTION({
168
300
            size_t block_size = _options.data_page_size;
169
300
            _count = 0;
170
300
            _raw_data_size = 0;
171
300
            _data.clear();
172
300
            _data.reserve(block_size);
173
300
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
300
                    << "buffer must be naturally-aligned";
175
300
            _buffer.clear();
176
300
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
300
            _finished = false;
178
300
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
300
        });
180
300
        return Status::OK();
181
300
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
166
19.2k
    Status reset() override {
167
19.2k
        RETURN_IF_CATCH_EXCEPTION({
168
19.2k
            size_t block_size = _options.data_page_size;
169
19.2k
            _count = 0;
170
19.2k
            _raw_data_size = 0;
171
19.2k
            _data.clear();
172
19.2k
            _data.reserve(block_size);
173
19.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
19.2k
                    << "buffer must be naturally-aligned";
175
19.2k
            _buffer.clear();
176
19.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
19.2k
            _finished = false;
178
19.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
19.2k
        });
180
19.2k
        return Status::OK();
181
19.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
30.5k
    Status reset() override {
167
30.5k
        RETURN_IF_CATCH_EXCEPTION({
168
30.5k
            size_t block_size = _options.data_page_size;
169
30.5k
            _count = 0;
170
30.5k
            _raw_data_size = 0;
171
30.5k
            _data.clear();
172
30.5k
            _data.reserve(block_size);
173
30.5k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
30.5k
                    << "buffer must be naturally-aligned";
175
30.5k
            _buffer.clear();
176
30.5k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
30.5k
            _finished = false;
178
30.5k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
30.5k
        });
180
30.5k
        return Status::OK();
181
30.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
166
32.2k
    Status reset() override {
167
32.2k
        RETURN_IF_CATCH_EXCEPTION({
168
32.2k
            size_t block_size = _options.data_page_size;
169
32.2k
            _count = 0;
170
32.2k
            _raw_data_size = 0;
171
32.2k
            _data.clear();
172
32.2k
            _data.reserve(block_size);
173
32.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
32.2k
                    << "buffer must be naturally-aligned";
175
32.2k
            _buffer.clear();
176
32.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
32.2k
            _finished = false;
178
32.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
32.2k
        });
180
32.2k
        return Status::OK();
181
32.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Line
Count
Source
166
2.21k
    Status reset() override {
167
2.21k
        RETURN_IF_CATCH_EXCEPTION({
168
2.21k
            size_t block_size = _options.data_page_size;
169
2.21k
            _count = 0;
170
2.21k
            _raw_data_size = 0;
171
2.21k
            _data.clear();
172
2.21k
            _data.reserve(block_size);
173
2.21k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
2.21k
                    << "buffer must be naturally-aligned";
175
2.21k
            _buffer.clear();
176
2.21k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
2.21k
            _finished = false;
178
2.21k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
2.21k
        });
180
2.21k
        return Status::OK();
181
2.21k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Line
Count
Source
166
1.47k
    Status reset() override {
167
1.47k
        RETURN_IF_CATCH_EXCEPTION({
168
1.47k
            size_t block_size = _options.data_page_size;
169
1.47k
            _count = 0;
170
1.47k
            _raw_data_size = 0;
171
1.47k
            _data.clear();
172
1.47k
            _data.reserve(block_size);
173
1.47k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.47k
                    << "buffer must be naturally-aligned";
175
1.47k
            _buffer.clear();
176
1.47k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.47k
            _finished = false;
178
1.47k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.47k
        });
180
1.47k
        return Status::OK();
181
1.47k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
166
1.27k
    Status reset() override {
167
1.27k
        RETURN_IF_CATCH_EXCEPTION({
168
1.27k
            size_t block_size = _options.data_page_size;
169
1.27k
            _count = 0;
170
1.27k
            _raw_data_size = 0;
171
1.27k
            _data.clear();
172
1.27k
            _data.reserve(block_size);
173
1.27k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.27k
                    << "buffer must be naturally-aligned";
175
1.27k
            _buffer.clear();
176
1.27k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.27k
            _finished = false;
178
1.27k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.27k
        });
180
1.27k
        return Status::OK();
181
1.27k
    }
182
183
4
    size_t count() const override { return _count; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
183
4
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5countEv
184
185
67.1k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
36.8k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
185
9.43k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
185
740
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
9.98k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
1.09k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
1.62k
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
777
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
185
789
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4sizeEv
Line
Count
Source
185
6
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4sizeEv
Line
Count
Source
185
1.71k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
2.53k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4sizeEv
Line
Count
Source
185
13
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4sizeEv
Line
Count
Source
185
6
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4sizeEv
Line
Count
Source
185
2
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4sizeEv
Line
Count
Source
185
145
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
185
315
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
185
1.14k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4sizeEv
Line
Count
Source
185
4
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4sizeEv
Line
Count
Source
185
26
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4sizeEv
Line
Count
Source
185
10
    uint64_t size() const override { return _buffer.size(); }
186
187
504k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
69.6k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
61.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
7.95k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
118k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
187
10.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
72.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
187
11.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
19.2k
    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
197
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
187
37.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
187
42.7k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
187
437
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
Line
Count
Source
187
7.12k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
187
108
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
187
9.61k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
18.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
187
16.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE17get_raw_data_sizeEv
Line
Count
Source
187
1.06k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Line
Count
Source
187
696
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
187
596
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
818k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
390k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
62.1k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
8.40k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
114k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
10.5k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
72.1k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
12.1k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
19.3k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
185
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
36.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
43.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
282
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
7.02k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
192
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.61k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
12.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
16.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1.15k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
780
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
677
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
192
193
805k
    OwnedSlice _finish(int final_size_of_type) {
194
805k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
805k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
805k
        int padding_elems = num_elems_after_padding - _count;
199
805k
        int padding_bytes = padding_elems * final_size_of_type;
200
23.3M
        for (int i = 0; i < padding_bytes; i++) {
201
22.5M
            _data.push_back(0);
202
22.5M
        }
203
204
        // reserve enough place for compression
205
805k
        _buffer.resize(
206
805k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
805k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
805k
        int64_t bytes =
210
805k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
805k
                                         num_elems_after_padding, final_size_of_type, 0);
212
805k
        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
805k
        encode_fixed32_le(&_buffer[0], _count);
222
805k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
805k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
805k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
805k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
805k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
805k
        return _buffer.build();
229
805k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
371k
    OwnedSlice _finish(int final_size_of_type) {
194
371k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
371k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
371k
        int padding_elems = num_elems_after_padding - _count;
199
371k
        int padding_bytes = padding_elems * final_size_of_type;
200
7.34M
        for (int i = 0; i < padding_bytes; i++) {
201
6.97M
            _data.push_back(0);
202
6.97M
        }
203
204
        // reserve enough place for compression
205
371k
        _buffer.resize(
206
371k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
371k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
371k
        int64_t bytes =
210
371k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
371k
                                         num_elems_after_padding, final_size_of_type, 0);
212
371k
        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
371k
        encode_fixed32_le(&_buffer[0], _count);
222
371k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
371k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
371k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
371k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
371k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
371k
        return _buffer.build();
229
371k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
61.0k
    OwnedSlice _finish(int final_size_of_type) {
194
61.0k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
61.0k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
61.0k
        int padding_elems = num_elems_after_padding - _count;
199
61.0k
        int padding_bytes = padding_elems * final_size_of_type;
200
396k
        for (int i = 0; i < padding_bytes; i++) {
201
335k
            _data.push_back(0);
202
335k
        }
203
204
        // reserve enough place for compression
205
61.0k
        _buffer.resize(
206
61.0k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
61.0k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
61.0k
        int64_t bytes =
210
61.0k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
61.0k
                                         num_elems_after_padding, final_size_of_type, 0);
212
61.0k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
61.0k
        encode_fixed32_le(&_buffer[0], _count);
222
61.0k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
61.0k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
61.0k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
61.0k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
61.0k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
61.0k
        return _buffer.build();
229
61.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
7.95k
    OwnedSlice _finish(int final_size_of_type) {
194
7.95k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.95k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.95k
        int padding_elems = num_elems_after_padding - _count;
199
7.95k
        int padding_bytes = padding_elems * final_size_of_type;
200
82.2k
        for (int i = 0; i < padding_bytes; i++) {
201
74.2k
            _data.push_back(0);
202
74.2k
        }
203
204
        // reserve enough place for compression
205
7.95k
        _buffer.resize(
206
7.95k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.95k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.95k
        int64_t bytes =
210
7.95k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.95k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.95k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
7.95k
        encode_fixed32_le(&_buffer[0], _count);
222
7.95k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.95k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.95k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.95k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.95k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.95k
        return _buffer.build();
229
7.95k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
118k
    OwnedSlice _finish(int final_size_of_type) {
194
118k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
118k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
118k
        int padding_elems = num_elems_after_padding - _count;
199
118k
        int padding_bytes = padding_elems * final_size_of_type;
200
5.24M
        for (int i = 0; i < padding_bytes; i++) {
201
5.13M
            _data.push_back(0);
202
5.13M
        }
203
204
        // reserve enough place for compression
205
118k
        _buffer.resize(
206
118k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
118k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
118k
        int64_t bytes =
210
118k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
118k
                                         num_elems_after_padding, final_size_of_type, 0);
212
118k
        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
118k
        encode_fixed32_le(&_buffer[0], _count);
222
118k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
118k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
118k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
118k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
118k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
118k
        return _buffer.build();
229
118k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
10.1k
    OwnedSlice _finish(int final_size_of_type) {
194
10.1k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
10.1k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
10.1k
        int padding_elems = num_elems_after_padding - _count;
199
10.1k
        int padding_bytes = padding_elems * final_size_of_type;
200
696k
        for (int i = 0; i < padding_bytes; i++) {
201
686k
            _data.push_back(0);
202
686k
        }
203
204
        // reserve enough place for compression
205
10.1k
        _buffer.resize(
206
10.1k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
10.1k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
10.1k
        int64_t bytes =
210
10.1k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
10.1k
                                         num_elems_after_padding, final_size_of_type, 0);
212
10.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
10.1k
        encode_fixed32_le(&_buffer[0], _count);
222
10.1k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
10.1k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
10.1k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
10.1k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
10.1k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
10.1k
        return _buffer.build();
229
10.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
72.0k
    OwnedSlice _finish(int final_size_of_type) {
194
72.0k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
72.0k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
72.0k
        int padding_elems = num_elems_after_padding - _count;
199
72.0k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.48M
        for (int i = 0; i < padding_bytes; i++) {
201
3.40M
            _data.push_back(0);
202
3.40M
        }
203
204
        // reserve enough place for compression
205
72.0k
        _buffer.resize(
206
72.0k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
72.0k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
72.0k
        int64_t bytes =
210
72.0k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
72.0k
                                         num_elems_after_padding, final_size_of_type, 0);
212
72.0k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
72.0k
        encode_fixed32_le(&_buffer[0], _count);
222
72.0k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
72.0k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
72.0k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
72.0k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
72.0k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
72.0k
        return _buffer.build();
229
72.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
11.3k
    OwnedSlice _finish(int final_size_of_type) {
194
11.3k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
11.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
11.3k
        int padding_elems = num_elems_after_padding - _count;
199
11.3k
        int padding_bytes = padding_elems * final_size_of_type;
200
245k
        for (int i = 0; i < padding_bytes; i++) {
201
234k
            _data.push_back(0);
202
234k
        }
203
204
        // reserve enough place for compression
205
11.3k
        _buffer.resize(
206
11.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
11.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
11.3k
        int64_t bytes =
210
11.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
11.3k
                                         num_elems_after_padding, final_size_of_type, 0);
212
11.3k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
11.3k
        encode_fixed32_le(&_buffer[0], _count);
222
11.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
11.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
11.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
11.3k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
11.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
11.3k
        return _buffer.build();
229
11.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
19.2k
    OwnedSlice _finish(int final_size_of_type) {
194
19.2k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
19.2k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
19.2k
        int padding_elems = num_elems_after_padding - _count;
199
19.2k
        int padding_bytes = padding_elems * final_size_of_type;
200
873k
        for (int i = 0; i < padding_bytes; i++) {
201
853k
            _data.push_back(0);
202
853k
        }
203
204
        // reserve enough place for compression
205
19.2k
        _buffer.resize(
206
19.2k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
19.2k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
19.2k
        int64_t bytes =
210
19.2k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
19.2k
                                         num_elems_after_padding, final_size_of_type, 0);
212
19.2k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
19.2k
        encode_fixed32_le(&_buffer[0], _count);
222
19.2k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
19.2k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
19.2k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
19.2k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
19.2k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
19.2k
        return _buffer.build();
229
19.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
197
    OwnedSlice _finish(int final_size_of_type) {
194
197
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
197
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
197
        int padding_elems = num_elems_after_padding - _count;
199
197
        int padding_bytes = padding_elems * final_size_of_type;
200
2.69k
        for (int i = 0; i < padding_bytes; i++) {
201
2.49k
            _data.push_back(0);
202
2.49k
        }
203
204
        // reserve enough place for compression
205
197
        _buffer.resize(
206
197
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
197
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
197
        int64_t bytes =
210
197
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
197
                                         num_elems_after_padding, final_size_of_type, 0);
212
197
        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
197
        encode_fixed32_le(&_buffer[0], _count);
222
197
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
197
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
197
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
197
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
197
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
197
        return _buffer.build();
229
197
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
193
37.3k
    OwnedSlice _finish(int final_size_of_type) {
194
37.3k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
37.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
37.3k
        int padding_elems = num_elems_after_padding - _count;
199
37.3k
        int padding_bytes = padding_elems * final_size_of_type;
200
801k
        for (int i = 0; i < padding_bytes; i++) {
201
764k
            _data.push_back(0);
202
764k
        }
203
204
        // reserve enough place for compression
205
37.3k
        _buffer.resize(
206
37.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
37.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
37.3k
        int64_t bytes =
210
37.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
37.3k
                                         num_elems_after_padding, final_size_of_type, 0);
212
37.3k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
37.3k
        encode_fixed32_le(&_buffer[0], _count);
222
37.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
37.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
37.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
37.3k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
37.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
37.3k
        return _buffer.build();
229
37.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
193
42.7k
    OwnedSlice _finish(int final_size_of_type) {
194
42.7k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
42.7k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
42.7k
        int padding_elems = num_elems_after_padding - _count;
199
42.7k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.80M
        for (int i = 0; i < padding_bytes; i++) {
201
1.76M
            _data.push_back(0);
202
1.76M
        }
203
204
        // reserve enough place for compression
205
42.7k
        _buffer.resize(
206
42.7k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
42.7k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
42.7k
        int64_t bytes =
210
42.7k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
42.7k
                                         num_elems_after_padding, final_size_of_type, 0);
212
42.7k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
42.7k
        encode_fixed32_le(&_buffer[0], _count);
222
42.7k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
42.7k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
42.7k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
42.7k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
42.7k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
42.7k
        return _buffer.build();
229
42.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
193
437
    OwnedSlice _finish(int final_size_of_type) {
194
437
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
437
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
437
        int padding_elems = num_elems_after_padding - _count;
199
437
        int padding_bytes = padding_elems * final_size_of_type;
200
6.95k
        for (int i = 0; i < padding_bytes; i++) {
201
6.52k
            _data.push_back(0);
202
6.52k
        }
203
204
        // reserve enough place for compression
205
437
        _buffer.resize(
206
437
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
437
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
437
        int64_t bytes =
210
437
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
437
                                         num_elems_after_padding, final_size_of_type, 0);
212
437
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
437
        encode_fixed32_le(&_buffer[0], _count);
222
437
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
437
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
437
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
437
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
437
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
437
        return _buffer.build();
229
437
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
Line
Count
Source
193
7.12k
    OwnedSlice _finish(int final_size_of_type) {
194
7.12k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.12k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.12k
        int padding_elems = num_elems_after_padding - _count;
199
7.12k
        int padding_bytes = padding_elems * final_size_of_type;
200
372k
        for (int i = 0; i < padding_bytes; i++) {
201
365k
            _data.push_back(0);
202
365k
        }
203
204
        // reserve enough place for compression
205
7.12k
        _buffer.resize(
206
7.12k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.12k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.12k
        int64_t bytes =
210
7.12k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.12k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.12k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
7.12k
        encode_fixed32_le(&_buffer[0], _count);
222
7.12k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.12k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.12k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.12k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.12k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.12k
        return _buffer.build();
229
7.12k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
193
108
    OwnedSlice _finish(int final_size_of_type) {
194
108
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
108
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
108
        int padding_elems = num_elems_after_padding - _count;
199
108
        int padding_bytes = padding_elems * final_size_of_type;
200
6.60k
        for (int i = 0; i < padding_bytes; i++) {
201
6.49k
            _data.push_back(0);
202
6.49k
        }
203
204
        // reserve enough place for compression
205
108
        _buffer.resize(
206
108
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
108
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
108
        int64_t bytes =
210
108
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
108
                                         num_elems_after_padding, final_size_of_type, 0);
212
108
        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
108
        encode_fixed32_le(&_buffer[0], _count);
222
108
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
108
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
108
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
108
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
108
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
108
        return _buffer.build();
229
108
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
193
9.60k
    OwnedSlice _finish(int final_size_of_type) {
194
9.60k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
9.60k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
9.60k
        int padding_elems = num_elems_after_padding - _count;
199
9.60k
        int padding_bytes = padding_elems * final_size_of_type;
200
116k
        for (int i = 0; i < padding_bytes; i++) {
201
107k
            _data.push_back(0);
202
107k
        }
203
204
        // reserve enough place for compression
205
9.60k
        _buffer.resize(
206
9.60k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
9.60k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
9.60k
        int64_t bytes =
210
9.60k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
9.60k
                                         num_elems_after_padding, final_size_of_type, 0);
212
9.60k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
9.60k
        encode_fixed32_le(&_buffer[0], _count);
222
9.60k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
9.60k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
9.60k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
9.60k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
9.60k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
9.60k
        return _buffer.build();
229
9.60k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
18.4k
    OwnedSlice _finish(int final_size_of_type) {
194
18.4k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
18.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
18.4k
        int padding_elems = num_elems_after_padding - _count;
199
18.4k
        int padding_bytes = padding_elems * final_size_of_type;
200
487k
        for (int i = 0; i < padding_bytes; i++) {
201
468k
            _data.push_back(0);
202
468k
        }
203
204
        // reserve enough place for compression
205
18.4k
        _buffer.resize(
206
18.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
18.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
18.4k
        int64_t bytes =
210
18.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
18.4k
                                         num_elems_after_padding, final_size_of_type, 0);
212
18.4k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
18.4k
        encode_fixed32_le(&_buffer[0], _count);
222
18.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
18.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
18.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
18.4k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
18.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
18.4k
        return _buffer.build();
229
18.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
193
16.1k
    OwnedSlice _finish(int final_size_of_type) {
194
16.1k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
16.1k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
16.1k
        int padding_elems = num_elems_after_padding - _count;
199
16.1k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.11M
        for (int i = 0; i < padding_bytes; i++) {
201
1.09M
            _data.push_back(0);
202
1.09M
        }
203
204
        // reserve enough place for compression
205
16.1k
        _buffer.resize(
206
16.1k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
16.1k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
16.1k
        int64_t bytes =
210
16.1k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
16.1k
                                         num_elems_after_padding, final_size_of_type, 0);
212
16.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
16.1k
        encode_fixed32_le(&_buffer[0], _count);
222
16.1k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
16.1k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
16.1k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
16.1k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
16.1k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
16.1k
        return _buffer.build();
229
16.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE7_finishEi
Line
Count
Source
193
1.06k
    OwnedSlice _finish(int final_size_of_type) {
194
1.06k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
1.06k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
1.06k
        int padding_elems = num_elems_after_padding - _count;
199
1.06k
        int padding_bytes = padding_elems * final_size_of_type;
200
161k
        for (int i = 0; i < padding_bytes; i++) {
201
160k
            _data.push_back(0);
202
160k
        }
203
204
        // reserve enough place for compression
205
1.06k
        _buffer.resize(
206
1.06k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
1.06k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
1.06k
        int64_t bytes =
210
1.06k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
1.06k
                                         num_elems_after_padding, final_size_of_type, 0);
212
1.06k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
1.06k
        encode_fixed32_le(&_buffer[0], _count);
222
1.06k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
1.06k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
1.06k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
1.06k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
1.06k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
1.06k
        return _buffer.build();
229
1.06k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Line
Count
Source
193
696
    OwnedSlice _finish(int final_size_of_type) {
194
696
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
696
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
696
        int padding_elems = num_elems_after_padding - _count;
199
696
        int padding_bytes = padding_elems * final_size_of_type;
200
14.7k
        for (int i = 0; i < padding_bytes; i++) {
201
14.0k
            _data.push_back(0);
202
14.0k
        }
203
204
        // reserve enough place for compression
205
696
        _buffer.resize(
206
696
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
696
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
696
        int64_t bytes =
210
696
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
696
                                         num_elems_after_padding, final_size_of_type, 0);
212
696
        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
696
        encode_fixed32_le(&_buffer[0], _count);
222
696
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
696
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
696
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
696
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
696
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
696
        return _buffer.build();
229
696
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
193
596
    OwnedSlice _finish(int final_size_of_type) {
194
596
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
596
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
596
        int padding_elems = num_elems_after_padding - _count;
199
596
        int padding_bytes = padding_elems * final_size_of_type;
200
47.5k
        for (int i = 0; i < padding_bytes; i++) {
201
46.9k
            _data.push_back(0);
202
46.9k
        }
203
204
        // reserve enough place for compression
205
596
        _buffer.resize(
206
596
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
596
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
596
        int64_t bytes =
210
596
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
596
                                         num_elems_after_padding, final_size_of_type, 0);
212
596
        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
596
        encode_fixed32_le(&_buffer[0], _count);
222
596
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
596
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
596
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
596
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
596
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
596
        return _buffer.build();
229
596
    }
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
1.88M
                                       int& size_of_element) {
253
1.88M
    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
1.88M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
1.88M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
1.88M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
1.88M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
1.88M
    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
1.88M
    switch (size_of_element) {
271
166k
    case 1:
272
183k
    case 2:
273
185k
    case 3:
274
1.20M
    case 4:
275
1.81M
    case 8:
276
1.81M
    case 12:
277
1.88M
    case 16:
278
1.88M
    case 32:
279
1.88M
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
1.88M
    }
283
1.88M
    return Status::OK();
284
1.88M
}
285
286
template <FieldType Type>
287
class BitShufflePageDecoder : public PageDecoder {
288
public:
289
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
290
1.12M
            : _data(data),
291
1.12M
              _options(options),
292
1.12M
              _parsed(false),
293
1.12M
              _num_elements(0),
294
1.12M
              _num_element_after_padding(0),
295
1.12M
              _size_of_element(0),
296
1.12M
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
510k
            : _data(data),
291
510k
              _options(options),
292
510k
              _parsed(false),
293
510k
              _num_elements(0),
294
510k
              _num_element_after_padding(0),
295
510k
              _size_of_element(0),
296
510k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
101k
            : _data(data),
291
101k
              _options(options),
292
101k
              _parsed(false),
293
101k
              _num_elements(0),
294
101k
              _num_element_after_padding(0),
295
101k
              _size_of_element(0),
296
101k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
9.38k
            : _data(data),
291
9.38k
              _options(options),
292
9.38k
              _parsed(false),
293
9.38k
              _num_elements(0),
294
9.38k
              _num_element_after_padding(0),
295
9.38k
              _size_of_element(0),
296
9.38k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
117k
            : _data(data),
291
117k
              _options(options),
292
117k
              _parsed(false),
293
117k
              _num_elements(0),
294
117k
              _num_element_after_padding(0),
295
117k
              _size_of_element(0),
296
117k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
12.5k
            : _data(data),
291
12.5k
              _options(options),
292
12.5k
              _parsed(false),
293
12.5k
              _num_elements(0),
294
12.5k
              _num_element_after_padding(0),
295
12.5k
              _size_of_element(0),
296
12.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
89.2k
            : _data(data),
291
89.2k
              _options(options),
292
89.2k
              _parsed(false),
293
89.2k
              _num_elements(0),
294
89.2k
              _num_element_after_padding(0),
295
89.2k
              _size_of_element(0),
296
89.2k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
19.5k
            : _data(data),
291
19.5k
              _options(options),
292
19.5k
              _parsed(false),
293
19.5k
              _num_elements(0),
294
19.5k
              _num_element_after_padding(0),
295
19.5k
              _size_of_element(0),
296
19.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
29.7k
            : _data(data),
291
29.7k
              _options(options),
292
29.7k
              _parsed(false),
293
29.7k
              _num_elements(0),
294
29.7k
              _num_element_after_padding(0),
295
29.7k
              _size_of_element(0),
296
29.7k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.82k
            : _data(data),
291
1.82k
              _options(options),
292
1.82k
              _parsed(false),
293
1.82k
              _num_elements(0),
294
1.82k
              _num_element_after_padding(0),
295
1.82k
              _size_of_element(0),
296
1.82k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
58.8k
            : _data(data),
291
58.8k
              _options(options),
292
58.8k
              _parsed(false),
293
58.8k
              _num_elements(0),
294
58.8k
              _num_element_after_padding(0),
295
58.8k
              _size_of_element(0),
296
58.8k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
66.6k
            : _data(data),
291
66.6k
              _options(options),
292
66.6k
              _parsed(false),
293
66.6k
              _num_elements(0),
294
66.6k
              _num_element_after_padding(0),
295
66.6k
              _size_of_element(0),
296
66.6k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
2.39k
            : _data(data),
291
2.39k
              _options(options),
292
2.39k
              _parsed(false),
293
2.39k
              _num_elements(0),
294
2.39k
              _num_element_after_padding(0),
295
2.39k
              _size_of_element(0),
296
2.39k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
14.7k
            : _data(data),
291
14.7k
              _options(options),
292
14.7k
              _parsed(false),
293
14.7k
              _num_elements(0),
294
14.7k
              _num_element_after_padding(0),
295
14.7k
              _size_of_element(0),
296
14.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.45k
            : _data(data),
291
1.45k
              _options(options),
292
1.45k
              _parsed(false),
293
1.45k
              _num_elements(0),
294
1.45k
              _num_element_after_padding(0),
295
1.45k
              _size_of_element(0),
296
1.45k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
15.0k
            : _data(data),
291
15.0k
              _options(options),
292
15.0k
              _parsed(false),
293
15.0k
              _num_elements(0),
294
15.0k
              _num_element_after_padding(0),
295
15.0k
              _size_of_element(0),
296
15.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
40.1k
            : _data(data),
291
40.1k
              _options(options),
292
40.1k
              _parsed(false),
293
40.1k
              _num_elements(0),
294
40.1k
              _num_element_after_padding(0),
295
40.1k
              _size_of_element(0),
296
40.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
29.4k
            : _data(data),
291
29.4k
              _options(options),
292
29.4k
              _parsed(false),
293
29.4k
              _num_elements(0),
294
29.4k
              _num_element_after_padding(0),
295
29.4k
              _size_of_element(0),
296
29.4k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.75k
            : _data(data),
291
1.75k
              _options(options),
292
1.75k
              _parsed(false),
293
1.75k
              _num_elements(0),
294
1.75k
              _num_element_after_padding(0),
295
1.75k
              _size_of_element(0),
296
1.75k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.19k
            : _data(data),
291
1.19k
              _options(options),
292
1.19k
              _parsed(false),
293
1.19k
              _num_elements(0),
294
1.19k
              _num_element_after_padding(0),
295
1.19k
              _size_of_element(0),
296
1.19k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.08k
            : _data(data),
291
1.08k
              _options(options),
292
1.08k
              _parsed(false),
293
1.08k
              _num_elements(0),
294
1.08k
              _num_element_after_padding(0),
295
1.08k
              _size_of_element(0),
296
1.08k
              _cur_index(0) {}
297
298
1.12M
    Status init() override {
299
1.12M
        CHECK(!_parsed);
300
1.12M
        size_t unused;
301
1.12M
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.12M
                                                 _num_element_after_padding, _size_of_element));
303
304
1.12M
        if (_data.size !=
305
1.12M
            _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.12M
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.12M
                     _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.12M
        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.12M
        _parsed = true;
325
1.12M
        return Status::OK();
326
1.12M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
298
510k
    Status init() override {
299
510k
        CHECK(!_parsed);
300
510k
        size_t unused;
301
510k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
510k
                                                 _num_element_after_padding, _size_of_element));
303
304
510k
        if (_data.size !=
305
510k
            _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
510k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
510k
                     _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
510k
        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
510k
        _parsed = true;
325
510k
        return Status::OK();
326
510k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
101k
    Status init() override {
299
101k
        CHECK(!_parsed);
300
101k
        size_t unused;
301
101k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
101k
                                                 _num_element_after_padding, _size_of_element));
303
304
101k
        if (_data.size !=
305
101k
            _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
101k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
101k
                     _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
101k
        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
101k
        _parsed = true;
325
101k
        return Status::OK();
326
101k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
9.38k
    Status init() override {
299
9.38k
        CHECK(!_parsed);
300
9.38k
        size_t unused;
301
9.38k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
9.38k
                                                 _num_element_after_padding, _size_of_element));
303
304
9.38k
        if (_data.size !=
305
9.38k
            _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
9.38k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
9.38k
                     _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
9.38k
        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
9.38k
        _parsed = true;
325
9.38k
        return Status::OK();
326
9.38k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
117k
    Status init() override {
299
117k
        CHECK(!_parsed);
300
117k
        size_t unused;
301
117k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
117k
                                                 _num_element_after_padding, _size_of_element));
303
304
117k
        if (_data.size !=
305
117k
            _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
117k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
117k
                     _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
117k
        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
117k
        _parsed = true;
325
117k
        return Status::OK();
326
117k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
298
12.5k
    Status init() override {
299
12.5k
        CHECK(!_parsed);
300
12.5k
        size_t unused;
301
12.5k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
12.5k
                                                 _num_element_after_padding, _size_of_element));
303
304
12.5k
        if (_data.size !=
305
12.5k
            _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
12.5k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
12.5k
                     _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
12.5k
        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
12.5k
        _parsed = true;
325
12.5k
        return Status::OK();
326
12.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
298
89.1k
    Status init() override {
299
89.1k
        CHECK(!_parsed);
300
89.1k
        size_t unused;
301
89.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
89.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
89.1k
        if (_data.size !=
305
89.1k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
89.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
89.1k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
89.1k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
89.1k
        _parsed = true;
325
89.1k
        return Status::OK();
326
89.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
298
19.5k
    Status init() override {
299
19.5k
        CHECK(!_parsed);
300
19.5k
        size_t unused;
301
19.5k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
19.5k
                                                 _num_element_after_padding, _size_of_element));
303
304
19.5k
        if (_data.size !=
305
19.5k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
19.5k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
19.5k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
19.5k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
19.5k
        _parsed = true;
325
19.5k
        return Status::OK();
326
19.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
298
29.7k
    Status init() override {
299
29.7k
        CHECK(!_parsed);
300
29.7k
        size_t unused;
301
29.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
29.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
29.7k
        if (_data.size !=
305
29.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
29.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
29.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
29.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
29.7k
        _parsed = true;
325
29.7k
        return Status::OK();
326
29.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
1.82k
    Status init() override {
299
1.82k
        CHECK(!_parsed);
300
1.82k
        size_t unused;
301
1.82k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.82k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.82k
        if (_data.size !=
305
1.82k
            _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.82k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.82k
                     _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.82k
        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.82k
        _parsed = true;
325
1.82k
        return Status::OK();
326
1.82k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
58.8k
    Status init() override {
299
58.8k
        CHECK(!_parsed);
300
58.8k
        size_t unused;
301
58.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
58.8k
                                                 _num_element_after_padding, _size_of_element));
303
304
58.8k
        if (_data.size !=
305
58.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
58.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
58.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
58.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
58.8k
        _parsed = true;
325
58.8k
        return Status::OK();
326
58.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
298
66.6k
    Status init() override {
299
66.6k
        CHECK(!_parsed);
300
66.6k
        size_t unused;
301
66.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
66.6k
                                                 _num_element_after_padding, _size_of_element));
303
304
66.6k
        if (_data.size !=
305
66.6k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
66.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
66.6k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
66.6k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
66.6k
        _parsed = true;
325
66.6k
        return Status::OK();
326
66.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
298
2.39k
    Status init() override {
299
2.39k
        CHECK(!_parsed);
300
2.39k
        size_t unused;
301
2.39k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
2.39k
                                                 _num_element_after_padding, _size_of_element));
303
304
2.39k
        if (_data.size !=
305
2.39k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
2.39k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
2.39k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
2.39k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
2.39k
        _parsed = true;
325
2.39k
        return Status::OK();
326
2.39k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
298
14.6k
    Status init() override {
299
14.6k
        CHECK(!_parsed);
300
14.6k
        size_t unused;
301
14.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
14.6k
                                                 _num_element_after_padding, _size_of_element));
303
304
14.6k
        if (_data.size !=
305
14.6k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
14.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
14.6k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
14.6k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
14.6k
        _parsed = true;
325
14.6k
        return Status::OK();
326
14.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
298
1.45k
    Status init() override {
299
1.45k
        CHECK(!_parsed);
300
1.45k
        size_t unused;
301
1.45k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.45k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.45k
        if (_data.size !=
305
1.45k
            _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.45k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.45k
                     _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.45k
        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.45k
        _parsed = true;
325
1.45k
        return Status::OK();
326
1.45k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
298
15.0k
    Status init() override {
299
15.0k
        CHECK(!_parsed);
300
15.0k
        size_t unused;
301
15.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
15.0k
                                                 _num_element_after_padding, _size_of_element));
303
304
15.0k
        if (_data.size !=
305
15.0k
            _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
15.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
15.0k
                     _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
15.0k
        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
15.0k
        _parsed = true;
325
15.0k
        return Status::OK();
326
15.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
298
40.1k
    Status init() override {
299
40.1k
        CHECK(!_parsed);
300
40.1k
        size_t unused;
301
40.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
40.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
40.1k
        if (_data.size !=
305
40.1k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
40.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
40.1k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
40.1k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
40.1k
        _parsed = true;
325
40.1k
        return Status::OK();
326
40.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
298
29.4k
    Status init() override {
299
29.4k
        CHECK(!_parsed);
300
29.4k
        size_t unused;
301
29.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
29.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
29.4k
        if (_data.size !=
305
29.4k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
29.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
29.4k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
29.4k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
29.4k
        _parsed = true;
325
29.4k
        return Status::OK();
326
29.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
298
1.75k
    Status init() override {
299
1.75k
        CHECK(!_parsed);
300
1.75k
        size_t unused;
301
1.75k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.75k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.75k
        if (_data.size !=
305
1.75k
            _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.75k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.75k
                     _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.75k
        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.75k
        _parsed = true;
325
1.75k
        return Status::OK();
326
1.75k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
298
1.19k
    Status init() override {
299
1.19k
        CHECK(!_parsed);
300
1.19k
        size_t unused;
301
1.19k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.19k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.19k
        if (_data.size !=
305
1.19k
            _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.19k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.19k
                     _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.19k
        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.19k
        _parsed = true;
325
1.19k
        return Status::OK();
326
1.19k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
298
1.08k
    Status init() override {
299
1.08k
        CHECK(!_parsed);
300
1.08k
        size_t unused;
301
1.08k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.08k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.08k
        if (_data.size !=
305
1.08k
            _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.08k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.08k
                     _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.08k
        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.08k
        _parsed = true;
325
1.08k
        return Status::OK();
326
1.08k
    }
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
3.18M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
3.18M
        if (_num_elements == 0) [[unlikely]] {
337
6.45k
            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
6.45k
        }
342
343
3.18M
        DCHECK_LE(pos, _num_elements);
344
3.18M
        _cur_index = pos;
345
3.18M
        return Status::OK();
346
3.18M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.42M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
1.42M
        if (_num_elements == 0) [[unlikely]] {
337
2.24k
            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
2.24k
        }
342
343
1.42M
        DCHECK_LE(pos, _num_elements);
344
1.42M
        _cur_index = pos;
345
1.42M
        return Status::OK();
346
1.42M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
76.0k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
76.0k
        if (_num_elements == 0) [[unlikely]] {
337
352
            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
352
        }
342
343
76.0k
        DCHECK_LE(pos, _num_elements);
344
76.0k
        _cur_index = pos;
345
76.0k
        return Status::OK();
346
76.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
3.59k
    Status seek_to_position_in_page(size_t pos) override {
335
3.59k
        DCHECK(_parsed) << "Must call init()";
336
3.59k
        if (_num_elements == 0) [[unlikely]] {
337
679
            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
679
        }
342
343
3.59k
        DCHECK_LE(pos, _num_elements);
344
3.59k
        _cur_index = pos;
345
3.59k
        return Status::OK();
346
3.59k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
120k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
120k
        if (_num_elements == 0) [[unlikely]] {
337
856
            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
856
        }
342
343
120k
        DCHECK_LE(pos, _num_elements);
344
120k
        _cur_index = pos;
345
120k
        return Status::OK();
346
120k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
334
4.05k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
4.05k
        if (_num_elements == 0) [[unlikely]] {
337
6
            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
6
        }
342
343
4.05k
        DCHECK_LE(pos, _num_elements);
344
4.05k
        _cur_index = pos;
345
4.05k
        return Status::OK();
346
4.05k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
334
8.28k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
8.28k
        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.28k
        DCHECK_LE(pos, _num_elements);
344
8.28k
        _cur_index = pos;
345
8.28k
        return Status::OK();
346
8.28k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
223k
    Status seek_to_position_in_page(size_t pos) override {
335
223k
        DCHECK(_parsed) << "Must call init()";
336
223k
        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
223k
        DCHECK_LE(pos, _num_elements);
344
223k
        _cur_index = pos;
345
223k
        return Status::OK();
346
223k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
334
202k
    Status seek_to_position_in_page(size_t pos) override {
335
202k
        DCHECK(_parsed) << "Must call init()";
336
202k
        if (_num_elements == 0) [[unlikely]] {
337
5
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
5
        }
342
343
202k
        DCHECK_LE(pos, _num_elements);
344
202k
        _cur_index = pos;
345
202k
        return Status::OK();
346
202k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
334
219k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
219k
        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
219k
        DCHECK_LE(pos, _num_elements);
344
219k
        _cur_index = pos;
345
219k
        return Status::OK();
346
219k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
334
503k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
503k
        if (_num_elements == 0) [[unlikely]] {
337
1.85k
            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.85k
        }
342
343
503k
        DCHECK_LE(pos, _num_elements);
344
503k
        _cur_index = pos;
345
503k
        return Status::OK();
346
503k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
334
55.4k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
55.4k
        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
55.4k
        DCHECK_LE(pos, _num_elements);
344
55.4k
        _cur_index = pos;
345
55.4k
        return Status::OK();
346
55.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
199k
    Status seek_to_position_in_page(size_t pos) override {
335
199k
        DCHECK(_parsed) << "Must call init()";
336
199k
        if (_num_elements == 0) [[unlikely]] {
337
16
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
16
        }
342
343
199k
        DCHECK_LE(pos, _num_elements);
344
199k
        _cur_index = pos;
345
199k
        return Status::OK();
346
199k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
334
6.59k
    Status seek_to_position_in_page(size_t pos) override {
335
6.59k
        DCHECK(_parsed) << "Must call init()";
336
6.59k
        if (_num_elements == 0) [[unlikely]] {
337
353
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
353
        }
342
343
6.59k
        DCHECK_LE(pos, _num_elements);
344
6.59k
        _cur_index = pos;
345
6.59k
        return Status::OK();
346
6.59k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
Line
Count
Source
334
140
    Status seek_to_position_in_page(size_t pos) override {
335
140
        DCHECK(_parsed) << "Must call init()";
336
140
        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
140
        DCHECK_LE(pos, _num_elements);
344
140
        _cur_index = pos;
345
140
        return Status::OK();
346
140
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Line
Count
Source
334
889
    Status seek_to_position_in_page(size_t pos) override {
335
889
        DCHECK(_parsed) << "Must call init()";
336
889
        if (_num_elements == 0) [[unlikely]] {
337
36
            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
36
        }
342
343
889
        DCHECK_LE(pos, _num_elements);
344
889
        _cur_index = pos;
345
889
        return Status::OK();
346
889
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
334
17.7k
    Status seek_to_position_in_page(size_t pos) override {
335
17.7k
        DCHECK(_parsed) << "Must call init()";
336
17.7k
        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
17.7k
        DCHECK_LE(pos, _num_elements);
344
17.7k
        _cur_index = pos;
345
17.7k
        return Status::OK();
346
17.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Line
Count
Source
334
113k
    Status seek_to_position_in_page(size_t pos) override {
335
113k
        DCHECK(_parsed) << "Must call init()";
336
113k
        if (_num_elements == 0) [[unlikely]] {
337
10
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
10
        }
342
343
113k
        DCHECK_LE(pos, _num_elements);
344
113k
        _cur_index = pos;
345
113k
        return Status::OK();
346
113k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.96k
    Status seek_to_position_in_page(size_t pos) override {
335
1.96k
        DCHECK(_parsed) << "Must call init()";
336
1.96k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
1.96k
        DCHECK_LE(pos, _num_elements);
344
1.96k
        _cur_index = pos;
345
1.96k
        return Status::OK();
346
1.96k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE24seek_to_position_in_pageEm
Line
Count
Source
334
48
    Status seek_to_position_in_page(size_t pos) override {
335
48
        DCHECK(_parsed) << "Must call init()";
336
48
        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
48
        DCHECK_LE(pos, _num_elements);
344
48
        _cur_index = pos;
345
48
        return Status::OK();
346
48
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE24seek_to_position_in_pageEm
Line
Count
Source
334
89
    Status seek_to_position_in_page(size_t pos) override {
335
89
        DCHECK(_parsed) << "Must call init()";
336
89
        if (_num_elements == 0) [[unlikely]] {
337
1
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
1
        }
342
343
89
        DCHECK_LE(pos, _num_elements);
344
89
        _cur_index = pos;
345
89
        return Status::OK();
346
89
    }
347
348
0
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
349
0
        DCHECK(_parsed) << "Must call init() firstly";
350
351
0
        if (_num_elements == 0) {
352
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
353
0
        }
354
355
0
        size_t left = 0;
356
0
        size_t right = _num_elements;
357
358
0
        void* mid_value = nullptr;
359
360
        // find the first value >= target. after loop,
361
        // - left == index of first value >= target when found
362
        // - left == _num_elements when not found (all values < target)
363
0
        while (left < right) {
364
0
            size_t mid = left + (right - left) / 2;
365
0
            mid_value = get_data(mid);
366
0
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
367
0
                left = mid + 1;
368
0
            } else {
369
0
                right = mid;
370
0
            }
371
0
        }
372
0
        if (left >= _num_elements) {
373
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
374
0
        }
375
0
        void* find_value = get_data(left);
376
0
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
377
0
            *exact_match = true;
378
0
        } else {
379
0
            *exact_match = false;
380
0
        }
381
382
0
        _cur_index = left;
383
0
        return Status::OK();
384
0
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE22seek_at_or_after_valueEPKvPb
385
386
    template <bool forward_index = true>
387
1.50M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.50M
        DCHECK(_parsed);
389
1.50M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.50M
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.50M
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.50M
        *n = max_fetch;
398
1.50M
        if constexpr (forward_index) {
399
1.33M
            _cur_index += max_fetch;
400
1.33M
        }
401
402
1.50M
        return Status::OK();
403
1.50M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
314k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
314k
        DCHECK(_parsed);
389
314k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
314k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
314k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
314k
        *n = max_fetch;
398
314k
        if constexpr (forward_index) {
399
314k
            _cur_index += max_fetch;
400
314k
        }
401
402
314k
        return Status::OK();
403
314k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
193k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
193k
        DCHECK(_parsed);
389
194k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
193k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
193k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
193k
        *n = max_fetch;
398
193k
        if constexpr (forward_index) {
399
193k
            _cur_index += max_fetch;
400
193k
        }
401
402
193k
        return Status::OK();
403
193k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
10.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
10.0k
        DCHECK(_parsed);
389
10.0k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
10.0k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
10.0k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
10.0k
        *n = max_fetch;
398
10.0k
        if constexpr (forward_index) {
399
10.0k
            _cur_index += max_fetch;
400
10.0k
        }
401
402
10.0k
        return Status::OK();
403
10.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
99.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
99.2k
        DCHECK(_parsed);
389
99.2k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
99.2k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
99.2k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
99.2k
        *n = max_fetch;
398
99.2k
        if constexpr (forward_index) {
399
99.2k
            _cur_index += max_fetch;
400
99.2k
        }
401
402
99.2k
        return Status::OK();
403
99.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
11.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
11.0k
        DCHECK(_parsed);
389
11.0k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
11.0k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
11.0k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
11.0k
        *n = max_fetch;
398
11.0k
        if constexpr (forward_index) {
399
11.0k
            _cur_index += max_fetch;
400
11.0k
        }
401
402
11.0k
        return Status::OK();
403
11.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
133k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
133k
        DCHECK(_parsed);
389
133k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
133k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
133k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
133k
        *n = max_fetch;
398
133k
        if constexpr (forward_index) {
399
133k
            _cur_index += max_fetch;
400
133k
        }
401
402
133k
        return Status::OK();
403
133k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
164k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
164k
        DCHECK(_parsed);
389
164k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
164k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
164k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
164k
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
164k
        return Status::OK();
403
164k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
14.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
14.2k
        DCHECK(_parsed);
389
14.2k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
14.2k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
14.2k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
14.2k
        *n = max_fetch;
398
14.2k
        if constexpr (forward_index) {
399
14.2k
            _cur_index += max_fetch;
400
14.2k
        }
401
402
14.2k
        return Status::OK();
403
14.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
19.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
19.9k
        DCHECK(_parsed);
389
19.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
19.9k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
19.9k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
19.9k
        *n = max_fetch;
398
19.9k
        if constexpr (forward_index) {
399
19.9k
            _cur_index += max_fetch;
400
19.9k
        }
401
402
19.9k
        return Status::OK();
403
19.9k
    }
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
14.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
14.1k
        DCHECK(_parsed);
389
14.1k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
14.1k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
14.1k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
14.1k
        *n = max_fetch;
398
14.1k
        if constexpr (forward_index) {
399
14.1k
            _cur_index += max_fetch;
400
14.1k
        }
401
402
14.1k
        return Status::OK();
403
14.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
386k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
386k
        DCHECK(_parsed);
389
386k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
386k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
386k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
386k
        *n = max_fetch;
398
386k
        if constexpr (forward_index) {
399
386k
            _cur_index += max_fetch;
400
386k
        }
401
402
386k
        return Status::OK();
403
386k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
65.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
65.2k
        DCHECK(_parsed);
389
65.2k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
65.2k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
65.2k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
65.2k
        *n = max_fetch;
398
65.2k
        if constexpr (forward_index) {
399
65.2k
            _cur_index += max_fetch;
400
65.2k
        }
401
402
65.2k
        return Status::OK();
403
65.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
1.43k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.43k
        DCHECK(_parsed);
389
1.43k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.43k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.43k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.43k
        *n = max_fetch;
398
1.43k
        if constexpr (forward_index) {
399
1.43k
            _cur_index += max_fetch;
400
1.43k
        }
401
402
1.43k
        return Status::OK();
403
1.43k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
7.46k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
7.46k
        DCHECK(_parsed);
389
7.46k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
7.46k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
7.46k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
7.46k
        *n = max_fetch;
398
7.46k
        if constexpr (forward_index) {
399
7.46k
            _cur_index += max_fetch;
400
7.46k
        }
401
402
7.46k
        return Status::OK();
403
7.46k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
1.35k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.35k
        DCHECK(_parsed);
389
1.35k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.35k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.35k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.35k
        *n = max_fetch;
398
1.35k
        if constexpr (forward_index) {
399
1.35k
            _cur_index += max_fetch;
400
1.35k
        }
401
402
1.35k
        return Status::OK();
403
1.35k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
8.26k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
8.26k
        DCHECK(_parsed);
389
8.26k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
8.26k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
8.26k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
8.26k
        *n = max_fetch;
398
8.26k
        if constexpr (forward_index) {
399
8.26k
            _cur_index += max_fetch;
400
8.26k
        }
401
402
8.26k
        return Status::OK();
403
8.26k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
29.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
29.6k
        DCHECK(_parsed);
389
29.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
29.6k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
29.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
29.6k
        *n = max_fetch;
398
29.6k
        if constexpr (forward_index) {
399
29.6k
            _cur_index += max_fetch;
400
29.6k
        }
401
402
29.6k
        return Status::OK();
403
29.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
20.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
20.6k
        DCHECK(_parsed);
389
20.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
20.6k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
20.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
20.6k
        *n = max_fetch;
398
20.6k
        if constexpr (forward_index) {
399
20.6k
            _cur_index += max_fetch;
400
20.6k
        }
401
402
20.6k
        return Status::OK();
403
20.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.21k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.21k
        DCHECK(_parsed);
389
3.21k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.21k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.21k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.21k
        *n = max_fetch;
398
3.21k
        if constexpr (forward_index) {
399
3.21k
            _cur_index += max_fetch;
400
3.21k
        }
401
402
3.21k
        return Status::OK();
403
3.21k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
740
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
740
        DCHECK(_parsed);
389
740
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
740
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
740
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
740
        *n = max_fetch;
398
740
        if constexpr (forward_index) {
399
740
            _cur_index += max_fetch;
400
740
        }
401
402
740
        return Status::OK();
403
740
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.24k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.24k
        DCHECK(_parsed);
389
3.24k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.24k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.24k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.24k
        *n = max_fetch;
398
3.24k
        if constexpr (forward_index) {
399
3.24k
            _cur_index += max_fetch;
400
3.24k
        }
401
402
3.24k
        return Status::OK();
403
3.24k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
404
405
1.33M
    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
314k
    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
193k
    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
10.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
99.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
11.0k
    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
133k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
14.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
19.9k
    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
14.1k
    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
386k
    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
65.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
1.43k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
7.46k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
1.35k
    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
8.26k
    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
29.6k
    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
20.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
3.21k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
741
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
3.24k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
406
407
    Status read_by_rowids(const rowid_t* rowids, ordinal_t page_first_ordinal, size_t* n,
408
455k
                          MutableColumnPtr& dst) override {
409
455k
        DCHECK(_parsed);
410
455k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
455k
        auto total = *n;
416
455k
        auto read_count = 0;
417
455k
        _buffer.resize(total);
418
100M
        for (size_t i = 0; i < total; ++i) {
419
100M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
100M
            if (UNLIKELY(ord >= _num_elements)) {
421
9.99k
                break;
422
9.99k
            }
423
424
100M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
100M
        }
426
427
455k
        if (LIKELY(read_count > 0)) {
428
455k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
455k
        }
430
431
455k
        *n = read_count;
432
455k
        return Status::OK();
433
455k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
72.7k
                          MutableColumnPtr& dst) override {
409
72.7k
        DCHECK(_parsed);
410
72.7k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
72.7k
        auto total = *n;
416
72.7k
        auto read_count = 0;
417
72.7k
        _buffer.resize(total);
418
30.6M
        for (size_t i = 0; i < total; ++i) {
419
30.5M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
30.5M
            if (UNLIKELY(ord >= _num_elements)) {
421
90
                break;
422
90
            }
423
424
30.5M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
30.5M
        }
426
427
72.7k
        if (LIKELY(read_count > 0)) {
428
72.7k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
72.7k
        }
430
431
72.7k
        *n = read_count;
432
72.7k
        return Status::OK();
433
72.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
42.0k
                          MutableColumnPtr& dst) override {
409
42.0k
        DCHECK(_parsed);
410
42.0k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
42.0k
        auto total = *n;
416
42.0k
        auto read_count = 0;
417
42.0k
        _buffer.resize(total);
418
792k
        for (size_t i = 0; i < total; ++i) {
419
750k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
750k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
750k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
750k
        }
426
427
42.0k
        if (LIKELY(read_count > 0)) {
428
42.0k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
42.0k
        }
430
431
42.0k
        *n = read_count;
432
42.0k
        return Status::OK();
433
42.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4.18k
                          MutableColumnPtr& dst) override {
409
4.18k
        DCHECK(_parsed);
410
4.18k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.18k
        auto total = *n;
416
4.18k
        auto read_count = 0;
417
4.18k
        _buffer.resize(total);
418
13.4k
        for (size_t i = 0; i < total; ++i) {
419
9.23k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.23k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
9.23k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.23k
        }
426
427
4.18k
        if (LIKELY(read_count > 0)) {
428
4.18k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.18k
        }
430
431
4.18k
        *n = read_count;
432
4.18k
        return Status::OK();
433
4.18k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
145k
                          MutableColumnPtr& dst) override {
409
145k
        DCHECK(_parsed);
410
145k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
145k
        auto total = *n;
416
145k
        auto read_count = 0;
417
145k
        _buffer.resize(total);
418
10.8M
        for (size_t i = 0; i < total; ++i) {
419
10.7M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
10.7M
            if (UNLIKELY(ord >= _num_elements)) {
421
521
                break;
422
521
            }
423
424
10.7M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
10.7M
        }
426
427
145k
        if (LIKELY(read_count > 0)) {
428
145k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
145k
        }
430
431
145k
        *n = read_count;
432
145k
        return Status::OK();
433
145k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
6.20k
                          MutableColumnPtr& dst) override {
409
6.20k
        DCHECK(_parsed);
410
6.20k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
6.20k
        auto total = *n;
416
6.20k
        auto read_count = 0;
417
6.20k
        _buffer.resize(total);
418
15.1k
        for (size_t i = 0; i < total; ++i) {
419
8.94k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
8.94k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
8.94k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
8.94k
        }
426
427
6.20k
        if (LIKELY(read_count > 0)) {
428
6.19k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
6.19k
        }
430
431
6.20k
        *n = read_count;
432
6.20k
        return Status::OK();
433
6.20k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
32.2k
                          MutableColumnPtr& dst) override {
409
32.2k
        DCHECK(_parsed);
410
32.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
32.2k
        auto total = *n;
416
32.2k
        auto read_count = 0;
417
32.2k
        _buffer.resize(total);
418
489k
        for (size_t i = 0; i < total; ++i) {
419
457k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
457k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
457k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
457k
        }
426
427
32.2k
        if (LIKELY(read_count > 0)) {
428
32.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
32.2k
        }
430
431
32.2k
        *n = read_count;
432
32.2k
        return Status::OK();
433
32.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
9.84k
                          MutableColumnPtr& dst) override {
409
9.84k
        DCHECK(_parsed);
410
9.84k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
9.84k
        auto total = *n;
416
9.84k
        auto read_count = 0;
417
9.84k
        _buffer.resize(total);
418
1.21M
        for (size_t i = 0; i < total; ++i) {
419
1.20M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.20M
            if (UNLIKELY(ord >= _num_elements)) {
421
32
                break;
422
32
            }
423
424
1.20M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.20M
        }
426
427
9.84k
        if (LIKELY(read_count > 0)) {
428
9.84k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
9.84k
        }
430
431
9.84k
        *n = read_count;
432
9.84k
        return Status::OK();
433
9.84k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
17.1k
                          MutableColumnPtr& dst) override {
409
17.1k
        DCHECK(_parsed);
410
17.1k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
17.1k
        auto total = *n;
416
17.1k
        auto read_count = 0;
417
17.1k
        _buffer.resize(total);
418
6.01M
        for (size_t i = 0; i < total; ++i) {
419
5.99M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
5.99M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.49k
                break;
422
1.49k
            }
423
424
5.99M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
5.99M
        }
426
427
17.1k
        if (LIKELY(read_count > 0)) {
428
17.1k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
17.1k
        }
430
431
17.1k
        *n = read_count;
432
17.1k
        return Status::OK();
433
17.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1.47k
                          MutableColumnPtr& dst) override {
409
1.47k
        DCHECK(_parsed);
410
1.47k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.47k
        auto total = *n;
416
1.47k
        auto read_count = 0;
417
1.47k
        _buffer.resize(total);
418
498k
        for (size_t i = 0; i < total; ++i) {
419
496k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
496k
            if (UNLIKELY(ord >= _num_elements)) {
421
15
                break;
422
15
            }
423
424
496k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
496k
        }
426
427
1.47k
        if (LIKELY(read_count > 0)) {
428
1.47k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.47k
        }
430
431
1.47k
        *n = read_count;
432
1.47k
        return Status::OK();
433
1.47k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
29.7k
                          MutableColumnPtr& dst) override {
409
29.7k
        DCHECK(_parsed);
410
29.7k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
29.7k
        auto total = *n;
416
29.7k
        auto read_count = 0;
417
29.7k
        _buffer.resize(total);
418
6.70M
        for (size_t i = 0; i < total; ++i) {
419
6.67M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
6.67M
            if (UNLIKELY(ord >= _num_elements)) {
421
890
                break;
422
890
            }
423
424
6.67M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
6.67M
        }
426
427
29.7k
        if (LIKELY(read_count > 0)) {
428
29.7k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
29.7k
        }
430
431
29.7k
        *n = read_count;
432
29.7k
        return Status::OK();
433
29.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
32.6k
                          MutableColumnPtr& dst) override {
409
32.6k
        DCHECK(_parsed);
410
32.6k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
32.6k
        auto total = *n;
416
32.6k
        auto read_count = 0;
417
32.6k
        _buffer.resize(total);
418
9.55M
        for (size_t i = 0; i < total; ++i) {
419
9.52M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.52M
            if (UNLIKELY(ord >= _num_elements)) {
421
209
                break;
422
209
            }
423
424
9.52M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.52M
        }
426
427
32.6k
        if (LIKELY(read_count > 0)) {
428
32.6k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
32.6k
        }
430
431
32.6k
        *n = read_count;
432
32.6k
        return Status::OK();
433
32.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1.89k
                          MutableColumnPtr& dst) override {
409
1.89k
        DCHECK(_parsed);
410
1.89k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.89k
        auto total = *n;
416
1.89k
        auto read_count = 0;
417
1.89k
        _buffer.resize(total);
418
500k
        for (size_t i = 0; i < total; ++i) {
419
499k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
499k
            if (UNLIKELY(ord >= _num_elements)) {
421
250
                break;
422
250
            }
423
424
498k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
498k
        }
426
427
1.89k
        if (LIKELY(read_count > 0)) {
428
1.89k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.89k
        }
430
431
1.89k
        *n = read_count;
432
1.89k
        return Status::OK();
433
1.89k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
11.6k
                          MutableColumnPtr& dst) override {
409
11.6k
        DCHECK(_parsed);
410
11.6k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
11.6k
        auto total = *n;
416
11.6k
        auto read_count = 0;
417
11.6k
        _buffer.resize(total);
418
24.8k
        for (size_t i = 0; i < total; ++i) {
419
13.2k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
13.2k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
13.2k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
13.2k
        }
426
427
11.6k
        if (LIKELY(read_count > 0)) {
428
11.6k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
11.6k
        }
430
431
11.6k
        *n = read_count;
432
11.6k
        return Status::OK();
433
11.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
190
                          MutableColumnPtr& dst) override {
409
190
        DCHECK(_parsed);
410
190
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
190
        auto total = *n;
416
190
        auto read_count = 0;
417
190
        _buffer.resize(total);
418
385
        for (size_t i = 0; i < total; ++i) {
419
195
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
195
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
195
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
195
        }
426
427
190
        if (LIKELY(read_count > 0)) {
428
190
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
190
        }
430
431
190
        *n = read_count;
432
190
        return Status::OK();
433
190
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4.60k
                          MutableColumnPtr& dst) override {
409
4.60k
        DCHECK(_parsed);
410
4.60k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.60k
        auto total = *n;
416
4.60k
        auto read_count = 0;
417
4.60k
        _buffer.resize(total);
418
18.6k
        for (size_t i = 0; i < total; ++i) {
419
14.0k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.0k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
14.0k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.0k
        }
426
427
4.60k
        if (LIKELY(read_count > 0)) {
428
4.59k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.59k
        }
430
431
4.60k
        *n = read_count;
432
4.60k
        return Status::OK();
433
4.60k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
27.4k
                          MutableColumnPtr& dst) override {
409
27.4k
        DCHECK(_parsed);
410
27.4k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
27.4k
        auto total = *n;
416
27.4k
        auto read_count = 0;
417
27.4k
        _buffer.resize(total);
418
24.3M
        for (size_t i = 0; i < total; ++i) {
419
24.3M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
24.3M
            if (UNLIKELY(ord >= _num_elements)) {
421
5.76k
                break;
422
5.76k
            }
423
424
24.3M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
24.3M
        }
426
427
27.4k
        if (LIKELY(read_count > 0)) {
428
27.4k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
27.4k
        }
430
431
27.4k
        *n = read_count;
432
27.4k
        return Status::OK();
433
27.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.5k
                          MutableColumnPtr& dst) override {
409
13.5k
        DCHECK(_parsed);
410
13.5k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.5k
        auto total = *n;
416
13.5k
        auto read_count = 0;
417
13.5k
        _buffer.resize(total);
418
9.10M
        for (size_t i = 0; i < total; ++i) {
419
9.09M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.09M
            if (UNLIKELY(ord >= _num_elements)) {
421
736
                break;
422
736
            }
423
424
9.09M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.09M
        }
426
427
13.5k
        if (LIKELY(read_count > 0)) {
428
13.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.5k
        }
430
431
13.5k
        *n = read_count;
432
13.5k
        return Status::OK();
433
13.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
930
                          MutableColumnPtr& dst) override {
409
930
        DCHECK(_parsed);
410
930
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
930
        auto total = *n;
416
930
        auto read_count = 0;
417
930
        _buffer.resize(total);
418
2.38k
        for (size_t i = 0; i < total; ++i) {
419
1.45k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.45k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
1.45k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.45k
        }
426
427
930
        if (LIKELY(read_count > 0)) {
428
930
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
930
        }
430
431
930
        *n = read_count;
432
930
        return Status::OK();
433
930
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
452
                          MutableColumnPtr& dst) override {
409
452
        DCHECK(_parsed);
410
452
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
452
        auto total = *n;
416
452
        auto read_count = 0;
417
452
        _buffer.resize(total);
418
1.16k
        for (size_t i = 0; i < total; ++i) {
419
716
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
716
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
716
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
716
        }
426
427
452
        if (LIKELY(read_count > 0)) {
428
452
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
452
        }
430
431
452
        *n = read_count;
432
452
        return Status::OK();
433
452
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
352
                          MutableColumnPtr& dst) override {
409
352
        DCHECK(_parsed);
410
352
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
352
        auto total = *n;
416
352
        auto read_count = 0;
417
352
        _buffer.resize(total);
418
1.21k
        for (size_t i = 0; i < total; ++i) {
419
867
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
867
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
867
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
867
        }
426
427
352
        if (LIKELY(read_count > 0)) {
428
352
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
352
        }
430
431
352
        *n = read_count;
432
352
        return Status::OK();
433
352
    }
434
435
164k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
164k
        return next_batch<false>(n, dst);
437
164k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
435
164k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
164k
        return next_batch<false>(n, dst);
437
164k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
438
439
4
    size_t count() const override { return _num_elements; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
439
4
    size_t count() const override { return _num_elements; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE5countEv
440
441
3.12M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
1.74M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
441
584
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
441
339
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
180k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
441
323
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE13current_indexEv
Line
Count
Source
441
221k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
199k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
441
208k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
441
222k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
441
31.0k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
441
198k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Line
Count
Source
441
1.02k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE13current_indexEv
Line
Count
Source
441
14
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE13current_indexEv
Line
Count
Source
441
3.47k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
441
847
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
441
110k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE13current_indexEv
Line
Count
Source
441
308
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE13current_indexEv
Line
Count
Source
441
45
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
Line
Count
Source
441
99
    size_t current_index() const override { return _cur_index; }
442
443
102M
    char* get_data(size_t index) const {
444
102M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
102M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
31.8M
    char* get_data(size_t index) const {
444
31.8M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
31.8M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
944k
    char* get_data(size_t index) const {
444
944k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
944k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
443
19.2k
    char* get_data(size_t index) const {
444
19.2k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
19.2k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
443
10.8M
    char* get_data(size_t index) const {
444
10.8M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
10.8M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
19.9k
    char* get_data(size_t index) const {
444
19.9k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
19.9k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
754k
    char* get_data(size_t index) const {
444
754k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
754k
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
1.22M
    char* get_data(size_t index) const {
444
1.22M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.22M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
6.01M
    char* get_data(size_t index) const {
444
6.01M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
6.01M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
511k
    char* get_data(size_t index) const {
444
511k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
511k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
7.06M
    char* get_data(size_t index) const {
444
7.06M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
7.06M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
443
9.59M
    char* get_data(size_t index) const {
444
9.59M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.59M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
443
500k
    char* get_data(size_t index) const {
444
500k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
500k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
443
20.6k
    char* get_data(size_t index) const {
444
20.6k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20.6k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
443
1.55k
    char* get_data(size_t index) const {
444
1.55k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.55k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
443
22.2k
    char* get_data(size_t index) const {
444
22.2k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
22.2k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
443
24.3M
    char* get_data(size_t index) const {
444
24.3M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
24.3M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
9.11M
    char* get_data(size_t index) const {
444
9.11M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.11M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
443
4.66k
    char* get_data(size_t index) const {
444
4.66k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
4.66k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Line
Count
Source
443
1.45k
    char* get_data(size_t index) const {
444
1.45k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.45k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
Line
Count
Source
443
4.11k
    char* get_data(size_t index) const {
444
4.11k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
4.11k
    }
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