Coverage Report

Created: 2026-06-10 10:33

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
912k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
437k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
75.7k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
10.7k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
145k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
12.4k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
95
72.4k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
95
12.2k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
95
14.7k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
184
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
36.8k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
95
45.2k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
315
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
95
6.98k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
193
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
95
9.66k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
95
12.2k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
95
16.2k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
95
1.14k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
95
785
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
95
678
    Status init() override { return reset(); }
96
97
148M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
147M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
75.9k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
15.1k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
446k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
11.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
74.1k
    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.9k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
97
16.7k
    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
191
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
108k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
87.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
97
379
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
Line
Count
Source
97
7.00k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
97
99
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
97
5.17k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
23.7k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
97
49.9k
    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
30.7k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
97
8.12k
    bool is_page_full() override { return _remain_element_capacity == 0; }
98
99
1.61M
    Status add(const uint8_t* vals, size_t* count) override {
100
1.61M
        return add_internal<false>(vals, count);
101
1.61M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
99
643k
    Status add(const uint8_t* vals, size_t* count) override {
100
643k
        return add_internal<false>(vals, count);
101
643k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
75.9k
    Status add(const uint8_t* vals, size_t* count) override {
100
75.9k
        return add_internal<false>(vals, count);
101
75.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
15.1k
    Status add(const uint8_t* vals, size_t* count) override {
100
15.1k
        return add_internal<false>(vals, count);
101
15.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
446k
    Status add(const uint8_t* vals, size_t* count) override {
100
446k
        return add_internal<false>(vals, count);
101
446k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
11.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
11.3k
        return add_internal<false>(vals, count);
101
11.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
74.1k
    Status add(const uint8_t* vals, size_t* count) override {
100
74.1k
        return add_internal<false>(vals, count);
101
74.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
99
11.9k
    Status add(const uint8_t* vals, size_t* count) override {
100
11.9k
        return add_internal<false>(vals, count);
101
11.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
99
16.7k
    Status add(const uint8_t* vals, size_t* count) override {
100
16.7k
        return add_internal<false>(vals, count);
101
16.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
191
    Status add(const uint8_t* vals, size_t* count) override {
100
191
        return add_internal<false>(vals, count);
101
191
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
108k
    Status add(const uint8_t* vals, size_t* count) override {
100
108k
        return add_internal<false>(vals, count);
101
108k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
87.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
87.3k
        return add_internal<false>(vals, count);
101
87.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
99
379
    Status add(const uint8_t* vals, size_t* count) override {
100
379
        return add_internal<false>(vals, count);
101
379
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
Line
Count
Source
99
7.00k
    Status add(const uint8_t* vals, size_t* count) override {
100
7.00k
        return add_internal<false>(vals, count);
101
7.00k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
99
    Status add(const uint8_t* vals, size_t* count) override {
100
99
        return add_internal<false>(vals, count);
101
99
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
99
5.17k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.17k
        return add_internal<false>(vals, count);
101
5.17k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
23.7k
    Status add(const uint8_t* vals, size_t* count) override {
100
23.7k
        return add_internal<false>(vals, count);
101
23.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
99
49.9k
    Status add(const uint8_t* vals, size_t* count) override {
100
49.9k
        return add_internal<false>(vals, count);
101
49.9k
    }
_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
30.7k
    Status add(const uint8_t* vals, size_t* count) override {
100
30.7k
        return add_internal<false>(vals, count);
101
30.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
99
8.12k
    Status add(const uint8_t* vals, size_t* count) override {
100
8.12k
        return add_internal<false>(vals, count);
101
8.12k
    }
102
103
147M
    Status single_add(const uint8_t* vals, size_t* count) {
104
147M
        return add_internal<true>(vals, count);
105
147M
    }
106
107
    template <bool single>
108
150M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
150M
        DCHECK(!_finished);
110
150M
        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
150M
        uint32_t to_add = cast_set<UInt32>(
126
150M
                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
150M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
150M
        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
150M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
148M
        _count += to_add;
134
148M
        _remain_element_capacity -= to_add;
135
148M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
148M
        *num_written = to_add;
138
148M
        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
147M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
147M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
147M
                        *reinterpret_cast<const uint32_t*>(vals);
149
147M
                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
147M
        }
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
148M
        return Status::OK();
159
150M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
643k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
643k
        DCHECK(!_finished);
110
643k
        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
643k
        uint32_t to_add = cast_set<UInt32>(
126
643k
                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
643k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
643k
        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
643k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
643k
        _count += to_add;
134
643k
        _remain_element_capacity -= to_add;
135
643k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
643k
        *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
643k
        memcpy(&_data[orig_size], vals, to_add_size);
158
643k
        return Status::OK();
159
643k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
148M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
148M
        DCHECK(!_finished);
110
148M
        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
148M
        uint32_t to_add = cast_set<UInt32>(
126
148M
                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
148M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
148M
        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
148M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
147M
        _count += to_add;
134
147M
        _remain_element_capacity -= to_add;
135
147M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
147M
        *num_written = to_add;
138
147M
        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
147M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
147M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
147M
                        *reinterpret_cast<const uint32_t*>(vals);
149
147M
                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
147M
        }
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
147M
        return Status::OK();
159
148M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
75.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
75.9k
        DCHECK(!_finished);
110
75.9k
        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
75.9k
        uint32_t to_add = cast_set<UInt32>(
126
75.9k
                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
75.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
75.9k
        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
75.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
75.9k
        _count += to_add;
134
75.9k
        _remain_element_capacity -= to_add;
135
75.9k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
75.9k
        *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
75.9k
        memcpy(&_data[orig_size], vals, to_add_size);
158
75.9k
        return Status::OK();
159
75.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
15.1k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
15.1k
        DCHECK(!_finished);
110
15.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
15.1k
        uint32_t to_add = cast_set<UInt32>(
126
15.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
15.1k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
15.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
15.1k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
15.1k
        _count += to_add;
134
15.1k
        _remain_element_capacity -= to_add;
135
15.1k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
15.1k
        *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
15.1k
        memcpy(&_data[orig_size], vals, to_add_size);
158
15.1k
        return Status::OK();
159
15.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
446k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
446k
        DCHECK(!_finished);
110
446k
        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
446k
        uint32_t to_add = cast_set<UInt32>(
126
446k
                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
446k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
446k
        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
446k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
446k
        _count += to_add;
134
446k
        _remain_element_capacity -= to_add;
135
446k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
446k
        *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
446k
        memcpy(&_data[orig_size], vals, to_add_size);
158
446k
        return Status::OK();
159
446k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
11.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
11.3k
        DCHECK(!_finished);
110
11.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
11.3k
        uint32_t to_add = cast_set<UInt32>(
126
11.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
11.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
11.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
11.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
11.3k
        _count += to_add;
134
11.3k
        _remain_element_capacity -= to_add;
135
11.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
11.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
11.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
11.3k
        return Status::OK();
159
11.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
74.1k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
74.1k
        DCHECK(!_finished);
110
74.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
74.1k
        uint32_t to_add = cast_set<UInt32>(
126
74.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
74.1k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
74.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
74.1k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
74.1k
        _count += to_add;
134
74.1k
        _remain_element_capacity -= to_add;
135
74.1k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
74.1k
        *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
74.1k
        memcpy(&_data[orig_size], vals, to_add_size);
158
74.1k
        return Status::OK();
159
74.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
11.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
11.9k
        DCHECK(!_finished);
110
11.9k
        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.9k
        uint32_t to_add = cast_set<UInt32>(
126
11.9k
                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.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
11.9k
        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.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
11.9k
        _count += to_add;
134
11.9k
        _remain_element_capacity -= to_add;
135
11.9k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
11.9k
        *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.9k
        memcpy(&_data[orig_size], vals, to_add_size);
158
11.9k
        return Status::OK();
159
11.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
16.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
16.7k
        DCHECK(!_finished);
110
16.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
16.7k
        uint32_t to_add = cast_set<UInt32>(
126
16.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
16.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
16.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
16.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
16.7k
        _count += to_add;
134
16.7k
        _remain_element_capacity -= to_add;
135
16.7k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
16.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
16.7k
        memcpy(&_data[orig_size], vals, to_add_size);
158
16.7k
        return Status::OK();
159
16.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
191
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
191
        DCHECK(!_finished);
110
191
        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
191
        uint32_t to_add = cast_set<UInt32>(
126
191
                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
191
        int to_add_size = to_add * SIZE_OF_TYPE;
129
191
        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
191
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
191
        _count += to_add;
134
191
        _remain_element_capacity -= to_add;
135
191
        _raw_data_size += to_add_size;
136
        // return added number through count
137
191
        *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
191
        memcpy(&_data[orig_size], vals, to_add_size);
158
191
        return Status::OK();
159
191
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
108k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
108k
        DCHECK(!_finished);
110
108k
        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
108k
        uint32_t to_add = cast_set<UInt32>(
126
108k
                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
108k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
108k
        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
108k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
108k
        _count += to_add;
134
108k
        _remain_element_capacity -= to_add;
135
108k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
108k
        *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
108k
        memcpy(&_data[orig_size], vals, to_add_size);
158
108k
        return Status::OK();
159
108k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
87.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
87.3k
        DCHECK(!_finished);
110
87.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
87.3k
        uint32_t to_add = cast_set<UInt32>(
126
87.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
87.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
87.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
87.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
87.3k
        _count += to_add;
134
87.3k
        _remain_element_capacity -= to_add;
135
87.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
87.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
87.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
87.3k
        return Status::OK();
159
87.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
379
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
379
        DCHECK(!_finished);
110
379
        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
379
        uint32_t to_add = cast_set<UInt32>(
126
379
                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
379
        int to_add_size = to_add * SIZE_OF_TYPE;
129
379
        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
379
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
379
        _count += to_add;
134
379
        _remain_element_capacity -= to_add;
135
379
        _raw_data_size += to_add_size;
136
        // return added number through count
137
379
        *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
379
        memcpy(&_data[orig_size], vals, to_add_size);
158
379
        return Status::OK();
159
379
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
7.00k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
7.00k
        DCHECK(!_finished);
110
7.00k
        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.00k
        uint32_t to_add = cast_set<UInt32>(
126
7.00k
                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.00k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
7.00k
        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.00k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
7.00k
        _count += to_add;
134
7.00k
        _remain_element_capacity -= to_add;
135
7.00k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
7.00k
        *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.00k
        memcpy(&_data[orig_size], vals, to_add_size);
158
7.00k
        return Status::OK();
159
7.00k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
99
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
99
        DCHECK(!_finished);
110
99
        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
99
        uint32_t to_add = cast_set<UInt32>(
126
99
                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
99
        int to_add_size = to_add * SIZE_OF_TYPE;
129
99
        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
99
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
99
        _count += to_add;
134
99
        _remain_element_capacity -= to_add;
135
99
        _raw_data_size += to_add_size;
136
        // return added number through count
137
99
        *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
99
        memcpy(&_data[orig_size], vals, to_add_size);
158
99
        return Status::OK();
159
99
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
5.17k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.17k
        DCHECK(!_finished);
110
5.17k
        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.17k
        uint32_t to_add = cast_set<UInt32>(
126
5.17k
                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.17k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.17k
        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.17k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.17k
        _count += to_add;
134
5.17k
        _remain_element_capacity -= to_add;
135
5.17k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.17k
        *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.17k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.17k
        return Status::OK();
159
5.17k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
23.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
23.7k
        DCHECK(!_finished);
110
23.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
23.7k
        uint32_t to_add = cast_set<UInt32>(
126
23.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
23.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
23.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
23.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
23.7k
        _count += to_add;
134
23.7k
        _remain_element_capacity -= to_add;
135
23.7k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
23.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
23.7k
        memcpy(&_data[orig_size], vals, to_add_size);
158
23.7k
        return Status::OK();
159
23.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
49.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
49.9k
        DCHECK(!_finished);
110
49.9k
        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
49.9k
        uint32_t to_add = cast_set<UInt32>(
126
49.9k
                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
49.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
49.9k
        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
49.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
49.9k
        _count += to_add;
134
49.9k
        _remain_element_capacity -= to_add;
135
49.9k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
49.9k
        *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
49.9k
        memcpy(&_data[orig_size], vals, to_add_size);
158
49.9k
        return Status::OK();
159
49.9k
    }
_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
30.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
30.7k
        DCHECK(!_finished);
110
30.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
30.7k
        uint32_t to_add = cast_set<UInt32>(
126
30.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
30.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
30.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
30.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
30.7k
        _count += to_add;
134
30.7k
        _remain_element_capacity -= to_add;
135
30.7k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
30.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
30.7k
        memcpy(&_data[orig_size], vals, to_add_size);
158
30.7k
        return Status::OK();
159
30.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
8.12k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
8.12k
        DCHECK(!_finished);
110
8.12k
        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
8.12k
        uint32_t to_add = cast_set<UInt32>(
126
8.12k
                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
8.12k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
8.12k
        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
8.12k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
8.12k
        _count += to_add;
134
8.12k
        _remain_element_capacity -= to_add;
135
8.12k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
8.12k
        *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
8.12k
        memcpy(&_data[orig_size], vals, to_add_size);
158
8.12k
        return Status::OK();
159
8.12k
    }
160
161
896k
    Status finish(OwnedSlice* slice) override {
162
896k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
896k
        return Status::OK();
164
896k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
416k
    Status finish(OwnedSlice* slice) override {
162
416k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
416k
        return Status::OK();
164
416k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
74.1k
    Status finish(OwnedSlice* slice) override {
162
74.1k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
74.1k
        return Status::OK();
164
74.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
9.86k
    Status finish(OwnedSlice* slice) override {
162
9.86k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
9.86k
        return Status::OK();
164
9.86k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
148k
    Status finish(OwnedSlice* slice) override {
162
148k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
149k
        return Status::OK();
164
148k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
11.7k
    Status finish(OwnedSlice* slice) override {
162
11.7k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
11.7k
        return Status::OK();
164
11.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
72.5k
    Status finish(OwnedSlice* slice) override {
162
72.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
72.5k
        return Status::OK();
164
72.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
11.4k
    Status finish(OwnedSlice* slice) override {
162
11.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
11.4k
        return Status::OK();
164
11.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
14.4k
    Status finish(OwnedSlice* slice) override {
162
14.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
14.4k
        return Status::OK();
164
14.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
196
    Status finish(OwnedSlice* slice) override {
162
196
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
196
        return Status::OK();
164
196
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
37.4k
    Status finish(OwnedSlice* slice) override {
162
37.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
37.4k
        return Status::OK();
164
37.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
44.2k
    Status finish(OwnedSlice* slice) override {
162
44.2k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
44.2k
        return Status::OK();
164
44.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
469
    Status finish(OwnedSlice* slice) override {
162
469
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
469
        return Status::OK();
164
469
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7.09k
    Status finish(OwnedSlice* slice) override {
162
7.09k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.09k
        return Status::OK();
164
7.09k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
107
    Status finish(OwnedSlice* slice) override {
162
107
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
107
        return Status::OK();
164
107
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
9.65k
    Status finish(OwnedSlice* slice) override {
162
9.65k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
9.65k
        return Status::OK();
164
9.65k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
18.6k
    Status finish(OwnedSlice* slice) override {
162
18.6k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
18.6k
        return Status::OK();
164
18.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
16.4k
    Status finish(OwnedSlice* slice) override {
162
16.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
16.4k
        return Status::OK();
164
16.4k
    }
_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
700
    Status finish(OwnedSlice* slice) override {
162
700
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
700
        return Status::OK();
164
700
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
603
    Status finish(OwnedSlice* slice) override {
162
603
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
604
        return Status::OK();
164
603
    }
165
166
2.15M
    Status reset() override {
167
2.15M
        RETURN_IF_CATCH_EXCEPTION({
168
2.15M
            size_t block_size = _options.data_page_size;
169
2.15M
            _count = 0;
170
2.15M
            _raw_data_size = 0;
171
2.15M
            _data.clear();
172
2.15M
            _data.reserve(block_size);
173
2.15M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
2.15M
                    << "buffer must be naturally-aligned";
175
2.15M
            _buffer.clear();
176
2.15M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
2.15M
            _finished = false;
178
2.15M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
2.15M
        });
180
2.15M
        return Status::OK();
181
2.15M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
166
1.20M
    Status reset() override {
167
1.20M
        RETURN_IF_CATCH_EXCEPTION({
168
1.20M
            size_t block_size = _options.data_page_size;
169
1.20M
            _count = 0;
170
1.20M
            _raw_data_size = 0;
171
1.20M
            _data.clear();
172
1.20M
            _data.reserve(block_size);
173
1.20M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.20M
                    << "buffer must be naturally-aligned";
175
1.20M
            _buffer.clear();
176
1.20M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.20M
            _finished = false;
178
1.20M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.20M
        });
180
1.20M
        return Status::OK();
181
1.20M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
149k
    Status reset() override {
167
149k
        RETURN_IF_CATCH_EXCEPTION({
168
149k
            size_t block_size = _options.data_page_size;
169
149k
            _count = 0;
170
149k
            _raw_data_size = 0;
171
149k
            _data.clear();
172
149k
            _data.reserve(block_size);
173
149k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
149k
                    << "buffer must be naturally-aligned";
175
149k
            _buffer.clear();
176
149k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
149k
            _finished = false;
178
149k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
149k
        });
180
149k
        return Status::OK();
181
149k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
166
20.5k
    Status reset() override {
167
20.5k
        RETURN_IF_CATCH_EXCEPTION({
168
20.5k
            size_t block_size = _options.data_page_size;
169
20.5k
            _count = 0;
170
20.5k
            _raw_data_size = 0;
171
20.5k
            _data.clear();
172
20.5k
            _data.reserve(block_size);
173
20.5k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
20.5k
                    << "buffer must be naturally-aligned";
175
20.5k
            _buffer.clear();
176
20.5k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
20.5k
            _finished = false;
178
20.5k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
20.5k
        });
180
20.6k
        return Status::OK();
181
20.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
294k
    Status reset() override {
167
294k
        RETURN_IF_CATCH_EXCEPTION({
168
294k
            size_t block_size = _options.data_page_size;
169
294k
            _count = 0;
170
294k
            _raw_data_size = 0;
171
294k
            _data.clear();
172
294k
            _data.reserve(block_size);
173
294k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
294k
                    << "buffer must be naturally-aligned";
175
294k
            _buffer.clear();
176
294k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
294k
            _finished = false;
178
294k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
294k
        });
180
294k
        return Status::OK();
181
294k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
166
24.2k
    Status reset() override {
167
24.2k
        RETURN_IF_CATCH_EXCEPTION({
168
24.2k
            size_t block_size = _options.data_page_size;
169
24.2k
            _count = 0;
170
24.2k
            _raw_data_size = 0;
171
24.2k
            _data.clear();
172
24.2k
            _data.reserve(block_size);
173
24.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
24.2k
                    << "buffer must be naturally-aligned";
175
24.2k
            _buffer.clear();
176
24.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
24.2k
            _finished = false;
178
24.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
24.2k
        });
180
24.2k
        return Status::OK();
181
24.2k
    }
_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
145k
        return Status::OK();
181
144k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
166
23.7k
    Status reset() override {
167
23.7k
        RETURN_IF_CATCH_EXCEPTION({
168
23.7k
            size_t block_size = _options.data_page_size;
169
23.7k
            _count = 0;
170
23.7k
            _raw_data_size = 0;
171
23.7k
            _data.clear();
172
23.7k
            _data.reserve(block_size);
173
23.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
23.7k
                    << "buffer must be naturally-aligned";
175
23.7k
            _buffer.clear();
176
23.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
23.7k
            _finished = false;
178
23.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
23.7k
        });
180
23.7k
        return Status::OK();
181
23.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
166
29.1k
    Status reset() override {
167
29.1k
        RETURN_IF_CATCH_EXCEPTION({
168
29.1k
            size_t block_size = _options.data_page_size;
169
29.1k
            _count = 0;
170
29.1k
            _raw_data_size = 0;
171
29.1k
            _data.clear();
172
29.1k
            _data.reserve(block_size);
173
29.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
29.1k
                    << "buffer must be naturally-aligned";
175
29.1k
            _buffer.clear();
176
29.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
29.1k
            _finished = false;
178
29.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
29.1k
        });
180
29.1k
        return Status::OK();
181
29.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
166
380
    Status reset() override {
167
380
        RETURN_IF_CATCH_EXCEPTION({
168
380
            size_t block_size = _options.data_page_size;
169
380
            _count = 0;
170
380
            _raw_data_size = 0;
171
380
            _data.clear();
172
380
            _data.reserve(block_size);
173
380
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
380
                    << "buffer must be naturally-aligned";
175
380
            _buffer.clear();
176
380
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
380
            _finished = false;
178
380
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
380
        });
180
380
        return Status::OK();
181
380
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
166
74.3k
    Status reset() override {
167
74.3k
        RETURN_IF_CATCH_EXCEPTION({
168
74.3k
            size_t block_size = _options.data_page_size;
169
74.3k
            _count = 0;
170
74.3k
            _raw_data_size = 0;
171
74.3k
            _data.clear();
172
74.3k
            _data.reserve(block_size);
173
74.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
74.3k
                    << "buffer must be naturally-aligned";
175
74.3k
            _buffer.clear();
176
74.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
74.3k
            _finished = false;
178
74.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
74.3k
        });
180
74.4k
        return Status::OK();
181
74.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
166
89.4k
    Status reset() override {
167
89.4k
        RETURN_IF_CATCH_EXCEPTION({
168
89.4k
            size_t block_size = _options.data_page_size;
169
89.4k
            _count = 0;
170
89.4k
            _raw_data_size = 0;
171
89.4k
            _data.clear();
172
89.4k
            _data.reserve(block_size);
173
89.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
89.4k
                    << "buffer must be naturally-aligned";
175
89.4k
            _buffer.clear();
176
89.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
89.4k
            _finished = false;
178
89.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
89.4k
        });
180
89.5k
        return Status::OK();
181
89.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
166
784
    Status reset() override {
167
784
        RETURN_IF_CATCH_EXCEPTION({
168
784
            size_t block_size = _options.data_page_size;
169
784
            _count = 0;
170
784
            _raw_data_size = 0;
171
784
            _data.clear();
172
784
            _data.reserve(block_size);
173
784
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
784
                    << "buffer must be naturally-aligned";
175
784
            _buffer.clear();
176
784
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
784
            _finished = false;
178
784
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
784
        });
180
784
        return Status::OK();
181
784
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
Line
Count
Source
166
13.9k
    Status reset() override {
167
13.9k
        RETURN_IF_CATCH_EXCEPTION({
168
13.9k
            size_t block_size = _options.data_page_size;
169
13.9k
            _count = 0;
170
13.9k
            _raw_data_size = 0;
171
13.9k
            _data.clear();
172
13.9k
            _data.reserve(block_size);
173
13.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
13.9k
                    << "buffer must be naturally-aligned";
175
13.9k
            _buffer.clear();
176
13.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
13.9k
            _finished = false;
178
13.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
13.9k
        });
180
14.1k
        return Status::OK();
181
13.9k
    }
_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.3k
    Status reset() override {
167
19.3k
        RETURN_IF_CATCH_EXCEPTION({
168
19.3k
            size_t block_size = _options.data_page_size;
169
19.3k
            _count = 0;
170
19.3k
            _raw_data_size = 0;
171
19.3k
            _data.clear();
172
19.3k
            _data.reserve(block_size);
173
19.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
19.3k
                    << "buffer must be naturally-aligned";
175
19.3k
            _buffer.clear();
176
19.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
19.3k
            _finished = false;
178
19.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
19.3k
        });
180
19.3k
        return Status::OK();
181
19.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
30.9k
    Status reset() override {
167
30.9k
        RETURN_IF_CATCH_EXCEPTION({
168
30.9k
            size_t block_size = _options.data_page_size;
169
30.9k
            _count = 0;
170
30.9k
            _raw_data_size = 0;
171
30.9k
            _data.clear();
172
30.9k
            _data.reserve(block_size);
173
30.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
30.9k
                    << "buffer must be naturally-aligned";
175
30.9k
            _buffer.clear();
176
30.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
30.9k
            _finished = false;
178
30.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
30.9k
        });
180
30.9k
        return Status::OK();
181
30.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
166
32.6k
    Status reset() override {
167
32.6k
        RETURN_IF_CATCH_EXCEPTION({
168
32.6k
            size_t block_size = _options.data_page_size;
169
32.6k
            _count = 0;
170
32.6k
            _raw_data_size = 0;
171
32.6k
            _data.clear();
172
32.6k
            _data.reserve(block_size);
173
32.6k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
32.6k
                    << "buffer must be naturally-aligned";
175
32.6k
            _buffer.clear();
176
32.6k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
32.6k
            _finished = false;
178
32.6k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
32.6k
        });
180
32.6k
        return Status::OK();
181
32.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Line
Count
Source
166
2.20k
    Status reset() override {
167
2.20k
        RETURN_IF_CATCH_EXCEPTION({
168
2.20k
            size_t block_size = _options.data_page_size;
169
2.20k
            _count = 0;
170
2.20k
            _raw_data_size = 0;
171
2.20k
            _data.clear();
172
2.20k
            _data.reserve(block_size);
173
2.20k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
2.20k
                    << "buffer must be naturally-aligned";
175
2.20k
            _buffer.clear();
176
2.20k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
2.20k
            _finished = false;
178
2.20k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
2.20k
        });
180
2.22k
        return Status::OK();
181
2.20k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Line
Count
Source
166
1.48k
    Status reset() override {
167
1.48k
        RETURN_IF_CATCH_EXCEPTION({
168
1.48k
            size_t block_size = _options.data_page_size;
169
1.48k
            _count = 0;
170
1.48k
            _raw_data_size = 0;
171
1.48k
            _data.clear();
172
1.48k
            _data.reserve(block_size);
173
1.48k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.48k
                    << "buffer must be naturally-aligned";
175
1.48k
            _buffer.clear();
176
1.48k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.48k
            _finished = false;
178
1.48k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.48k
        });
180
1.48k
        return Status::OK();
181
1.48k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
166
1.28k
    Status reset() override {
167
1.28k
        RETURN_IF_CATCH_EXCEPTION({
168
1.28k
            size_t block_size = _options.data_page_size;
169
1.28k
            _count = 0;
170
1.28k
            _raw_data_size = 0;
171
1.28k
            _data.clear();
172
1.28k
            _data.reserve(block_size);
173
1.28k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.28k
                    << "buffer must be naturally-aligned";
175
1.28k
            _buffer.clear();
176
1.28k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.28k
            _finished = false;
178
1.28k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.28k
        });
180
1.28k
        return Status::OK();
181
1.28k
    }
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
105k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
57.1k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
185
17.2k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
185
979
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
18.6k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
1.33k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
2.41k
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
726
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
185
812
    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.80k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
2.88k
    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
165
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
185
339
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
185
1.20k
    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
569k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
89.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
74.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
9.86k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
148k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
187
11.7k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
72.5k
    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.4k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
14.4k
    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
196
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
187
37.4k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
187
44.2k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
187
469
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
Line
Count
Source
187
7.09k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
187
107
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
187
9.65k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
18.6k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
187
16.4k
    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
699
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
187
603
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
911k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
436k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
75.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
10.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
145k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
12.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
72.4k
            : _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.2k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
14.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
184
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
36.8k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
45.2k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
315
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
6.96k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
193
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.66k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
12.2k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
16.2k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1.14k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
786
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
678
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
192
193
896k
    OwnedSlice _finish(int final_size_of_type) {
194
896k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
896k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
896k
        int padding_elems = num_elems_after_padding - _count;
199
896k
        int padding_bytes = padding_elems * final_size_of_type;
200
25.7M
        for (int i = 0; i < padding_bytes; i++) {
201
24.8M
            _data.push_back(0);
202
24.8M
        }
203
204
        // reserve enough place for compression
205
896k
        _buffer.resize(
206
896k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
896k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
896k
        int64_t bytes =
210
896k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
896k
                                         num_elems_after_padding, final_size_of_type, 0);
212
896k
        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
896k
        encode_fixed32_le(&_buffer[0], _count);
222
896k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
896k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
896k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
896k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
896k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
896k
        return _buffer.build();
229
896k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
416k
    OwnedSlice _finish(int final_size_of_type) {
194
416k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
416k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
416k
        int padding_elems = num_elems_after_padding - _count;
199
416k
        int padding_bytes = padding_elems * final_size_of_type;
200
8.30M
        for (int i = 0; i < padding_bytes; i++) {
201
7.89M
            _data.push_back(0);
202
7.89M
        }
203
204
        // reserve enough place for compression
205
416k
        _buffer.resize(
206
416k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
416k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
416k
        int64_t bytes =
210
416k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
416k
                                         num_elems_after_padding, final_size_of_type, 0);
212
416k
        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
416k
        encode_fixed32_le(&_buffer[0], _count);
222
416k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
416k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
416k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
416k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
416k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
416k
        return _buffer.build();
229
416k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
74.1k
    OwnedSlice _finish(int final_size_of_type) {
194
74.1k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
74.1k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
74.1k
        int padding_elems = num_elems_after_padding - _count;
199
74.1k
        int padding_bytes = padding_elems * final_size_of_type;
200
490k
        for (int i = 0; i < padding_bytes; i++) {
201
416k
            _data.push_back(0);
202
416k
        }
203
204
        // reserve enough place for compression
205
74.1k
        _buffer.resize(
206
74.1k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
74.1k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
74.1k
        int64_t bytes =
210
74.1k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
74.1k
                                         num_elems_after_padding, final_size_of_type, 0);
212
74.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
74.1k
        encode_fixed32_le(&_buffer[0], _count);
222
74.1k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
74.1k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
74.1k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
74.1k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
74.1k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
74.1k
        return _buffer.build();
229
74.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
9.86k
    OwnedSlice _finish(int final_size_of_type) {
194
9.86k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
9.86k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
9.86k
        int padding_elems = num_elems_after_padding - _count;
199
9.86k
        int padding_bytes = padding_elems * final_size_of_type;
200
107k
        for (int i = 0; i < padding_bytes; i++) {
201
97.6k
            _data.push_back(0);
202
97.6k
        }
203
204
        // reserve enough place for compression
205
9.86k
        _buffer.resize(
206
9.86k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
9.86k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
9.86k
        int64_t bytes =
210
9.86k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
9.86k
                                         num_elems_after_padding, final_size_of_type, 0);
212
9.86k
        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.86k
        encode_fixed32_le(&_buffer[0], _count);
222
9.86k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
9.86k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
9.86k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
9.86k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
9.86k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
9.86k
        return _buffer.build();
229
9.86k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
148k
    OwnedSlice _finish(int final_size_of_type) {
194
148k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
148k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
148k
        int padding_elems = num_elems_after_padding - _count;
199
148k
        int padding_bytes = padding_elems * final_size_of_type;
200
6.60M
        for (int i = 0; i < padding_bytes; i++) {
201
6.46M
            _data.push_back(0);
202
6.46M
        }
203
204
        // reserve enough place for compression
205
148k
        _buffer.resize(
206
148k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
148k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
148k
        int64_t bytes =
210
148k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
148k
                                         num_elems_after_padding, final_size_of_type, 0);
212
148k
        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
148k
        encode_fixed32_le(&_buffer[0], _count);
222
148k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
148k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
148k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
148k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
148k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
148k
        return _buffer.build();
229
148k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
11.7k
    OwnedSlice _finish(int final_size_of_type) {
194
11.7k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
11.7k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
11.7k
        int padding_elems = num_elems_after_padding - _count;
199
11.7k
        int padding_bytes = padding_elems * final_size_of_type;
200
835k
        for (int i = 0; i < padding_bytes; i++) {
201
823k
            _data.push_back(0);
202
823k
        }
203
204
        // reserve enough place for compression
205
11.7k
        _buffer.resize(
206
11.7k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
11.7k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
11.7k
        int64_t bytes =
210
11.7k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
11.7k
                                         num_elems_after_padding, final_size_of_type, 0);
212
11.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
11.7k
        encode_fixed32_le(&_buffer[0], _count);
222
11.7k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
11.7k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
11.7k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
11.7k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
11.7k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
11.7k
        return _buffer.build();
229
11.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
72.5k
    OwnedSlice _finish(int final_size_of_type) {
194
72.5k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
72.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
72.5k
        int padding_elems = num_elems_after_padding - _count;
199
72.5k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.47M
        for (int i = 0; i < padding_bytes; i++) {
201
3.39M
            _data.push_back(0);
202
3.39M
        }
203
204
        // reserve enough place for compression
205
72.5k
        _buffer.resize(
206
72.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
72.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
72.5k
        int64_t bytes =
210
72.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
72.5k
                                         num_elems_after_padding, final_size_of_type, 0);
212
72.5k
        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.5k
        encode_fixed32_le(&_buffer[0], _count);
222
72.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
72.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
72.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
72.5k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
72.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
72.5k
        return _buffer.build();
229
72.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
11.4k
    OwnedSlice _finish(int final_size_of_type) {
194
11.4k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
11.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
11.4k
        int padding_elems = num_elems_after_padding - _count;
199
11.4k
        int padding_bytes = padding_elems * final_size_of_type;
200
250k
        for (int i = 0; i < padding_bytes; i++) {
201
239k
            _data.push_back(0);
202
239k
        }
203
204
        // reserve enough place for compression
205
11.4k
        _buffer.resize(
206
11.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
11.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
11.4k
        int64_t bytes =
210
11.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
11.4k
                                         num_elems_after_padding, final_size_of_type, 0);
212
11.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
11.4k
        encode_fixed32_le(&_buffer[0], _count);
222
11.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
11.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
11.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
11.4k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
11.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
11.4k
        return _buffer.build();
229
11.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
14.4k
    OwnedSlice _finish(int final_size_of_type) {
194
14.4k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
14.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
14.4k
        int padding_elems = num_elems_after_padding - _count;
199
14.4k
        int padding_bytes = padding_elems * final_size_of_type;
200
606k
        for (int i = 0; i < padding_bytes; i++) {
201
591k
            _data.push_back(0);
202
591k
        }
203
204
        // reserve enough place for compression
205
14.4k
        _buffer.resize(
206
14.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
14.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
14.4k
        int64_t bytes =
210
14.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
14.4k
                                         num_elems_after_padding, final_size_of_type, 0);
212
14.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
14.4k
        encode_fixed32_le(&_buffer[0], _count);
222
14.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
14.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
14.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
14.4k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
14.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
14.4k
        return _buffer.build();
229
14.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
196
    OwnedSlice _finish(int final_size_of_type) {
194
196
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
196
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
196
        int padding_elems = num_elems_after_padding - _count;
199
196
        int padding_bytes = padding_elems * final_size_of_type;
200
2.68k
        for (int i = 0; i < padding_bytes; i++) {
201
2.48k
            _data.push_back(0);
202
2.48k
        }
203
204
        // reserve enough place for compression
205
196
        _buffer.resize(
206
196
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
196
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
196
        int64_t bytes =
210
196
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
196
                                         num_elems_after_padding, final_size_of_type, 0);
212
196
        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
196
        encode_fixed32_le(&_buffer[0], _count);
222
196
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
196
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
196
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
196
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
196
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
196
        return _buffer.build();
229
196
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
193
37.4k
    OwnedSlice _finish(int final_size_of_type) {
194
37.4k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
37.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
37.4k
        int padding_elems = num_elems_after_padding - _count;
199
37.4k
        int padding_bytes = padding_elems * final_size_of_type;
200
806k
        for (int i = 0; i < padding_bytes; i++) {
201
768k
            _data.push_back(0);
202
768k
        }
203
204
        // reserve enough place for compression
205
37.4k
        _buffer.resize(
206
37.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
37.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
37.4k
        int64_t bytes =
210
37.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
37.4k
                                         num_elems_after_padding, final_size_of_type, 0);
212
37.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
37.4k
        encode_fixed32_le(&_buffer[0], _count);
222
37.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
37.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
37.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
37.4k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
37.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
37.4k
        return _buffer.build();
229
37.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
193
44.2k
    OwnedSlice _finish(int final_size_of_type) {
194
44.2k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
44.2k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
44.2k
        int padding_elems = num_elems_after_padding - _count;
199
44.2k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.88M
        for (int i = 0; i < padding_bytes; i++) {
201
1.83M
            _data.push_back(0);
202
1.83M
        }
203
204
        // reserve enough place for compression
205
44.2k
        _buffer.resize(
206
44.2k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
44.2k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
44.2k
        int64_t bytes =
210
44.2k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
44.2k
                                         num_elems_after_padding, final_size_of_type, 0);
212
44.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
44.2k
        encode_fixed32_le(&_buffer[0], _count);
222
44.2k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
44.2k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
44.2k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
44.2k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
44.2k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
44.2k
        return _buffer.build();
229
44.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
193
469
    OwnedSlice _finish(int final_size_of_type) {
194
469
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
469
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
469
        int padding_elems = num_elems_after_padding - _count;
199
469
        int padding_bytes = padding_elems * final_size_of_type;
200
8.00k
        for (int i = 0; i < padding_bytes; i++) {
201
7.53k
            _data.push_back(0);
202
7.53k
        }
203
204
        // reserve enough place for compression
205
469
        _buffer.resize(
206
469
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
469
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
469
        int64_t bytes =
210
469
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
469
                                         num_elems_after_padding, final_size_of_type, 0);
212
469
        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
469
        encode_fixed32_le(&_buffer[0], _count);
222
469
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
469
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
469
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
469
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
469
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
469
        return _buffer.build();
229
469
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
Line
Count
Source
193
7.08k
    OwnedSlice _finish(int final_size_of_type) {
194
7.08k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.08k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.08k
        int padding_elems = num_elems_after_padding - _count;
199
7.08k
        int padding_bytes = padding_elems * final_size_of_type;
200
371k
        for (int i = 0; i < padding_bytes; i++) {
201
363k
            _data.push_back(0);
202
363k
        }
203
204
        // reserve enough place for compression
205
7.08k
        _buffer.resize(
206
7.08k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.08k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.08k
        int64_t bytes =
210
7.08k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.08k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.08k
        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.08k
        encode_fixed32_le(&_buffer[0], _count);
222
7.08k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.08k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.08k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.08k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.08k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.08k
        return _buffer.build();
229
7.08k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
193
107
    OwnedSlice _finish(int final_size_of_type) {
194
107
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
107
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
107
        int padding_elems = num_elems_after_padding - _count;
199
107
        int padding_bytes = padding_elems * final_size_of_type;
200
6.57k
        for (int i = 0; i < padding_bytes; i++) {
201
6.46k
            _data.push_back(0);
202
6.46k
        }
203
204
        // reserve enough place for compression
205
107
        _buffer.resize(
206
107
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
107
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
107
        int64_t bytes =
210
107
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
107
                                         num_elems_after_padding, final_size_of_type, 0);
212
107
        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
107
        encode_fixed32_le(&_buffer[0], _count);
222
107
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
107
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
107
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
107
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
107
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
107
        return _buffer.build();
229
107
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
193
9.65k
    OwnedSlice _finish(int final_size_of_type) {
194
9.65k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
9.65k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
9.65k
        int padding_elems = num_elems_after_padding - _count;
199
9.65k
        int padding_bytes = padding_elems * final_size_of_type;
200
118k
        for (int i = 0; i < padding_bytes; i++) {
201
109k
            _data.push_back(0);
202
109k
        }
203
204
        // reserve enough place for compression
205
9.65k
        _buffer.resize(
206
9.65k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
9.65k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
9.65k
        int64_t bytes =
210
9.65k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
9.65k
                                         num_elems_after_padding, final_size_of_type, 0);
212
9.65k
        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.65k
        encode_fixed32_le(&_buffer[0], _count);
222
9.65k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
9.65k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
9.65k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
9.65k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
9.65k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
9.65k
        return _buffer.build();
229
9.65k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
18.6k
    OwnedSlice _finish(int final_size_of_type) {
194
18.6k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
18.6k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
18.6k
        int padding_elems = num_elems_after_padding - _count;
199
18.6k
        int padding_bytes = padding_elems * final_size_of_type;
200
496k
        for (int i = 0; i < padding_bytes; i++) {
201
477k
            _data.push_back(0);
202
477k
        }
203
204
        // reserve enough place for compression
205
18.6k
        _buffer.resize(
206
18.6k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
18.6k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
18.6k
        int64_t bytes =
210
18.6k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
18.6k
                                         num_elems_after_padding, final_size_of_type, 0);
212
18.6k
        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.6k
        encode_fixed32_le(&_buffer[0], _count);
222
18.6k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
18.6k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
18.6k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
18.6k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
18.6k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
18.6k
        return _buffer.build();
229
18.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
193
16.4k
    OwnedSlice _finish(int final_size_of_type) {
194
16.4k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
16.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
16.4k
        int padding_elems = num_elems_after_padding - _count;
199
16.4k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.12M
        for (int i = 0; i < padding_bytes; i++) {
201
1.11M
            _data.push_back(0);
202
1.11M
        }
203
204
        // reserve enough place for compression
205
16.4k
        _buffer.resize(
206
16.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
16.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
16.4k
        int64_t bytes =
210
16.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
16.4k
                                         num_elems_after_padding, final_size_of_type, 0);
212
16.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
16.4k
        encode_fixed32_le(&_buffer[0], _count);
222
16.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
16.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
16.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
16.4k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
16.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
16.4k
        return _buffer.build();
229
16.4k
    }
_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
700
    OwnedSlice _finish(int final_size_of_type) {
194
700
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
700
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
700
        int padding_elems = num_elems_after_padding - _count;
199
700
        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
700
        _buffer.resize(
206
700
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
700
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
700
        int64_t bytes =
210
700
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
700
                                         num_elems_after_padding, final_size_of_type, 0);
212
700
        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
700
        encode_fixed32_le(&_buffer[0], _count);
222
700
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
700
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
700
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
700
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
700
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
700
        return _buffer.build();
229
700
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
193
604
    OwnedSlice _finish(int final_size_of_type) {
194
604
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
604
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
604
        int padding_elems = num_elems_after_padding - _count;
199
604
        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
604
        _buffer.resize(
206
604
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
604
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
604
        int64_t bytes =
210
604
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
604
                                         num_elems_after_padding, final_size_of_type, 0);
212
604
        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
604
        encode_fixed32_le(&_buffer[0], _count);
222
604
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
604
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
604
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
604
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
604
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
604
        return _buffer.build();
229
604
    }
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
2.62M
                                       int& size_of_element) {
253
2.62M
    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
2.62M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
2.62M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
2.62M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
2.62M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
2.62M
    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
2.62M
    switch (size_of_element) {
271
276k
    case 1:
272
297k
    case 2:
273
300k
    case 3:
274
1.69M
    case 4:
275
2.52M
    case 8:
276
2.53M
    case 12:
277
2.61M
    case 16:
278
2.62M
    case 32:
279
2.62M
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
2.62M
    }
283
2.62M
    return Status::OK();
284
2.62M
}
285
286
template <FieldType Type>
287
class BitShufflePageDecoder : public PageDecoder {
288
public:
289
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
290
1.31M
            : _data(data),
291
1.31M
              _options(options),
292
1.31M
              _parsed(false),
293
1.31M
              _num_elements(0),
294
1.31M
              _num_element_after_padding(0),
295
1.31M
              _size_of_element(0),
296
1.31M
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
602k
            : _data(data),
291
602k
              _options(options),
292
602k
              _parsed(false),
293
602k
              _num_elements(0),
294
602k
              _num_element_after_padding(0),
295
602k
              _size_of_element(0),
296
602k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
138k
            : _data(data),
291
138k
              _options(options),
292
138k
              _parsed(false),
293
138k
              _num_elements(0),
294
138k
              _num_element_after_padding(0),
295
138k
              _size_of_element(0),
296
138k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
10.8k
            : _data(data),
291
10.8k
              _options(options),
292
10.8k
              _parsed(false),
293
10.8k
              _num_elements(0),
294
10.8k
              _num_element_after_padding(0),
295
10.8k
              _size_of_element(0),
296
10.8k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
163k
            : _data(data),
291
163k
              _options(options),
292
163k
              _parsed(false),
293
163k
              _num_elements(0),
294
163k
              _num_element_after_padding(0),
295
163k
              _size_of_element(0),
296
163k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
13.0k
            : _data(data),
291
13.0k
              _options(options),
292
13.0k
              _parsed(false),
293
13.0k
              _num_elements(0),
294
13.0k
              _num_element_after_padding(0),
295
13.0k
              _size_of_element(0),
296
13.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
98.3k
            : _data(data),
291
98.3k
              _options(options),
292
98.3k
              _parsed(false),
293
98.3k
              _num_elements(0),
294
98.3k
              _num_element_after_padding(0),
295
98.3k
              _size_of_element(0),
296
98.3k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
19.4k
            : _data(data),
291
19.4k
              _options(options),
292
19.4k
              _parsed(false),
293
19.4k
              _num_elements(0),
294
19.4k
              _num_element_after_padding(0),
295
19.4k
              _size_of_element(0),
296
19.4k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
28.4k
            : _data(data),
291
28.4k
              _options(options),
292
28.4k
              _parsed(false),
293
28.4k
              _num_elements(0),
294
28.4k
              _num_element_after_padding(0),
295
28.4k
              _size_of_element(0),
296
28.4k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.59k
            : _data(data),
291
1.59k
              _options(options),
292
1.59k
              _parsed(false),
293
1.59k
              _num_elements(0),
294
1.59k
              _num_element_after_padding(0),
295
1.59k
              _size_of_element(0),
296
1.59k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
59.4k
            : _data(data),
291
59.4k
              _options(options),
292
59.4k
              _parsed(false),
293
59.4k
              _num_elements(0),
294
59.4k
              _num_element_after_padding(0),
295
59.4k
              _size_of_element(0),
296
59.4k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
68.6k
            : _data(data),
291
68.6k
              _options(options),
292
68.6k
              _parsed(false),
293
68.6k
              _num_elements(0),
294
68.6k
              _num_element_after_padding(0),
295
68.6k
              _size_of_element(0),
296
68.6k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
2.18k
            : _data(data),
291
2.18k
              _options(options),
292
2.18k
              _parsed(false),
293
2.18k
              _num_elements(0),
294
2.18k
              _num_element_after_padding(0),
295
2.18k
              _size_of_element(0),
296
2.18k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
14.8k
            : _data(data),
291
14.8k
              _options(options),
292
14.8k
              _parsed(false),
293
14.8k
              _num_elements(0),
294
14.8k
              _num_element_after_padding(0),
295
14.8k
              _size_of_element(0),
296
14.8k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.33k
            : _data(data),
291
1.33k
              _options(options),
292
1.33k
              _parsed(false),
293
1.33k
              _num_elements(0),
294
1.33k
              _num_element_after_padding(0),
295
1.33k
              _size_of_element(0),
296
1.33k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
15.1k
            : _data(data),
291
15.1k
              _options(options),
292
15.1k
              _parsed(false),
293
15.1k
              _num_elements(0),
294
15.1k
              _num_element_after_padding(0),
295
15.1k
              _size_of_element(0),
296
15.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
40.7k
            : _data(data),
291
40.7k
              _options(options),
292
40.7k
              _parsed(false),
293
40.7k
              _num_elements(0),
294
40.7k
              _num_element_after_padding(0),
295
40.7k
              _size_of_element(0),
296
40.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_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) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.74k
            : _data(data),
291
1.74k
              _options(options),
292
1.74k
              _parsed(false),
293
1.74k
              _num_elements(0),
294
1.74k
              _num_element_after_padding(0),
295
1.74k
              _size_of_element(0),
296
1.74k
              _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.10k
            : _data(data),
291
1.10k
              _options(options),
292
1.10k
              _parsed(false),
293
1.10k
              _num_elements(0),
294
1.10k
              _num_element_after_padding(0),
295
1.10k
              _size_of_element(0),
296
1.10k
              _cur_index(0) {}
297
298
1.31M
    Status init() override {
299
1.31M
        CHECK(!_parsed);
300
1.31M
        size_t unused;
301
1.31M
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.31M
                                                 _num_element_after_padding, _size_of_element));
303
304
1.31M
        if (_data.size !=
305
1.31M
            _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.31M
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.31M
                     _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.31M
        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.31M
        _parsed = true;
325
1.31M
        return Status::OK();
326
1.31M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
298
602k
    Status init() override {
299
602k
        CHECK(!_parsed);
300
602k
        size_t unused;
301
602k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
602k
                                                 _num_element_after_padding, _size_of_element));
303
304
602k
        if (_data.size !=
305
602k
            _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
602k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
602k
                     _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
602k
        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
602k
        _parsed = true;
325
602k
        return Status::OK();
326
602k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
138k
    Status init() override {
299
138k
        CHECK(!_parsed);
300
138k
        size_t unused;
301
138k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
138k
                                                 _num_element_after_padding, _size_of_element));
303
304
138k
        if (_data.size !=
305
138k
            _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
138k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
138k
                     _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
138k
        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
138k
        _parsed = true;
325
138k
        return Status::OK();
326
138k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
10.8k
    Status init() override {
299
10.8k
        CHECK(!_parsed);
300
10.8k
        size_t unused;
301
10.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
10.8k
                                                 _num_element_after_padding, _size_of_element));
303
304
10.8k
        if (_data.size !=
305
10.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
10.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
10.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
10.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
10.8k
        _parsed = true;
325
10.8k
        return Status::OK();
326
10.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
162k
    Status init() override {
299
162k
        CHECK(!_parsed);
300
162k
        size_t unused;
301
162k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
162k
                                                 _num_element_after_padding, _size_of_element));
303
304
162k
        if (_data.size !=
305
162k
            _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
162k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
162k
                     _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
162k
        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
162k
        _parsed = true;
325
162k
        return Status::OK();
326
162k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
298
13.0k
    Status init() override {
299
13.0k
        CHECK(!_parsed);
300
13.0k
        size_t unused;
301
13.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
13.0k
                                                 _num_element_after_padding, _size_of_element));
303
304
13.0k
        if (_data.size !=
305
13.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
13.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
13.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
13.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
13.0k
        _parsed = true;
325
13.0k
        return Status::OK();
326
13.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
298
98.2k
    Status init() override {
299
98.2k
        CHECK(!_parsed);
300
98.2k
        size_t unused;
301
98.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
98.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
98.2k
        if (_data.size !=
305
98.2k
            _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
98.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
98.2k
                     _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
98.2k
        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
98.2k
        _parsed = true;
325
98.2k
        return Status::OK();
326
98.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
298
19.4k
    Status init() override {
299
19.4k
        CHECK(!_parsed);
300
19.4k
        size_t unused;
301
19.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
19.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
19.4k
        if (_data.size !=
305
19.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
19.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
19.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
19.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
19.4k
        _parsed = true;
325
19.4k
        return Status::OK();
326
19.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
298
28.4k
    Status init() override {
299
28.4k
        CHECK(!_parsed);
300
28.4k
        size_t unused;
301
28.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
28.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
28.4k
        if (_data.size !=
305
28.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
28.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
28.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
28.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
28.4k
        _parsed = true;
325
28.4k
        return Status::OK();
326
28.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
1.60k
    Status init() override {
299
1.60k
        CHECK(!_parsed);
300
1.60k
        size_t unused;
301
1.60k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.60k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.60k
        if (_data.size !=
305
1.60k
            _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.60k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.60k
                     _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.60k
        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.60k
        _parsed = true;
325
1.60k
        return Status::OK();
326
1.60k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
59.3k
    Status init() override {
299
59.3k
        CHECK(!_parsed);
300
59.3k
        size_t unused;
301
59.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
59.3k
                                                 _num_element_after_padding, _size_of_element));
303
304
59.3k
        if (_data.size !=
305
59.3k
            _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
59.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
59.3k
                     _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
59.3k
        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
59.3k
        _parsed = true;
325
59.3k
        return Status::OK();
326
59.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
298
68.5k
    Status init() override {
299
68.5k
        CHECK(!_parsed);
300
68.5k
        size_t unused;
301
68.5k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
68.5k
                                                 _num_element_after_padding, _size_of_element));
303
304
68.5k
        if (_data.size !=
305
68.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
68.5k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
68.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
68.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
68.5k
        _parsed = true;
325
68.5k
        return Status::OK();
326
68.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
298
2.18k
    Status init() override {
299
2.18k
        CHECK(!_parsed);
300
2.18k
        size_t unused;
301
2.18k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
2.18k
                                                 _num_element_after_padding, _size_of_element));
303
304
2.18k
        if (_data.size !=
305
2.18k
            _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.18k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
2.18k
                     _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.18k
        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.18k
        _parsed = true;
325
2.18k
        return Status::OK();
326
2.18k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
298
14.8k
    Status init() override {
299
14.8k
        CHECK(!_parsed);
300
14.8k
        size_t unused;
301
14.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
14.8k
                                                 _num_element_after_padding, _size_of_element));
303
304
14.8k
        if (_data.size !=
305
14.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
14.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
14.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
14.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
14.8k
        _parsed = true;
325
14.8k
        return Status::OK();
326
14.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
298
1.33k
    Status init() override {
299
1.33k
        CHECK(!_parsed);
300
1.33k
        size_t unused;
301
1.33k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.33k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.33k
        if (_data.size !=
305
1.33k
            _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.33k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.33k
                     _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.33k
        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.33k
        _parsed = true;
325
1.33k
        return Status::OK();
326
1.33k
    }
_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.7k
    Status init() override {
299
40.7k
        CHECK(!_parsed);
300
40.7k
        size_t unused;
301
40.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
40.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
40.7k
        if (_data.size !=
305
40.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
40.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
40.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
40.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
40.7k
        _parsed = true;
325
40.7k
        return Status::OK();
326
40.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
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
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
298
1.74k
    Status init() override {
299
1.74k
        CHECK(!_parsed);
300
1.74k
        size_t unused;
301
1.74k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.74k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.74k
        if (_data.size !=
305
1.74k
            _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.74k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.74k
                     _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.74k
        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.74k
        _parsed = true;
325
1.74k
        return Status::OK();
326
1.74k
    }
_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.09k
    Status init() override {
299
1.09k
        CHECK(!_parsed);
300
1.09k
        size_t unused;
301
1.09k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.09k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.09k
        if (_data.size !=
305
1.09k
            _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.09k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.09k
                     _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.09k
        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.09k
        _parsed = true;
325
1.09k
        return Status::OK();
326
1.09k
    }
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.75M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
3.75M
        if (_num_elements == 0) [[unlikely]] {
337
7.99k
            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
7.99k
        }
342
343
3.75M
        DCHECK_LE(pos, _num_elements);
344
3.75M
        _cur_index = pos;
345
3.75M
        return Status::OK();
346
3.75M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.95M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
1.95M
        if (_num_elements == 0) [[unlikely]] {
337
2.72k
            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.72k
        }
342
343
1.95M
        DCHECK_LE(pos, _num_elements);
344
1.95M
        _cur_index = pos;
345
1.95M
        return Status::OK();
346
1.95M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
67.9k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
67.9k
        if (_num_elements == 0) [[unlikely]] {
337
440
            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
440
        }
342
343
67.9k
        DCHECK_LE(pos, _num_elements);
344
67.9k
        _cur_index = pos;
345
67.9k
        return Status::OK();
346
67.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
4.99k
    Status seek_to_position_in_page(size_t pos) override {
335
4.99k
        DCHECK(_parsed) << "Must call init()";
336
4.99k
        if (_num_elements == 0) [[unlikely]] {
337
1.35k
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
1.35k
        }
342
343
4.99k
        DCHECK_LE(pos, _num_elements);
344
4.99k
        _cur_index = pos;
345
4.99k
        return Status::OK();
346
4.99k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
131k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
131k
        if (_num_elements == 0) [[unlikely]] {
337
669
            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
669
        }
342
343
131k
        DCHECK_LE(pos, _num_elements);
344
131k
        _cur_index = pos;
345
131k
        return Status::OK();
346
131k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
334
3.56k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
3.56k
        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
3.56k
        DCHECK_LE(pos, _num_elements);
344
3.56k
        _cur_index = pos;
345
3.56k
        return Status::OK();
346
3.56k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
334
15.0k
    Status seek_to_position_in_page(size_t pos) override {
335
15.0k
        DCHECK(_parsed) << "Must call init()";
336
15.0k
        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
15.0k
        DCHECK_LE(pos, _num_elements);
344
15.0k
        _cur_index = pos;
345
15.0k
        return Status::OK();
346
15.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
233k
    Status seek_to_position_in_page(size_t pos) override {
335
233k
        DCHECK(_parsed) << "Must call init()";
336
233k
        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
233k
        DCHECK_LE(pos, _num_elements);
344
233k
        _cur_index = pos;
345
233k
        return Status::OK();
346
233k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
334
207k
    Status seek_to_position_in_page(size_t pos) override {
335
207k
        DCHECK(_parsed) << "Must call init()";
336
207k
        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
207k
        DCHECK_LE(pos, _num_elements);
344
207k
        _cur_index = pos;
345
207k
        return Status::OK();
346
207k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
334
220k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
220k
        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
220k
        DCHECK_LE(pos, _num_elements);
344
220k
        _cur_index = pos;
345
220k
        return Status::OK();
346
220k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
334
526k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
526k
        if (_num_elements == 0) [[unlikely]] {
337
1.36k
            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.36k
        }
342
343
526k
        DCHECK_LE(pos, _num_elements);
344
526k
        _cur_index = pos;
345
526k
        return Status::OK();
346
526k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
334
44.8k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
44.8k
        if (_num_elements == 0) [[unlikely]] {
337
18
            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
18
        }
342
343
44.8k
        DCHECK_LE(pos, _num_elements);
344
44.8k
        _cur_index = pos;
345
44.8k
        return Status::OK();
346
44.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
205k
    Status seek_to_position_in_page(size_t pos) override {
335
205k
        DCHECK(_parsed) << "Must call init()";
336
205k
        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
205k
        DCHECK_LE(pos, _num_elements);
344
205k
        _cur_index = pos;
345
205k
        return Status::OK();
346
205k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
334
6.86k
    Status seek_to_position_in_page(size_t pos) override {
335
6.86k
        DCHECK(_parsed) << "Must call init()";
336
6.86k
        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.86k
        DCHECK_LE(pos, _num_elements);
344
6.86k
        _cur_index = pos;
345
6.86k
        return Status::OK();
346
6.86k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
Line
Count
Source
334
28
    Status seek_to_position_in_page(size_t pos) override {
335
28
        DCHECK(_parsed) << "Must call init()";
336
28
        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
28
        DCHECK_LE(pos, _num_elements);
344
28
        _cur_index = pos;
345
28
        return Status::OK();
346
28
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Line
Count
Source
334
839
    Status seek_to_position_in_page(size_t pos) override {
335
839
        DCHECK(_parsed) << "Must call init()";
336
839
        if (_num_elements == 0) [[unlikely]] {
337
25
            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
25
        }
342
343
839
        DCHECK_LE(pos, _num_elements);
344
839
        _cur_index = pos;
345
839
        return Status::OK();
346
839
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
334
18.3k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
18.3k
        if (_num_elements == 0) [[unlikely]] {
337
782
            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
782
        }
342
343
18.3k
        DCHECK_LE(pos, _num_elements);
344
18.3k
        _cur_index = pos;
345
18.3k
        return Status::OK();
346
18.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Line
Count
Source
334
115k
    Status seek_to_position_in_page(size_t pos) override {
335
115k
        DCHECK(_parsed) << "Must call init()";
336
115k
        if (_num_elements == 0) [[unlikely]] {
337
255
            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
255
        }
342
343
115k
        DCHECK_LE(pos, _num_elements);
344
115k
        _cur_index = pos;
345
115k
        return Status::OK();
346
115k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.94k
    Status seek_to_position_in_page(size_t pos) override {
335
1.94k
        DCHECK(_parsed) << "Must call init()";
336
1.94k
        if (_num_elements == 0) [[unlikely]] {
337
2
            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
        }
342
343
1.94k
        DCHECK_LE(pos, _num_elements);
344
1.94k
        _cur_index = pos;
345
1.94k
        return Status::OK();
346
1.94k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE24seek_to_position_in_pageEm
Line
Count
Source
334
53
    Status seek_to_position_in_page(size_t pos) override {
335
53
        DCHECK(_parsed) << "Must call init()";
336
53
        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
53
        DCHECK_LE(pos, _num_elements);
344
53
        _cur_index = pos;
345
53
        return Status::OK();
346
53
    }
_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.67M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.67M
        DCHECK(_parsed);
389
1.67M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.67M
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.67M
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.67M
        *n = max_fetch;
398
1.67M
        if constexpr (forward_index) {
399
1.45M
            _cur_index += max_fetch;
400
1.45M
        }
401
402
1.67M
        return Status::OK();
403
1.67M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
195k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
195k
        DCHECK(_parsed);
389
195k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
195k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
195k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
195k
        *n = max_fetch;
398
195k
        if constexpr (forward_index) {
399
195k
            _cur_index += max_fetch;
400
195k
        }
401
402
195k
        return Status::OK();
403
195k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
209k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
209k
        DCHECK(_parsed);
389
209k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
209k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
209k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
209k
        *n = max_fetch;
398
209k
        if constexpr (forward_index) {
399
209k
            _cur_index += max_fetch;
400
209k
        }
401
402
209k
        return Status::OK();
403
209k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
9.88k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
9.88k
        DCHECK(_parsed);
389
9.89k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
9.88k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
9.88k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
9.88k
        *n = max_fetch;
398
9.88k
        if constexpr (forward_index) {
399
9.88k
            _cur_index += max_fetch;
400
9.88k
        }
401
402
9.88k
        return Status::OK();
403
9.88k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
223k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
223k
        DCHECK(_parsed);
389
223k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
223k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
223k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
223k
        *n = max_fetch;
398
223k
        if constexpr (forward_index) {
399
223k
            _cur_index += max_fetch;
400
223k
        }
401
402
223k
        return Status::OK();
403
223k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
9.30k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
9.30k
        DCHECK(_parsed);
389
9.30k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
9.30k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
9.30k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
9.30k
        *n = max_fetch;
398
9.30k
        if constexpr (forward_index) {
399
9.30k
            _cur_index += max_fetch;
400
9.30k
        }
401
402
9.30k
        return Status::OK();
403
9.30k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
163k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
163k
        DCHECK(_parsed);
389
163k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
163k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
163k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
163k
        *n = max_fetch;
398
163k
        if constexpr (forward_index) {
399
163k
            _cur_index += max_fetch;
400
163k
        }
401
402
163k
        return Status::OK();
403
163k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
218k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
218k
        DCHECK(_parsed);
389
218k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
218k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
218k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
218k
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
218k
        return Status::OK();
403
218k
    }
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
13.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
13.9k
        DCHECK(_parsed);
389
13.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
13.9k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
13.9k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
13.9k
        *n = max_fetch;
398
13.9k
        if constexpr (forward_index) {
399
13.9k
            _cur_index += max_fetch;
400
13.9k
        }
401
402
13.9k
        return Status::OK();
403
13.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
26.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
26.5k
        DCHECK(_parsed);
389
26.5k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
26.5k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
26.5k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
26.5k
        *n = max_fetch;
398
26.5k
        if constexpr (forward_index) {
399
26.5k
            _cur_index += max_fetch;
400
26.5k
        }
401
402
26.5k
        return Status::OK();
403
26.5k
    }
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
3.89k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.89k
        DCHECK(_parsed);
389
3.89k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.89k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.89k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.89k
        *n = max_fetch;
398
3.89k
        if constexpr (forward_index) {
399
3.89k
            _cur_index += max_fetch;
400
3.89k
        }
401
402
3.89k
        return Status::OK();
403
3.89k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
418k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
418k
        DCHECK(_parsed);
389
418k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
418k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
418k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
418k
        *n = max_fetch;
398
418k
        if constexpr (forward_index) {
399
418k
            _cur_index += max_fetch;
400
418k
        }
401
402
418k
        return Status::OK();
403
418k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
84.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
84.4k
        DCHECK(_parsed);
389
84.4k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
84.4k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
84.4k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
84.4k
        *n = max_fetch;
398
84.4k
        if constexpr (forward_index) {
399
84.4k
            _cur_index += max_fetch;
400
84.4k
        }
401
402
84.4k
        return Status::OK();
403
84.4k
    }
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.10k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.10k
        DCHECK(_parsed);
389
1.10k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.10k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.10k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.10k
        *n = max_fetch;
398
1.10k
        if constexpr (forward_index) {
399
1.10k
            _cur_index += max_fetch;
400
1.10k
        }
401
402
1.10k
        return Status::OK();
403
1.10k
    }
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.71k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
7.71k
        DCHECK(_parsed);
389
7.71k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
7.71k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
7.71k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
7.71k
        *n = max_fetch;
398
7.71k
        if constexpr (forward_index) {
399
7.71k
            _cur_index += max_fetch;
400
7.71k
        }
401
402
7.71k
        return Status::OK();
403
7.71k
    }
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.21k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.21k
        DCHECK(_parsed);
389
1.21k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.21k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.21k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.21k
        *n = max_fetch;
398
1.21k
        if constexpr (forward_index) {
399
1.21k
            _cur_index += max_fetch;
400
1.21k
        }
401
402
1.21k
        return Status::OK();
403
1.21k
    }
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.01k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
8.01k
        DCHECK(_parsed);
389
8.01k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
8.01k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
8.01k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
8.01k
        *n = max_fetch;
398
8.01k
        if constexpr (forward_index) {
399
8.01k
            _cur_index += max_fetch;
400
8.01k
        }
401
402
8.01k
        return Status::OK();
403
8.01k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
30.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
30.7k
        DCHECK(_parsed);
389
30.7k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
30.7k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
30.7k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
30.7k
        *n = max_fetch;
398
30.7k
        if constexpr (forward_index) {
399
30.7k
            _cur_index += max_fetch;
400
30.7k
        }
401
402
30.7k
        return Status::OK();
403
30.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
30.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
30.2k
        DCHECK(_parsed);
389
30.2k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
30.2k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
30.2k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
30.2k
        *n = max_fetch;
398
30.2k
        if constexpr (forward_index) {
399
30.2k
            _cur_index += max_fetch;
400
30.2k
        }
401
402
30.2k
        return Status::OK();
403
30.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.15k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.15k
        DCHECK(_parsed);
389
3.15k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.15k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.15k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.15k
        *n = max_fetch;
398
3.15k
        if constexpr (forward_index) {
399
3.15k
            _cur_index += max_fetch;
400
3.15k
        }
401
402
3.15k
        return Status::OK();
403
3.15k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_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_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
8.29k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
8.29k
        DCHECK(_parsed);
389
8.29k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
8.29k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
8.29k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
8.29k
        *n = max_fetch;
398
8.29k
        if constexpr (forward_index) {
399
8.29k
            _cur_index += max_fetch;
400
8.29k
        }
401
402
8.29k
        return Status::OK();
403
8.29k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
404
405
1.45M
    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
195k
    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
209k
    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
9.89k
    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
223k
    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
9.30k
    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
163k
    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
13.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
26.5k
    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
3.89k
    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
418k
    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
84.4k
    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.10k
    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.71k
    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.21k
    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.02k
    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
30.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
30.2k
    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.15k
    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
8.26k
    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
8.29k
    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
515k
                          MutableColumnPtr& dst) override {
409
515k
        DCHECK(_parsed);
410
515k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
515k
        auto total = *n;
416
515k
        auto read_count = 0;
417
515k
        _buffer.resize(total);
418
106M
        for (size_t i = 0; i < total; ++i) {
419
105M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
105M
            if (UNLIKELY(ord >= _num_elements)) {
421
11.1k
                break;
422
11.1k
            }
423
424
105M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
105M
        }
426
427
515k
        if (LIKELY(read_count > 0)) {
428
515k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
515k
        }
430
431
515k
        *n = read_count;
432
515k
        return Status::OK();
433
515k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
94.1k
                          MutableColumnPtr& dst) override {
409
94.1k
        DCHECK(_parsed);
410
94.1k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
94.1k
        auto total = *n;
416
94.1k
        auto read_count = 0;
417
94.1k
        _buffer.resize(total);
418
34.2M
        for (size_t i = 0; i < total; ++i) {
419
34.1M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
34.1M
            if (UNLIKELY(ord >= _num_elements)) {
421
55
                break;
422
55
            }
423
424
34.1M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
34.1M
        }
426
427
94.1k
        if (LIKELY(read_count > 0)) {
428
94.1k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
94.1k
        }
430
431
94.1k
        *n = read_count;
432
94.1k
        return Status::OK();
433
94.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
60.8k
                          MutableColumnPtr& dst) override {
409
60.8k
        DCHECK(_parsed);
410
60.8k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
60.8k
        auto total = *n;
416
60.8k
        auto read_count = 0;
417
60.8k
        _buffer.resize(total);
418
878k
        for (size_t i = 0; i < total; ++i) {
419
817k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
817k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
817k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
817k
        }
426
427
60.8k
        if (LIKELY(read_count > 0)) {
428
60.8k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
60.8k
        }
430
431
60.8k
        *n = read_count;
432
60.8k
        return Status::OK();
433
60.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
5.56k
                          MutableColumnPtr& dst) override {
409
5.56k
        DCHECK(_parsed);
410
5.56k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
5.56k
        auto total = *n;
416
5.56k
        auto read_count = 0;
417
5.56k
        _buffer.resize(total);
418
47.6k
        for (size_t i = 0; i < total; ++i) {
419
42.0k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
42.0k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
42.0k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
42.0k
        }
426
427
5.56k
        if (LIKELY(read_count > 0)) {
428
5.56k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
5.56k
        }
430
431
5.56k
        *n = read_count;
432
5.56k
        return Status::OK();
433
5.56k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
158k
                          MutableColumnPtr& dst) override {
409
158k
        DCHECK(_parsed);
410
158k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
158k
        auto total = *n;
416
158k
        auto read_count = 0;
417
158k
        _buffer.resize(total);
418
13.5M
        for (size_t i = 0; i < total; ++i) {
419
13.3M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
13.3M
            if (UNLIKELY(ord >= _num_elements)) {
421
797
                break;
422
797
            }
423
424
13.3M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
13.3M
        }
426
427
158k
        if (LIKELY(read_count > 0)) {
428
158k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
158k
        }
430
431
158k
        *n = read_count;
432
158k
        return Status::OK();
433
158k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
6.89k
                          MutableColumnPtr& dst) override {
409
6.89k
        DCHECK(_parsed);
410
6.89k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
6.89k
        auto total = *n;
416
6.89k
        auto read_count = 0;
417
6.89k
        _buffer.resize(total);
418
15.6k
        for (size_t i = 0; i < total; ++i) {
419
8.75k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
8.75k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
8.75k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
8.75k
        }
426
427
6.89k
        if (LIKELY(read_count > 0)) {
428
6.89k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
6.89k
        }
430
431
6.89k
        *n = read_count;
432
6.89k
        return Status::OK();
433
6.89k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
40.5k
                          MutableColumnPtr& dst) override {
409
40.5k
        DCHECK(_parsed);
410
40.5k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
40.5k
        auto total = *n;
416
40.5k
        auto read_count = 0;
417
40.5k
        _buffer.resize(total);
418
8.19M
        for (size_t i = 0; i < total; ++i) {
419
8.15M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
8.15M
            if (UNLIKELY(ord >= _num_elements)) {
421
2.37k
                break;
422
2.37k
            }
423
424
8.15M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
8.15M
        }
426
427
40.5k
        if (LIKELY(read_count > 0)) {
428
40.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
40.5k
        }
430
431
40.5k
        *n = read_count;
432
40.5k
        return Status::OK();
433
40.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
10.1k
                          MutableColumnPtr& dst) override {
409
10.1k
        DCHECK(_parsed);
410
10.1k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
10.1k
        auto total = *n;
416
10.1k
        auto read_count = 0;
417
10.1k
        _buffer.resize(total);
418
1.22M
        for (size_t i = 0; i < total; ++i) {
419
1.21M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.21M
            if (UNLIKELY(ord >= _num_elements)) {
421
32
                break;
422
32
            }
423
424
1.21M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.21M
        }
426
427
10.1k
        if (LIKELY(read_count > 0)) {
428
10.1k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
10.1k
        }
430
431
10.1k
        *n = read_count;
432
10.1k
        return Status::OK();
433
10.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.8k
                          MutableColumnPtr& dst) override {
409
13.8k
        DCHECK(_parsed);
410
13.8k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.8k
        auto total = *n;
416
13.8k
        auto read_count = 0;
417
13.8k
        _buffer.resize(total);
418
2.02M
        for (size_t i = 0; i < total; ++i) {
419
2.00M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
2.00M
            if (UNLIKELY(ord >= _num_elements)) {
421
447
                break;
422
447
            }
423
424
2.00M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
2.00M
        }
426
427
13.8k
        if (LIKELY(read_count > 0)) {
428
13.8k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.8k
        }
430
431
13.8k
        *n = read_count;
432
13.8k
        return Status::OK();
433
13.8k
    }
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.37k
                          MutableColumnPtr& dst) override {
409
1.37k
        DCHECK(_parsed);
410
1.37k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.37k
        auto total = *n;
416
1.37k
        auto read_count = 0;
417
1.37k
        _buffer.resize(total);
418
505k
        for (size_t i = 0; i < total; ++i) {
419
503k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
503k
            if (UNLIKELY(ord >= _num_elements)) {
421
15
                break;
422
15
            }
423
424
503k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
503k
        }
426
427
1.37k
        if (LIKELY(read_count > 0)) {
428
1.37k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.37k
        }
430
431
1.37k
        *n = read_count;
432
1.37k
        return Status::OK();
433
1.37k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
29.0k
                          MutableColumnPtr& dst) override {
409
29.0k
        DCHECK(_parsed);
410
29.0k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
29.0k
        auto total = *n;
416
29.0k
        auto read_count = 0;
417
29.0k
        _buffer.resize(total);
418
6.34M
        for (size_t i = 0; i < total; ++i) {
419
6.31M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
6.31M
            if (UNLIKELY(ord >= _num_elements)) {
421
560
                break;
422
560
            }
423
424
6.31M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
6.31M
        }
426
427
29.0k
        if (LIKELY(read_count > 0)) {
428
28.9k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
28.9k
        }
430
431
29.0k
        *n = read_count;
432
29.0k
        return Status::OK();
433
29.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
34.0k
                          MutableColumnPtr& dst) override {
409
34.0k
        DCHECK(_parsed);
410
34.0k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
34.0k
        auto total = *n;
416
34.0k
        auto read_count = 0;
417
34.0k
        _buffer.resize(total);
418
9.89M
        for (size_t i = 0; i < total; ++i) {
419
9.86M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.86M
            if (UNLIKELY(ord >= _num_elements)) {
421
173
                break;
422
173
            }
423
424
9.86M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.86M
        }
426
427
34.0k
        if (LIKELY(read_count > 0)) {
428
34.0k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
34.0k
        }
430
431
34.0k
        *n = read_count;
432
34.0k
        return Status::OK();
433
34.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1.75k
                          MutableColumnPtr& dst) override {
409
1.75k
        DCHECK(_parsed);
410
1.75k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.75k
        auto total = *n;
416
1.75k
        auto read_count = 0;
417
1.75k
        _buffer.resize(total);
418
506k
        for (size_t i = 0; i < total; ++i) {
419
504k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
504k
            if (UNLIKELY(ord >= _num_elements)) {
421
252
                break;
422
252
            }
423
424
504k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
504k
        }
426
427
1.76k
        if (LIKELY(read_count > 0)) {
428
1.76k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.76k
        }
430
431
1.75k
        *n = read_count;
432
1.75k
        return Status::OK();
433
1.75k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
11.7k
                          MutableColumnPtr& dst) override {
409
11.7k
        DCHECK(_parsed);
410
11.7k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
11.7k
        auto total = *n;
416
11.7k
        auto read_count = 0;
417
11.7k
        _buffer.resize(total);
418
24.9k
        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.7k
        if (LIKELY(read_count > 0)) {
428
11.7k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
11.7k
        }
430
431
11.7k
        *n = read_count;
432
11.7k
        return Status::OK();
433
11.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
131
                          MutableColumnPtr& dst) override {
409
131
        DCHECK(_parsed);
410
131
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
131
        auto total = *n;
416
131
        auto read_count = 0;
417
131
        _buffer.resize(total);
418
267
        for (size_t i = 0; i < total; ++i) {
419
136
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
136
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
136
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
136
        }
426
427
131
        if (LIKELY(read_count > 0)) {
428
131
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
131
        }
430
431
131
        *n = read_count;
432
131
        return Status::OK();
433
131
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4.74k
                          MutableColumnPtr& dst) override {
409
4.74k
        DCHECK(_parsed);
410
4.74k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.74k
        auto total = *n;
416
4.74k
        auto read_count = 0;
417
4.74k
        _buffer.resize(total);
418
19.3k
        for (size_t i = 0; i < total; ++i) {
419
14.6k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.6k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
14.6k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.6k
        }
426
427
4.74k
        if (LIKELY(read_count > 0)) {
428
4.74k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.74k
        }
430
431
4.74k
        *n = read_count;
432
4.74k
        return Status::OK();
433
4.74k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
27.2k
                          MutableColumnPtr& dst) override {
409
27.2k
        DCHECK(_parsed);
410
27.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
27.2k
        auto total = *n;
416
27.2k
        auto read_count = 0;
417
27.2k
        _buffer.resize(total);
418
19.7M
        for (size_t i = 0; i < total; ++i) {
419
19.6M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
19.6M
            if (UNLIKELY(ord >= _num_elements)) {
421
5.72k
                break;
422
5.72k
            }
423
424
19.6M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
19.6M
        }
426
427
27.2k
        if (LIKELY(read_count > 0)) {
428
27.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
27.2k
        }
430
431
27.2k
        *n = read_count;
432
27.2k
        return Status::OK();
433
27.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.9k
                          MutableColumnPtr& dst) override {
409
13.9k
        DCHECK(_parsed);
410
13.9k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.9k
        auto total = *n;
416
13.9k
        auto read_count = 0;
417
13.9k
        _buffer.resize(total);
418
9.21M
        for (size_t i = 0; i < total; ++i) {
419
9.20M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.20M
            if (UNLIKELY(ord >= _num_elements)) {
421
725
                break;
422
725
            }
423
424
9.20M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.20M
        }
426
427
13.9k
        if (LIKELY(read_count > 0)) {
428
13.9k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.9k
        }
430
431
13.9k
        *n = read_count;
432
13.9k
        return Status::OK();
433
13.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
960
                          MutableColumnPtr& dst) override {
409
960
        DCHECK(_parsed);
410
960
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
960
        auto total = *n;
416
960
        auto read_count = 0;
417
960
        _buffer.resize(total);
418
2.77k
        for (size_t i = 0; i < total; ++i) {
419
1.81k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.81k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
1.81k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.81k
        }
426
427
961
        if (LIKELY(read_count > 0)) {
428
961
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
961
        }
430
431
960
        *n = read_count;
432
960
        return Status::OK();
433
960
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
456
                          MutableColumnPtr& dst) override {
409
456
        DCHECK(_parsed);
410
456
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
456
        auto total = *n;
416
456
        auto read_count = 0;
417
456
        _buffer.resize(total);
418
1.17k
        for (size_t i = 0; i < total; ++i) {
419
720
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
720
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
720
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
720
        }
426
427
456
        if (LIKELY(read_count > 0)) {
428
456
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
456
        }
430
431
456
        *n = read_count;
432
456
        return Status::OK();
433
456
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
354
                          MutableColumnPtr& dst) override {
409
354
        DCHECK(_parsed);
410
354
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
354
        auto total = *n;
416
354
        auto read_count = 0;
417
354
        _buffer.resize(total);
418
1.22k
        for (size_t i = 0; i < total; ++i) {
419
869
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
869
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
869
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
869
        }
426
427
354
        if (LIKELY(read_count > 0)) {
428
354
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
354
        }
430
431
354
        *n = read_count;
432
354
        return Status::OK();
433
354
    }
434
435
219k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
219k
        return next_batch<false>(n, dst);
437
219k
    }
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
219k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
219k
        return next_batch<false>(n, dst);
437
219k
    }
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.16M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
1.75M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
441
535
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
441
188
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
181k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
441
346
    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
232k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
206k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
441
216k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
441
234k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
441
18.9k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
441
204k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Line
Count
Source
441
1.00k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE13current_indexEv
Line
Count
Source
441
6
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE13current_indexEv
Line
Count
Source
441
3.46k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
441
1.45k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
441
111k
    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
51
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
Line
Count
Source
441
100
    size_t current_index() const override { return _cur_index; }
442
443
109M
    char* get_data(size_t index) const {
444
109M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
109M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
36.5M
    char* get_data(size_t index) const {
444
36.5M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
36.5M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
1.02M
    char* get_data(size_t index) const {
444
1.02M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.02M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
443
51.9k
    char* get_data(size_t index) const {
444
51.9k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
51.9k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
443
13.6M
    char* get_data(size_t index) const {
444
13.6M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
13.6M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
18.0k
    char* get_data(size_t index) const {
444
18.0k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
18.0k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
8.53M
    char* get_data(size_t index) const {
444
8.53M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
8.53M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
1.23M
    char* get_data(size_t index) const {
444
1.23M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.23M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
2.03M
    char* get_data(size_t index) const {
444
2.03M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
2.03M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
507k
    char* get_data(size_t index) const {
444
507k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
507k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
6.73M
    char* get_data(size_t index) const {
444
6.73M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
6.73M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
443
9.94M
    char* get_data(size_t index) const {
444
9.94M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.94M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
443
505k
    char* get_data(size_t index) const {
444
505k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
505k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
443
20.9k
    char* get_data(size_t index) const {
444
20.9k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20.9k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
443
1.35k
    char* get_data(size_t index) const {
444
1.35k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.35k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
443
22.6k
    char* get_data(size_t index) const {
444
22.6k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
22.6k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
443
19.7M
    char* get_data(size_t index) const {
444
19.7M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
19.7M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
9.23M
    char* get_data(size_t index) const {
444
9.23M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.23M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
443
4.96k
    char* get_data(size_t index) const {
444
4.96k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
4.96k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Line
Count
Source
443
8.98k
    char* get_data(size_t index) const {
444
8.98k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
8.98k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
Line
Count
Source
443
9.16k
    char* get_data(size_t index) const {
444
9.16k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.16k
    }
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