Coverage Report

Created: 2026-08-27 19:56

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
654k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
341k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
40.9k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
9.03k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
41.3k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
12.1k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
95
65.7k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
Line
Count
Source
95
1
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
95
6.29k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
95
7.56k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
356
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
37.6k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
95
42.6k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
452
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
95
7.59k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
351
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
95
9.74k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
95
12.0k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
95
16.9k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
95
1.22k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
95
730
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
95
728
    Status init() override { return reset(); }
96
97
145M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
145M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
50.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
11.6k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
404k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
12.0k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
65.6k
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12is_page_fullEv
Line
Count
Source
97
6.25k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
97
9.28k
    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
372
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
45.9k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
42.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
97
515
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
Line
Count
Source
97
7.66k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
97
260
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
97
5.20k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
26.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
97
17.8k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Line
Count
Source
97
1.40k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Line
Count
Source
97
634
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
97
647
    bool is_page_full() override { return _remain_element_capacity == 0; }
98
99
1.37M
    Status add(const uint8_t* vals, size_t* count) override {
100
1.37M
        return add_internal<false>(vals, count);
101
1.37M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
99
664k
    Status add(const uint8_t* vals, size_t* count) override {
100
664k
        return add_internal<false>(vals, count);
101
664k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
50.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
50.3k
        return add_internal<false>(vals, count);
101
50.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
11.6k
    Status add(const uint8_t* vals, size_t* count) override {
100
11.6k
        return add_internal<false>(vals, count);
101
11.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
404k
    Status add(const uint8_t* vals, size_t* count) override {
100
404k
        return add_internal<false>(vals, count);
101
404k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
12.0k
    Status add(const uint8_t* vals, size_t* count) override {
100
12.0k
        return add_internal<false>(vals, count);
101
12.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
65.6k
    Status add(const uint8_t* vals, size_t* count) override {
100
65.6k
        return add_internal<false>(vals, count);
101
65.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
99
6.25k
    Status add(const uint8_t* vals, size_t* count) override {
100
6.25k
        return add_internal<false>(vals, count);
101
6.25k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
99
9.28k
    Status add(const uint8_t* vals, size_t* count) override {
100
9.28k
        return add_internal<false>(vals, count);
101
9.28k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
372
    Status add(const uint8_t* vals, size_t* count) override {
100
372
        return add_internal<false>(vals, count);
101
372
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
45.9k
    Status add(const uint8_t* vals, size_t* count) override {
100
45.9k
        return add_internal<false>(vals, count);
101
45.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
42.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
42.3k
        return add_internal<false>(vals, count);
101
42.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
99
515
    Status add(const uint8_t* vals, size_t* count) override {
100
515
        return add_internal<false>(vals, count);
101
515
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
Line
Count
Source
99
7.65k
    Status add(const uint8_t* vals, size_t* count) override {
100
7.65k
        return add_internal<false>(vals, count);
101
7.65k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
260
    Status add(const uint8_t* vals, size_t* count) override {
100
260
        return add_internal<false>(vals, count);
101
260
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
99
5.20k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.20k
        return add_internal<false>(vals, count);
101
5.20k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
26.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
26.3k
        return add_internal<false>(vals, count);
101
26.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
99
17.8k
    Status add(const uint8_t* vals, size_t* count) override {
100
17.8k
        return add_internal<false>(vals, count);
101
17.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Line
Count
Source
99
1.40k
    Status add(const uint8_t* vals, size_t* count) override {
100
1.40k
        return add_internal<false>(vals, count);
101
1.40k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Line
Count
Source
99
634
    Status add(const uint8_t* vals, size_t* count) override {
100
634
        return add_internal<false>(vals, count);
101
634
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
99
647
    Status add(const uint8_t* vals, size_t* count) override {
100
647
        return add_internal<false>(vals, count);
101
647
    }
102
103
142M
    Status single_add(const uint8_t* vals, size_t* count) {
104
142M
        return add_internal<true>(vals, count);
105
142M
    }
106
107
    template <bool single>
108
140M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
140M
        DCHECK(!_finished);
110
140M
        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
140M
        uint32_t to_add = cast_set<UInt32>(
126
140M
                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
140M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
140M
        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
140M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
144M
        _count += to_add;
134
144M
        _remain_element_capacity -= to_add;
135
144M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
144M
        *num_written = to_add;
138
144M
        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
142M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
142M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
142M
                        *reinterpret_cast<const uint32_t*>(vals);
149
142M
                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
142M
        }
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
144M
        return Status::OK();
159
140M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
664k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
664k
        DCHECK(!_finished);
110
664k
        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
664k
        uint32_t to_add = cast_set<UInt32>(
126
664k
                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
664k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
664k
        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
664k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
664k
        _count += to_add;
134
664k
        _remain_element_capacity -= to_add;
135
664k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
664k
        *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
664k
        memcpy(&_data[orig_size], vals, to_add_size);
158
664k
        return Status::OK();
159
664k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
138M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
138M
        DCHECK(!_finished);
110
138M
        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
138M
        uint32_t to_add = cast_set<UInt32>(
126
138M
                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
138M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
138M
        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
138M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
142M
        _count += to_add;
134
142M
        _remain_element_capacity -= to_add;
135
142M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
142M
        *num_written = to_add;
138
142M
        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
142M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
142M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
142M
                        *reinterpret_cast<const uint32_t*>(vals);
149
142M
                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
142M
        }
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
142M
        return Status::OK();
159
138M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
50.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
50.3k
        DCHECK(!_finished);
110
50.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
50.3k
        uint32_t to_add = cast_set<UInt32>(
126
50.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
50.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
50.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
50.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
50.3k
        _count += to_add;
134
50.3k
        _remain_element_capacity -= to_add;
135
50.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
50.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
50.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
50.3k
        return Status::OK();
159
50.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
11.6k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
11.6k
        DCHECK(!_finished);
110
11.6k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
11.6k
        uint32_t to_add = cast_set<UInt32>(
126
11.6k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
11.6k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
11.6k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
11.6k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
11.6k
        _count += to_add;
134
11.6k
        _remain_element_capacity -= to_add;
135
11.6k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
11.6k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
11.6k
        memcpy(&_data[orig_size], vals, to_add_size);
158
11.6k
        return Status::OK();
159
11.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
404k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
404k
        DCHECK(!_finished);
110
404k
        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
404k
        uint32_t to_add = cast_set<UInt32>(
126
404k
                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
404k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
404k
        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
404k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
404k
        _count += to_add;
134
404k
        _remain_element_capacity -= to_add;
135
404k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
404k
        *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
404k
        memcpy(&_data[orig_size], vals, to_add_size);
158
404k
        return Status::OK();
159
404k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
12.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
12.0k
        DCHECK(!_finished);
110
12.0k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
12.0k
        uint32_t to_add = cast_set<UInt32>(
126
12.0k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
12.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
12.0k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
12.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
12.0k
        _count += to_add;
134
12.0k
        _remain_element_capacity -= to_add;
135
12.0k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
12.0k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
12.0k
        memcpy(&_data[orig_size], vals, to_add_size);
158
12.0k
        return Status::OK();
159
12.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
65.6k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
65.6k
        DCHECK(!_finished);
110
65.6k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
65.6k
        uint32_t to_add = cast_set<UInt32>(
126
65.6k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
65.6k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
65.6k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
65.6k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
65.6k
        _count += to_add;
134
65.6k
        _remain_element_capacity -= to_add;
135
65.6k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
65.6k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
65.6k
        memcpy(&_data[orig_size], vals, to_add_size);
158
65.6k
        return Status::OK();
159
65.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
6.25k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
6.25k
        DCHECK(!_finished);
110
6.25k
        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
6.25k
        uint32_t to_add = cast_set<UInt32>(
126
6.25k
                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
6.25k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
6.25k
        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
6.25k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
6.25k
        _count += to_add;
134
6.25k
        _remain_element_capacity -= to_add;
135
6.25k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
6.25k
        *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
6.25k
        memcpy(&_data[orig_size], vals, to_add_size);
158
6.25k
        return Status::OK();
159
6.25k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
9.28k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
9.28k
        DCHECK(!_finished);
110
9.28k
        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
9.28k
        uint32_t to_add = cast_set<UInt32>(
126
9.28k
                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
9.28k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
9.28k
        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
9.28k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
9.28k
        _count += to_add;
134
9.28k
        _remain_element_capacity -= to_add;
135
9.28k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
9.28k
        *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
9.28k
        memcpy(&_data[orig_size], vals, to_add_size);
158
9.28k
        return Status::OK();
159
9.28k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
372
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
372
        DCHECK(!_finished);
110
372
        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
372
        uint32_t to_add = cast_set<UInt32>(
126
372
                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
372
        int to_add_size = to_add * SIZE_OF_TYPE;
129
372
        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
372
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
372
        _count += to_add;
134
372
        _remain_element_capacity -= to_add;
135
372
        _raw_data_size += to_add_size;
136
        // return added number through count
137
372
        *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
372
        memcpy(&_data[orig_size], vals, to_add_size);
158
372
        return Status::OK();
159
372
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
45.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
45.9k
        DCHECK(!_finished);
110
45.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
45.9k
        uint32_t to_add = cast_set<UInt32>(
126
45.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
45.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
45.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
45.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
45.9k
        _count += to_add;
134
45.9k
        _remain_element_capacity -= to_add;
135
45.9k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
45.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
45.9k
        memcpy(&_data[orig_size], vals, to_add_size);
158
45.9k
        return Status::OK();
159
45.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
42.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
42.3k
        DCHECK(!_finished);
110
42.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
42.3k
        uint32_t to_add = cast_set<UInt32>(
126
42.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
42.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
42.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
42.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
42.3k
        _count += to_add;
134
42.3k
        _remain_element_capacity -= to_add;
135
42.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
42.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
42.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
42.3k
        return Status::OK();
159
42.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
515
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
515
        DCHECK(!_finished);
110
515
        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
515
        uint32_t to_add = cast_set<UInt32>(
126
515
                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
515
        int to_add_size = to_add * SIZE_OF_TYPE;
129
515
        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
515
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
515
        _count += to_add;
134
515
        _remain_element_capacity -= to_add;
135
515
        _raw_data_size += to_add_size;
136
        // return added number through count
137
515
        *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
515
        memcpy(&_data[orig_size], vals, to_add_size);
158
515
        return Status::OK();
159
515
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
7.64k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
7.64k
        DCHECK(!_finished);
110
7.64k
        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.64k
        uint32_t to_add = cast_set<UInt32>(
126
7.64k
                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.64k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
7.64k
        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.64k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
7.66k
        _count += to_add;
134
7.66k
        _remain_element_capacity -= to_add;
135
7.66k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
7.66k
        *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.66k
        memcpy(&_data[orig_size], vals, to_add_size);
158
7.66k
        return Status::OK();
159
7.64k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
260
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
260
        DCHECK(!_finished);
110
260
        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
260
        uint32_t to_add = cast_set<UInt32>(
126
260
                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
260
        int to_add_size = to_add * SIZE_OF_TYPE;
129
260
        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
260
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
260
        _count += to_add;
134
260
        _remain_element_capacity -= to_add;
135
260
        _raw_data_size += to_add_size;
136
        // return added number through count
137
260
        *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
260
        memcpy(&_data[orig_size], vals, to_add_size);
158
260
        return Status::OK();
159
260
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
5.20k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.20k
        DCHECK(!_finished);
110
5.20k
        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.20k
        uint32_t to_add = cast_set<UInt32>(
126
5.20k
                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.20k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.20k
        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.20k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.20k
        _count += to_add;
134
5.20k
        _remain_element_capacity -= to_add;
135
5.20k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.20k
        *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.20k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.20k
        return Status::OK();
159
5.20k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
26.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
26.3k
        DCHECK(!_finished);
110
26.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
26.3k
        uint32_t to_add = cast_set<UInt32>(
126
26.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
26.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
26.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
26.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
26.3k
        _count += to_add;
134
26.3k
        _remain_element_capacity -= to_add;
135
26.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
26.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
26.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
26.3k
        return Status::OK();
159
26.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
17.8k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
17.8k
        DCHECK(!_finished);
110
17.8k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
17.8k
        uint32_t to_add = cast_set<UInt32>(
126
17.8k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
17.8k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
17.8k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
17.8k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
17.8k
        _count += to_add;
134
17.8k
        _remain_element_capacity -= to_add;
135
17.8k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
17.8k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
17.8k
        memcpy(&_data[orig_size], vals, to_add_size);
158
17.8k
        return Status::OK();
159
17.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
1.40k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
1.40k
        DCHECK(!_finished);
110
1.40k
        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.40k
        uint32_t to_add = cast_set<UInt32>(
126
1.40k
                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.40k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
1.40k
        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.40k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
1.40k
        _count += to_add;
134
1.40k
        _remain_element_capacity -= to_add;
135
1.40k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
1.40k
        *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.40k
        memcpy(&_data[orig_size], vals, to_add_size);
158
1.40k
        return Status::OK();
159
1.40k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
634
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
634
        DCHECK(!_finished);
110
634
        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
634
        uint32_t to_add = cast_set<UInt32>(
126
634
                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
634
        int to_add_size = to_add * SIZE_OF_TYPE;
129
634
        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
634
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
634
        _count += to_add;
134
634
        _remain_element_capacity -= to_add;
135
634
        _raw_data_size += to_add_size;
136
        // return added number through count
137
634
        *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
634
        memcpy(&_data[orig_size], vals, to_add_size);
158
634
        return Status::OK();
159
634
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
647
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
647
        DCHECK(!_finished);
110
647
        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
647
        uint32_t to_add = cast_set<UInt32>(
126
647
                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
647
        int to_add_size = to_add * SIZE_OF_TYPE;
129
647
        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
647
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
647
        _count += to_add;
134
647
        _remain_element_capacity -= to_add;
135
647
        _raw_data_size += to_add_size;
136
        // return added number through count
137
647
        *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
647
        memcpy(&_data[orig_size], vals, to_add_size);
158
647
        return Status::OK();
159
647
    }
160
161
645k
    Status finish(OwnedSlice* slice) override {
162
645k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
645k
        return Status::OK();
164
645k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
325k
    Status finish(OwnedSlice* slice) override {
162
325k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
326k
        return Status::OK();
164
325k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
40.4k
    Status finish(OwnedSlice* slice) override {
162
40.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
40.4k
        return Status::OK();
164
40.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
8.60k
    Status finish(OwnedSlice* slice) override {
162
8.60k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
8.60k
        return Status::OK();
164
8.60k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
42.4k
    Status finish(OwnedSlice* slice) override {
162
42.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
42.4k
        return Status::OK();
164
42.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
11.9k
    Status finish(OwnedSlice* slice) override {
162
11.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
11.9k
        return Status::OK();
164
11.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
65.2k
    Status finish(OwnedSlice* slice) override {
162
65.2k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
65.2k
        return Status::OK();
164
65.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
5.89k
    Status finish(OwnedSlice* slice) override {
162
5.89k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
5.89k
        return Status::OK();
164
5.89k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7.32k
    Status finish(OwnedSlice* slice) override {
162
7.32k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.33k
        return Status::OK();
164
7.32k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
367
    Status finish(OwnedSlice* slice) override {
162
367
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
367
        return Status::OK();
164
367
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
38.4k
    Status finish(OwnedSlice* slice) override {
162
38.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
38.4k
        return Status::OK();
164
38.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
41.5k
    Status finish(OwnedSlice* slice) override {
162
41.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
41.5k
        return Status::OK();
164
41.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
605
    Status finish(OwnedSlice* slice) override {
162
605
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
605
        return Status::OK();
164
605
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7.74k
    Status finish(OwnedSlice* slice) override {
162
7.74k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.75k
        return Status::OK();
164
7.74k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
262
    Status finish(OwnedSlice* slice) override {
162
262
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
262
        return Status::OK();
164
262
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
9.73k
    Status finish(OwnedSlice* slice) override {
162
9.73k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
9.74k
        return Status::OK();
164
9.73k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
19.3k
    Status finish(OwnedSlice* slice) override {
162
19.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
19.3k
        return Status::OK();
164
19.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
17.0k
    Status finish(OwnedSlice* slice) override {
162
17.0k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
17.0k
        return Status::OK();
164
17.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
1.13k
    Status finish(OwnedSlice* slice) override {
162
1.13k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
1.13k
        return Status::OK();
164
1.13k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
639
    Status finish(OwnedSlice* slice) override {
162
639
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
640
        return Status::OK();
164
639
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
637
    Status finish(OwnedSlice* slice) override {
162
637
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
637
        return Status::OK();
164
637
    }
165
166
1.58M
    Status reset() override {
167
1.58M
        RETURN_IF_CATCH_EXCEPTION({
168
1.58M
            size_t block_size = _options.data_page_size;
169
1.58M
            _count = 0;
170
1.58M
            _raw_data_size = 0;
171
1.58M
            _data.clear();
172
1.58M
            _data.reserve(block_size);
173
1.58M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.58M
                    << "buffer must be naturally-aligned";
175
1.58M
            _buffer.clear();
176
1.58M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.58M
            _finished = false;
178
1.58M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.58M
        });
180
1.58M
        return Status::OK();
181
1.58M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
166
949k
    Status reset() override {
167
949k
        RETURN_IF_CATCH_EXCEPTION({
168
949k
            size_t block_size = _options.data_page_size;
169
949k
            _count = 0;
170
949k
            _raw_data_size = 0;
171
949k
            _data.clear();
172
949k
            _data.reserve(block_size);
173
949k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
949k
                    << "buffer must be naturally-aligned";
175
949k
            _buffer.clear();
176
949k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
949k
            _finished = false;
178
949k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
949k
        });
180
951k
        return Status::OK();
181
949k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
81.3k
    Status reset() override {
167
81.3k
        RETURN_IF_CATCH_EXCEPTION({
168
81.3k
            size_t block_size = _options.data_page_size;
169
81.3k
            _count = 0;
170
81.3k
            _raw_data_size = 0;
171
81.3k
            _data.clear();
172
81.3k
            _data.reserve(block_size);
173
81.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
81.3k
                    << "buffer must be naturally-aligned";
175
81.3k
            _buffer.clear();
176
81.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
81.3k
            _finished = false;
178
81.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
81.3k
        });
180
81.3k
        return Status::OK();
181
81.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
166
17.6k
    Status reset() override {
167
17.6k
        RETURN_IF_CATCH_EXCEPTION({
168
17.6k
            size_t block_size = _options.data_page_size;
169
17.6k
            _count = 0;
170
17.6k
            _raw_data_size = 0;
171
17.6k
            _data.clear();
172
17.6k
            _data.reserve(block_size);
173
17.6k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
17.6k
                    << "buffer must be naturally-aligned";
175
17.6k
            _buffer.clear();
176
17.6k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
17.6k
            _finished = false;
178
17.6k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
17.6k
        });
180
17.6k
        return Status::OK();
181
17.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
83.6k
    Status reset() override {
167
83.6k
        RETURN_IF_CATCH_EXCEPTION({
168
83.6k
            size_t block_size = _options.data_page_size;
169
83.6k
            _count = 0;
170
83.6k
            _raw_data_size = 0;
171
83.6k
            _data.clear();
172
83.6k
            _data.reserve(block_size);
173
83.6k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
83.6k
                    << "buffer must be naturally-aligned";
175
83.6k
            _buffer.clear();
176
83.6k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
83.6k
            _finished = false;
178
83.6k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
83.6k
        });
180
83.9k
        return Status::OK();
181
83.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
166
24.1k
    Status reset() override {
167
24.1k
        RETURN_IF_CATCH_EXCEPTION({
168
24.1k
            size_t block_size = _options.data_page_size;
169
24.1k
            _count = 0;
170
24.1k
            _raw_data_size = 0;
171
24.1k
            _data.clear();
172
24.1k
            _data.reserve(block_size);
173
24.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
24.1k
                    << "buffer must be naturally-aligned";
175
24.1k
            _buffer.clear();
176
24.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
24.1k
            _finished = false;
178
24.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
24.1k
        });
180
24.1k
        return Status::OK();
181
24.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
166
130k
    Status reset() override {
167
130k
        RETURN_IF_CATCH_EXCEPTION({
168
130k
            size_t block_size = _options.data_page_size;
169
130k
            _count = 0;
170
130k
            _raw_data_size = 0;
171
130k
            _data.clear();
172
130k
            _data.reserve(block_size);
173
130k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
130k
                    << "buffer must be naturally-aligned";
175
130k
            _buffer.clear();
176
130k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
130k
            _finished = false;
178
130k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
130k
        });
180
131k
        return Status::OK();
181
130k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
Line
Count
Source
166
1
    Status reset() override {
167
1
        RETURN_IF_CATCH_EXCEPTION({
168
1
            size_t block_size = _options.data_page_size;
169
1
            _count = 0;
170
1
            _raw_data_size = 0;
171
1
            _data.clear();
172
1
            _data.reserve(block_size);
173
1
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1
                    << "buffer must be naturally-aligned";
175
1
            _buffer.clear();
176
1
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1
            _finished = false;
178
1
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1
        });
180
1
        return Status::OK();
181
1
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
166
12.1k
    Status reset() override {
167
12.1k
        RETURN_IF_CATCH_EXCEPTION({
168
12.1k
            size_t block_size = _options.data_page_size;
169
12.1k
            _count = 0;
170
12.1k
            _raw_data_size = 0;
171
12.1k
            _data.clear();
172
12.1k
            _data.reserve(block_size);
173
12.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
12.1k
                    << "buffer must be naturally-aligned";
175
12.1k
            _buffer.clear();
176
12.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
12.1k
            _finished = false;
178
12.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
12.1k
        });
180
12.1k
        return Status::OK();
181
12.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
166
14.8k
    Status reset() override {
167
14.8k
        RETURN_IF_CATCH_EXCEPTION({
168
14.8k
            size_t block_size = _options.data_page_size;
169
14.8k
            _count = 0;
170
14.8k
            _raw_data_size = 0;
171
14.8k
            _data.clear();
172
14.8k
            _data.reserve(block_size);
173
14.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
14.8k
                    << "buffer must be naturally-aligned";
175
14.8k
            _buffer.clear();
176
14.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
14.8k
            _finished = false;
178
14.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
14.8k
        });
180
14.8k
        return Status::OK();
181
14.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
166
723
    Status reset() override {
167
723
        RETURN_IF_CATCH_EXCEPTION({
168
723
            size_t block_size = _options.data_page_size;
169
723
            _count = 0;
170
723
            _raw_data_size = 0;
171
723
            _data.clear();
172
723
            _data.reserve(block_size);
173
723
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
723
                    << "buffer must be naturally-aligned";
175
723
            _buffer.clear();
176
723
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
723
            _finished = false;
178
723
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
723
        });
180
723
        return Status::OK();
181
723
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
166
76.0k
    Status reset() override {
167
76.0k
        RETURN_IF_CATCH_EXCEPTION({
168
76.0k
            size_t block_size = _options.data_page_size;
169
76.0k
            _count = 0;
170
76.0k
            _raw_data_size = 0;
171
76.0k
            _data.clear();
172
76.0k
            _data.reserve(block_size);
173
76.0k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
76.0k
                    << "buffer must be naturally-aligned";
175
76.0k
            _buffer.clear();
176
76.0k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
76.0k
            _finished = false;
178
76.0k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
76.0k
        });
180
76.0k
        return Status::OK();
181
76.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
166
84.2k
    Status reset() override {
167
84.2k
        RETURN_IF_CATCH_EXCEPTION({
168
84.2k
            size_t block_size = _options.data_page_size;
169
84.2k
            _count = 0;
170
84.2k
            _raw_data_size = 0;
171
84.2k
            _data.clear();
172
84.2k
            _data.reserve(block_size);
173
84.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
84.2k
                    << "buffer must be naturally-aligned";
175
84.2k
            _buffer.clear();
176
84.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
84.2k
            _finished = false;
178
84.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
84.2k
        });
180
84.2k
        return Status::OK();
181
84.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
166
1.05k
    Status reset() override {
167
1.05k
        RETURN_IF_CATCH_EXCEPTION({
168
1.05k
            size_t block_size = _options.data_page_size;
169
1.05k
            _count = 0;
170
1.05k
            _raw_data_size = 0;
171
1.05k
            _data.clear();
172
1.05k
            _data.reserve(block_size);
173
1.05k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.05k
                    << "buffer must be naturally-aligned";
175
1.05k
            _buffer.clear();
176
1.05k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.05k
            _finished = false;
178
1.05k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.05k
        });
180
1.05k
        return Status::OK();
181
1.05k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
Line
Count
Source
166
15.1k
    Status reset() override {
167
15.1k
        RETURN_IF_CATCH_EXCEPTION({
168
15.1k
            size_t block_size = _options.data_page_size;
169
15.1k
            _count = 0;
170
15.1k
            _raw_data_size = 0;
171
15.1k
            _data.clear();
172
15.1k
            _data.reserve(block_size);
173
15.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
15.1k
                    << "buffer must be naturally-aligned";
175
15.1k
            _buffer.clear();
176
15.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
15.1k
            _finished = false;
178
15.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
15.1k
        });
180
15.5k
        return Status::OK();
181
15.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
166
613
    Status reset() override {
167
613
        RETURN_IF_CATCH_EXCEPTION({
168
613
            size_t block_size = _options.data_page_size;
169
613
            _count = 0;
170
613
            _raw_data_size = 0;
171
613
            _data.clear();
172
613
            _data.reserve(block_size);
173
613
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
613
                    << "buffer must be naturally-aligned";
175
613
            _buffer.clear();
176
613
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
613
            _finished = false;
178
613
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
613
        });
180
613
        return Status::OK();
181
613
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
166
19.4k
    Status reset() override {
167
19.4k
        RETURN_IF_CATCH_EXCEPTION({
168
19.4k
            size_t block_size = _options.data_page_size;
169
19.4k
            _count = 0;
170
19.4k
            _raw_data_size = 0;
171
19.4k
            _data.clear();
172
19.4k
            _data.reserve(block_size);
173
19.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
19.4k
                    << "buffer must be naturally-aligned";
175
19.4k
            _buffer.clear();
176
19.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
19.4k
            _finished = false;
178
19.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
19.4k
        });
180
19.4k
        return Status::OK();
181
19.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
31.3k
    Status reset() override {
167
31.3k
        RETURN_IF_CATCH_EXCEPTION({
168
31.3k
            size_t block_size = _options.data_page_size;
169
31.3k
            _count = 0;
170
31.3k
            _raw_data_size = 0;
171
31.3k
            _data.clear();
172
31.3k
            _data.reserve(block_size);
173
31.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
31.3k
                    << "buffer must be naturally-aligned";
175
31.3k
            _buffer.clear();
176
31.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
31.3k
            _finished = false;
178
31.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
31.3k
        });
180
31.3k
        return Status::OK();
181
31.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
166
33.9k
    Status reset() override {
167
33.9k
        RETURN_IF_CATCH_EXCEPTION({
168
33.9k
            size_t block_size = _options.data_page_size;
169
33.9k
            _count = 0;
170
33.9k
            _raw_data_size = 0;
171
33.9k
            _data.clear();
172
33.9k
            _data.reserve(block_size);
173
33.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
33.9k
                    << "buffer must be naturally-aligned";
175
33.9k
            _buffer.clear();
176
33.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
33.9k
            _finished = false;
178
33.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
33.9k
        });
180
34.0k
        return Status::OK();
181
33.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Line
Count
Source
166
2.35k
    Status reset() override {
167
2.35k
        RETURN_IF_CATCH_EXCEPTION({
168
2.35k
            size_t block_size = _options.data_page_size;
169
2.35k
            _count = 0;
170
2.35k
            _raw_data_size = 0;
171
2.35k
            _data.clear();
172
2.35k
            _data.reserve(block_size);
173
2.35k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
2.35k
                    << "buffer must be naturally-aligned";
175
2.35k
            _buffer.clear();
176
2.35k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
2.35k
            _finished = false;
178
2.35k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
2.35k
        });
180
2.36k
        return Status::OK();
181
2.35k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Line
Count
Source
166
1.37k
    Status reset() override {
167
1.37k
        RETURN_IF_CATCH_EXCEPTION({
168
1.37k
            size_t block_size = _options.data_page_size;
169
1.37k
            _count = 0;
170
1.37k
            _raw_data_size = 0;
171
1.37k
            _data.clear();
172
1.37k
            _data.reserve(block_size);
173
1.37k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.37k
                    << "buffer must be naturally-aligned";
175
1.37k
            _buffer.clear();
176
1.37k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.37k
            _finished = false;
178
1.37k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.37k
        });
180
1.37k
        return Status::OK();
181
1.37k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
166
1.36k
    Status reset() override {
167
1.36k
        RETURN_IF_CATCH_EXCEPTION({
168
1.36k
            size_t block_size = _options.data_page_size;
169
1.36k
            _count = 0;
170
1.36k
            _raw_data_size = 0;
171
1.36k
            _data.clear();
172
1.36k
            _data.reserve(block_size);
173
1.36k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.36k
                    << "buffer must be naturally-aligned";
175
1.36k
            _buffer.clear();
176
1.36k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.36k
            _finished = false;
178
1.36k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.36k
        });
180
1.36k
        return Status::OK();
181
1.36k
    }
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
33.5k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
18.0k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
185
3.34k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
185
878
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
2.39k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
1.36k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
769
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
382
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
185
403
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4sizeEv
Line
Count
Source
185
56
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4sizeEv
Line
Count
Source
185
1.61k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
2.18k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4sizeEv
Line
Count
Source
185
63
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4sizeEv
Line
Count
Source
185
56
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4sizeEv
Line
Count
Source
185
52
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4sizeEv
Line
Count
Source
185
205
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
185
341
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
185
1.16k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4sizeEv
Line
Count
Source
185
54
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4sizeEv
Line
Count
Source
185
76
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4sizeEv
Line
Count
Source
185
60
    uint64_t size() const override { return _buffer.size(); }
186
187
376k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
57.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
40.4k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
8.60k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
42.4k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
187
11.9k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
65.2k
    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
5.89k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
7.33k
    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
367
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
187
38.4k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
187
41.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
187
605
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
Line
Count
Source
187
7.75k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
187
262
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
187
9.74k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
19.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
187
17.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE17get_raw_data_sizeEv
Line
Count
Source
187
1.13k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Line
Count
Source
187
640
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
187
637
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
653k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
340k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
40.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.03k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
41.3k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
12.1k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
65.6k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
6.29k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
7.56k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
356
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
37.5k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
42.6k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
452
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
7.48k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
351
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.74k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
12.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
16.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1.22k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
731
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
728
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
192
193
645k
    OwnedSlice _finish(int final_size_of_type) {
194
645k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
645k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
645k
        int padding_elems = num_elems_after_padding - _count;
199
645k
        int padding_bytes = padding_elems * final_size_of_type;
200
17.4M
        for (int i = 0; i < padding_bytes; i++) {
201
16.8M
            _data.push_back(0);
202
16.8M
        }
203
204
        // reserve enough place for compression
205
645k
        _buffer.resize(
206
645k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
645k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
645k
        int64_t bytes =
210
645k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
645k
                                         num_elems_after_padding, final_size_of_type, 0);
212
645k
        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
645k
        encode_fixed32_le(&_buffer[0], _count);
222
645k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
645k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
645k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
645k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
645k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
645k
        return _buffer.build();
229
645k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
325k
    OwnedSlice _finish(int final_size_of_type) {
194
325k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
325k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
325k
        int padding_elems = num_elems_after_padding - _count;
199
325k
        int padding_bytes = padding_elems * final_size_of_type;
200
6.23M
        for (int i = 0; i < padding_bytes; i++) {
201
5.90M
            _data.push_back(0);
202
5.90M
        }
203
204
        // reserve enough place for compression
205
325k
        _buffer.resize(
206
325k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
325k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
325k
        int64_t bytes =
210
325k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
325k
                                         num_elems_after_padding, final_size_of_type, 0);
212
325k
        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
325k
        encode_fixed32_le(&_buffer[0], _count);
222
325k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
325k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
325k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
325k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
325k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
325k
        return _buffer.build();
229
325k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
40.4k
    OwnedSlice _finish(int final_size_of_type) {
194
40.4k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
40.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
40.4k
        int padding_elems = num_elems_after_padding - _count;
199
40.4k
        int padding_bytes = padding_elems * final_size_of_type;
200
243k
        for (int i = 0; i < padding_bytes; i++) {
201
203k
            _data.push_back(0);
202
203k
        }
203
204
        // reserve enough place for compression
205
40.4k
        _buffer.resize(
206
40.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
40.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
40.4k
        int64_t bytes =
210
40.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
40.4k
                                         num_elems_after_padding, final_size_of_type, 0);
212
40.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
40.4k
        encode_fixed32_le(&_buffer[0], _count);
222
40.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
40.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
40.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
40.4k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
40.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
40.4k
        return _buffer.build();
229
40.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
8.60k
    OwnedSlice _finish(int final_size_of_type) {
194
8.60k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
8.60k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
8.60k
        int padding_elems = num_elems_after_padding - _count;
199
8.60k
        int padding_bytes = padding_elems * final_size_of_type;
200
84.6k
        for (int i = 0; i < padding_bytes; i++) {
201
76.0k
            _data.push_back(0);
202
76.0k
        }
203
204
        // reserve enough place for compression
205
8.60k
        _buffer.resize(
206
8.60k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
8.60k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
8.60k
        int64_t bytes =
210
8.60k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
8.60k
                                         num_elems_after_padding, final_size_of_type, 0);
212
8.60k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
8.60k
        encode_fixed32_le(&_buffer[0], _count);
222
8.60k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
8.60k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
8.60k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
8.60k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
8.60k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
8.60k
        return _buffer.build();
229
8.60k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
42.4k
    OwnedSlice _finish(int final_size_of_type) {
194
42.4k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
42.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
42.4k
        int padding_elems = num_elems_after_padding - _count;
199
42.4k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.55M
        for (int i = 0; i < padding_bytes; i++) {
201
1.50M
            _data.push_back(0);
202
1.50M
        }
203
204
        // reserve enough place for compression
205
42.4k
        _buffer.resize(
206
42.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
42.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
42.4k
        int64_t bytes =
210
42.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
42.4k
                                         num_elems_after_padding, final_size_of_type, 0);
212
42.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
42.4k
        encode_fixed32_le(&_buffer[0], _count);
222
42.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
42.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
42.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
42.4k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
42.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
42.4k
        return _buffer.build();
229
42.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
11.9k
    OwnedSlice _finish(int final_size_of_type) {
194
11.9k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
11.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
11.9k
        int padding_elems = num_elems_after_padding - _count;
199
11.9k
        int padding_bytes = padding_elems * final_size_of_type;
200
772k
        for (int i = 0; i < padding_bytes; i++) {
201
760k
            _data.push_back(0);
202
760k
        }
203
204
        // reserve enough place for compression
205
11.9k
        _buffer.resize(
206
11.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
11.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
11.9k
        int64_t bytes =
210
11.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
11.9k
                                         num_elems_after_padding, final_size_of_type, 0);
212
11.9k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
11.9k
        encode_fixed32_le(&_buffer[0], _count);
222
11.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
11.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
11.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
11.9k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
11.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
11.9k
        return _buffer.build();
229
11.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
65.2k
    OwnedSlice _finish(int final_size_of_type) {
194
65.2k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
65.2k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
65.2k
        int padding_elems = num_elems_after_padding - _count;
199
65.2k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.17M
        for (int i = 0; i < padding_bytes; i++) {
201
3.11M
            _data.push_back(0);
202
3.11M
        }
203
204
        // reserve enough place for compression
205
65.2k
        _buffer.resize(
206
65.2k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
65.2k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
65.2k
        int64_t bytes =
210
65.2k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
65.2k
                                         num_elems_after_padding, final_size_of_type, 0);
212
65.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
65.2k
        encode_fixed32_le(&_buffer[0], _count);
222
65.2k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
65.2k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
65.2k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
65.2k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
65.2k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
65.2k
        return _buffer.build();
229
65.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
5.89k
    OwnedSlice _finish(int final_size_of_type) {
194
5.89k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
5.89k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
5.89k
        int padding_elems = num_elems_after_padding - _count;
199
5.89k
        int padding_bytes = padding_elems * final_size_of_type;
200
122k
        for (int i = 0; i < padding_bytes; i++) {
201
116k
            _data.push_back(0);
202
116k
        }
203
204
        // reserve enough place for compression
205
5.89k
        _buffer.resize(
206
5.89k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
5.89k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
5.89k
        int64_t bytes =
210
5.89k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
5.89k
                                         num_elems_after_padding, final_size_of_type, 0);
212
5.89k
        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
5.89k
        encode_fixed32_le(&_buffer[0], _count);
222
5.89k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
5.89k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
5.89k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
5.89k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
5.89k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
5.89k
        return _buffer.build();
229
5.89k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
7.33k
    OwnedSlice _finish(int final_size_of_type) {
194
7.33k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.33k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.33k
        int padding_elems = num_elems_after_padding - _count;
199
7.33k
        int padding_bytes = padding_elems * final_size_of_type;
200
297k
        for (int i = 0; i < padding_bytes; i++) {
201
289k
            _data.push_back(0);
202
289k
        }
203
204
        // reserve enough place for compression
205
7.33k
        _buffer.resize(
206
7.33k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.33k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.33k
        int64_t bytes =
210
7.33k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.33k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.33k
        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.33k
        encode_fixed32_le(&_buffer[0], _count);
222
7.33k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.33k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.33k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.33k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.33k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.33k
        return _buffer.build();
229
7.33k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
367
    OwnedSlice _finish(int final_size_of_type) {
194
367
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
367
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
367
        int padding_elems = num_elems_after_padding - _count;
199
367
        int padding_bytes = padding_elems * final_size_of_type;
200
5.51k
        for (int i = 0; i < padding_bytes; i++) {
201
5.14k
            _data.push_back(0);
202
5.14k
        }
203
204
        // reserve enough place for compression
205
367
        _buffer.resize(
206
367
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
367
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
367
        int64_t bytes =
210
367
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
367
                                         num_elems_after_padding, final_size_of_type, 0);
212
367
        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
367
        encode_fixed32_le(&_buffer[0], _count);
222
367
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
367
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
367
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
367
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
367
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
367
        return _buffer.build();
229
367
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
193
38.4k
    OwnedSlice _finish(int final_size_of_type) {
194
38.4k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
38.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
38.4k
        int padding_elems = num_elems_after_padding - _count;
199
38.4k
        int padding_bytes = padding_elems * final_size_of_type;
200
808k
        for (int i = 0; i < padding_bytes; i++) {
201
770k
            _data.push_back(0);
202
770k
        }
203
204
        // reserve enough place for compression
205
38.4k
        _buffer.resize(
206
38.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
38.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
38.4k
        int64_t bytes =
210
38.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
38.4k
                                         num_elems_after_padding, final_size_of_type, 0);
212
38.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
38.4k
        encode_fixed32_le(&_buffer[0], _count);
222
38.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
38.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
38.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
38.4k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
38.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
38.4k
        return _buffer.build();
229
38.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
193
41.5k
    OwnedSlice _finish(int final_size_of_type) {
194
41.5k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
41.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
41.5k
        int padding_elems = num_elems_after_padding - _count;
199
41.5k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.74M
        for (int i = 0; i < padding_bytes; i++) {
201
1.70M
            _data.push_back(0);
202
1.70M
        }
203
204
        // reserve enough place for compression
205
41.5k
        _buffer.resize(
206
41.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
41.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
41.5k
        int64_t bytes =
210
41.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
41.5k
                                         num_elems_after_padding, final_size_of_type, 0);
212
41.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
41.5k
        encode_fixed32_le(&_buffer[0], _count);
222
41.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
41.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
41.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
41.5k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
41.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
41.5k
        return _buffer.build();
229
41.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
193
605
    OwnedSlice _finish(int final_size_of_type) {
194
605
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
605
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
605
        int padding_elems = num_elems_after_padding - _count;
199
605
        int padding_bytes = padding_elems * final_size_of_type;
200
14.0k
        for (int i = 0; i < padding_bytes; i++) {
201
13.4k
            _data.push_back(0);
202
13.4k
        }
203
204
        // reserve enough place for compression
205
605
        _buffer.resize(
206
605
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
605
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
605
        int64_t bytes =
210
605
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
605
                                         num_elems_after_padding, final_size_of_type, 0);
212
605
        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
605
        encode_fixed32_le(&_buffer[0], _count);
222
605
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
605
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
605
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
605
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
605
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
605
        return _buffer.build();
229
605
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
Line
Count
Source
193
7.74k
    OwnedSlice _finish(int final_size_of_type) {
194
7.74k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.74k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.74k
        int padding_elems = num_elems_after_padding - _count;
199
7.74k
        int padding_bytes = padding_elems * final_size_of_type;
200
403k
        for (int i = 0; i < padding_bytes; i++) {
201
395k
            _data.push_back(0);
202
395k
        }
203
204
        // reserve enough place for compression
205
7.74k
        _buffer.resize(
206
7.74k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.74k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.74k
        int64_t bytes =
210
7.74k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.74k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.74k
        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.74k
        encode_fixed32_le(&_buffer[0], _count);
222
7.74k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.74k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.74k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.74k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.74k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.74k
        return _buffer.build();
229
7.74k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
193
262
    OwnedSlice _finish(int final_size_of_type) {
194
262
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
262
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
262
        int padding_elems = num_elems_after_padding - _count;
199
262
        int padding_bytes = padding_elems * final_size_of_type;
200
16.1k
        for (int i = 0; i < padding_bytes; i++) {
201
15.9k
            _data.push_back(0);
202
15.9k
        }
203
204
        // reserve enough place for compression
205
262
        _buffer.resize(
206
262
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
262
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
262
        int64_t bytes =
210
262
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
262
                                         num_elems_after_padding, final_size_of_type, 0);
212
262
        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
262
        encode_fixed32_le(&_buffer[0], _count);
222
262
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
262
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
262
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
262
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
262
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
262
        return _buffer.build();
229
262
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
193
9.73k
    OwnedSlice _finish(int final_size_of_type) {
194
9.73k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
9.73k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
9.73k
        int padding_elems = num_elems_after_padding - _count;
199
9.73k
        int padding_bytes = padding_elems * final_size_of_type;
200
117k
        for (int i = 0; i < padding_bytes; i++) {
201
108k
            _data.push_back(0);
202
108k
        }
203
204
        // reserve enough place for compression
205
9.73k
        _buffer.resize(
206
9.73k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
9.73k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
9.73k
        int64_t bytes =
210
9.73k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
9.73k
                                         num_elems_after_padding, final_size_of_type, 0);
212
9.73k
        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.73k
        encode_fixed32_le(&_buffer[0], _count);
222
9.73k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
9.73k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
9.73k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
9.73k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
9.73k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
9.73k
        return _buffer.build();
229
9.73k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
19.3k
    OwnedSlice _finish(int final_size_of_type) {
194
19.3k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
19.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
19.3k
        int padding_elems = num_elems_after_padding - _count;
199
19.3k
        int padding_bytes = padding_elems * final_size_of_type;
200
487k
        for (int i = 0; i < padding_bytes; i++) {
201
468k
            _data.push_back(0);
202
468k
        }
203
204
        // reserve enough place for compression
205
19.3k
        _buffer.resize(
206
19.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
19.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
19.3k
        int64_t bytes =
210
19.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
19.3k
                                         num_elems_after_padding, final_size_of_type, 0);
212
19.3k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
19.3k
        encode_fixed32_le(&_buffer[0], _count);
222
19.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
19.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
19.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
19.3k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
19.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
19.3k
        return _buffer.build();
229
19.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
193
17.0k
    OwnedSlice _finish(int final_size_of_type) {
194
17.0k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
17.0k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
17.0k
        int padding_elems = num_elems_after_padding - _count;
199
17.0k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.14M
        for (int i = 0; i < padding_bytes; i++) {
201
1.12M
            _data.push_back(0);
202
1.12M
        }
203
204
        // reserve enough place for compression
205
17.0k
        _buffer.resize(
206
17.0k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
17.0k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
17.0k
        int64_t bytes =
210
17.0k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
17.0k
                                         num_elems_after_padding, final_size_of_type, 0);
212
17.0k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
17.0k
        encode_fixed32_le(&_buffer[0], _count);
222
17.0k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
17.0k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
17.0k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
17.0k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
17.0k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
17.0k
        return _buffer.build();
229
17.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE7_finishEi
Line
Count
Source
193
1.13k
    OwnedSlice _finish(int final_size_of_type) {
194
1.13k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
1.13k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
1.13k
        int padding_elems = num_elems_after_padding - _count;
199
1.13k
        int padding_bytes = padding_elems * final_size_of_type;
200
176k
        for (int i = 0; i < padding_bytes; i++) {
201
175k
            _data.push_back(0);
202
175k
        }
203
204
        // reserve enough place for compression
205
1.13k
        _buffer.resize(
206
1.13k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
1.13k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
1.13k
        int64_t bytes =
210
1.13k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
1.13k
                                         num_elems_after_padding, final_size_of_type, 0);
212
1.13k
        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.13k
        encode_fixed32_le(&_buffer[0], _count);
222
1.13k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
1.13k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
1.13k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
1.13k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
1.13k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
1.13k
        return _buffer.build();
229
1.13k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Line
Count
Source
193
640
    OwnedSlice _finish(int final_size_of_type) {
194
640
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
640
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
640
        int padding_elems = num_elems_after_padding - _count;
199
640
        int padding_bytes = padding_elems * final_size_of_type;
200
13.1k
        for (int i = 0; i < padding_bytes; i++) {
201
12.4k
            _data.push_back(0);
202
12.4k
        }
203
204
        // reserve enough place for compression
205
640
        _buffer.resize(
206
640
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
640
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
640
        int64_t bytes =
210
640
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
640
                                         num_elems_after_padding, final_size_of_type, 0);
212
640
        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
640
        encode_fixed32_le(&_buffer[0], _count);
222
640
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
640
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
640
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
640
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
640
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
640
        return _buffer.build();
229
640
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
193
637
    OwnedSlice _finish(int final_size_of_type) {
194
637
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
637
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
637
        int padding_elems = num_elems_after_padding - _count;
199
637
        int padding_bytes = padding_elems * final_size_of_type;
200
52.0k
        for (int i = 0; i < padding_bytes; i++) {
201
51.4k
            _data.push_back(0);
202
51.4k
        }
203
204
        // reserve enough place for compression
205
637
        _buffer.resize(
206
637
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
637
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
637
        int64_t bytes =
210
637
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
637
                                         num_elems_after_padding, final_size_of_type, 0);
212
637
        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
637
        encode_fixed32_le(&_buffer[0], _count);
222
637
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
637
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
637
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
637
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
637
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
637
        return _buffer.build();
229
637
    }
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.02M
                                       int& size_of_element) {
253
2.02M
    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.02M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
2.02M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
2.02M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
2.02M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
2.02M
    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.02M
    switch (size_of_element) {
271
149k
    case 1:
272
181k
    case 2:
273
184k
    case 3:
274
1.39M
    case 4:
275
1.93M
    case 8:
276
1.94M
    case 12:
277
2.02M
    case 16:
278
2.03M
    case 32:
279
2.03M
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
2.02M
    }
283
2.03M
    return Status::OK();
284
2.02M
}
285
286
template <FieldType Type>
287
class BitShufflePageDecoder : public PageDecoder {
288
public:
289
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
290
1.01M
            : _data(data),
291
1.01M
              _options(options),
292
1.01M
              _parsed(false),
293
1.01M
              _num_elements(0),
294
1.01M
              _num_element_after_padding(0),
295
1.01M
              _size_of_element(0),
296
1.01M
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
519k
            : _data(data),
291
519k
              _options(options),
292
519k
              _parsed(false),
293
519k
              _num_elements(0),
294
519k
              _num_element_after_padding(0),
295
519k
              _size_of_element(0),
296
519k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
74.5k
            : _data(data),
291
74.5k
              _options(options),
292
74.5k
              _parsed(false),
293
74.5k
              _num_elements(0),
294
74.5k
              _num_element_after_padding(0),
295
74.5k
              _size_of_element(0),
296
74.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
16.1k
            : _data(data),
291
16.1k
              _options(options),
292
16.1k
              _parsed(false),
293
16.1k
              _num_elements(0),
294
16.1k
              _num_element_after_padding(0),
295
16.1k
              _size_of_element(0),
296
16.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
50.7k
            : _data(data),
291
50.7k
              _options(options),
292
50.7k
              _parsed(false),
293
50.7k
              _num_elements(0),
294
50.7k
              _num_element_after_padding(0),
295
50.7k
              _size_of_element(0),
296
50.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
13.3k
            : _data(data),
291
13.3k
              _options(options),
292
13.3k
              _parsed(false),
293
13.3k
              _num_elements(0),
294
13.3k
              _num_element_after_padding(0),
295
13.3k
              _size_of_element(0),
296
13.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
86.2k
            : _data(data),
291
86.2k
              _options(options),
292
86.2k
              _parsed(false),
293
86.2k
              _num_elements(0),
294
86.2k
              _num_element_after_padding(0),
295
86.2k
              _size_of_element(0),
296
86.2k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
9.15k
            : _data(data),
291
9.15k
              _options(options),
292
9.15k
              _parsed(false),
293
9.15k
              _num_elements(0),
294
9.15k
              _num_element_after_padding(0),
295
9.15k
              _size_of_element(0),
296
9.15k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
10.7k
            : _data(data),
291
10.7k
              _options(options),
292
10.7k
              _parsed(false),
293
10.7k
              _num_elements(0),
294
10.7k
              _num_element_after_padding(0),
295
10.7k
              _size_of_element(0),
296
10.7k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.73k
            : _data(data),
291
1.73k
              _options(options),
292
1.73k
              _parsed(false),
293
1.73k
              _num_elements(0),
294
1.73k
              _num_element_after_padding(0),
295
1.73k
              _size_of_element(0),
296
1.73k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
59.3k
            : _data(data),
291
59.3k
              _options(options),
292
59.3k
              _parsed(false),
293
59.3k
              _num_elements(0),
294
59.3k
              _num_element_after_padding(0),
295
59.3k
              _size_of_element(0),
296
59.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
64.8k
            : _data(data),
291
64.8k
              _options(options),
292
64.8k
              _parsed(false),
293
64.8k
              _num_elements(0),
294
64.8k
              _num_element_after_padding(0),
295
64.8k
              _size_of_element(0),
296
64.8k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
2.25k
            : _data(data),
291
2.25k
              _options(options),
292
2.25k
              _parsed(false),
293
2.25k
              _num_elements(0),
294
2.25k
              _num_element_after_padding(0),
295
2.25k
              _size_of_element(0),
296
2.25k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
15.7k
            : _data(data),
291
15.7k
              _options(options),
292
15.7k
              _parsed(false),
293
15.7k
              _num_elements(0),
294
15.7k
              _num_element_after_padding(0),
295
15.7k
              _size_of_element(0),
296
15.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.38k
            : _data(data),
291
1.38k
              _options(options),
292
1.38k
              _parsed(false),
293
1.38k
              _num_elements(0),
294
1.38k
              _num_element_after_padding(0),
295
1.38k
              _size_of_element(0),
296
1.38k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
15.5k
            : _data(data),
291
15.5k
              _options(options),
292
15.5k
              _parsed(false),
293
15.5k
              _num_elements(0),
294
15.5k
              _num_element_after_padding(0),
295
15.5k
              _size_of_element(0),
296
15.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
41.5k
            : _data(data),
291
41.5k
              _options(options),
292
41.5k
              _parsed(false),
293
41.5k
              _num_elements(0),
294
41.5k
              _num_element_after_padding(0),
295
41.5k
              _size_of_element(0),
296
41.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
29.8k
            : _data(data),
291
29.8k
              _options(options),
292
29.8k
              _parsed(false),
293
29.8k
              _num_elements(0),
294
29.8k
              _num_element_after_padding(0),
295
29.8k
              _size_of_element(0),
296
29.8k
              _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
949
            : _data(data),
291
949
              _options(options),
292
949
              _parsed(false),
293
949
              _num_elements(0),
294
949
              _num_element_after_padding(0),
295
949
              _size_of_element(0),
296
949
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
987
            : _data(data),
291
987
              _options(options),
292
987
              _parsed(false),
293
987
              _num_elements(0),
294
987
              _num_element_after_padding(0),
295
987
              _size_of_element(0),
296
987
              _cur_index(0) {}
297
298
1.01M
    Status init() override {
299
1.01M
        CHECK(!_parsed);
300
1.01M
        size_t unused;
301
1.01M
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.01M
                                                 _num_element_after_padding, _size_of_element));
303
304
1.01M
        if (_data.size !=
305
1.01M
            _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.01M
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.01M
                     _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.01M
        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.01M
        _parsed = true;
325
1.01M
        return Status::OK();
326
1.01M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
298
517k
    Status init() override {
299
517k
        CHECK(!_parsed);
300
517k
        size_t unused;
301
517k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
517k
                                                 _num_element_after_padding, _size_of_element));
303
304
517k
        if (_data.size !=
305
517k
            _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
517k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
517k
                     _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
517k
        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
517k
        _parsed = true;
325
517k
        return Status::OK();
326
517k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
74.1k
    Status init() override {
299
74.1k
        CHECK(!_parsed);
300
74.1k
        size_t unused;
301
74.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
74.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
74.1k
        if (_data.size !=
305
74.1k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
74.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
74.1k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
74.1k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
74.1k
        _parsed = true;
325
74.1k
        return Status::OK();
326
74.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
16.1k
    Status init() override {
299
16.1k
        CHECK(!_parsed);
300
16.1k
        size_t unused;
301
16.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
16.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
16.1k
        if (_data.size !=
305
16.1k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
16.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
16.1k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
16.1k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
16.1k
        _parsed = true;
325
16.1k
        return Status::OK();
326
16.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
50.5k
    Status init() override {
299
50.5k
        CHECK(!_parsed);
300
50.5k
        size_t unused;
301
50.5k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
50.5k
                                                 _num_element_after_padding, _size_of_element));
303
304
50.5k
        if (_data.size !=
305
50.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
50.5k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
50.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
50.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
50.5k
        _parsed = true;
325
50.5k
        return Status::OK();
326
50.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
298
13.2k
    Status init() override {
299
13.2k
        CHECK(!_parsed);
300
13.2k
        size_t unused;
301
13.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
13.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
13.2k
        if (_data.size !=
305
13.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
13.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
13.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
13.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
13.2k
        _parsed = true;
325
13.2k
        return Status::OK();
326
13.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
298
85.8k
    Status init() override {
299
85.8k
        CHECK(!_parsed);
300
85.8k
        size_t unused;
301
85.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
85.8k
                                                 _num_element_after_padding, _size_of_element));
303
304
85.8k
        if (_data.size !=
305
85.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
85.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
85.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
85.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
85.8k
        _parsed = true;
325
85.8k
        return Status::OK();
326
85.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
298
9.13k
    Status init() override {
299
9.13k
        CHECK(!_parsed);
300
9.13k
        size_t unused;
301
9.13k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
9.13k
                                                 _num_element_after_padding, _size_of_element));
303
304
9.13k
        if (_data.size !=
305
9.13k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
9.13k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
9.13k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
9.13k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
9.13k
        _parsed = true;
325
9.13k
        return Status::OK();
326
9.13k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
298
10.7k
    Status init() override {
299
10.7k
        CHECK(!_parsed);
300
10.7k
        size_t unused;
301
10.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
10.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
10.7k
        if (_data.size !=
305
10.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
10.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
10.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
10.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
10.7k
        _parsed = true;
325
10.7k
        return Status::OK();
326
10.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
1.73k
    Status init() override {
299
1.73k
        CHECK(!_parsed);
300
1.73k
        size_t unused;
301
1.73k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.73k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.73k
        if (_data.size !=
305
1.73k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.73k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.73k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.73k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.73k
        _parsed = true;
325
1.73k
        return Status::OK();
326
1.73k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
59.1k
    Status init() override {
299
59.1k
        CHECK(!_parsed);
300
59.1k
        size_t unused;
301
59.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
59.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
59.1k
        if (_data.size !=
305
59.1k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
59.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
59.1k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
59.1k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
59.1k
        _parsed = true;
325
59.1k
        return Status::OK();
326
59.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
298
64.7k
    Status init() override {
299
64.7k
        CHECK(!_parsed);
300
64.7k
        size_t unused;
301
64.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
64.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
64.7k
        if (_data.size !=
305
64.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
64.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
64.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
64.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
64.7k
        _parsed = true;
325
64.7k
        return Status::OK();
326
64.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
298
2.25k
    Status init() override {
299
2.25k
        CHECK(!_parsed);
300
2.25k
        size_t unused;
301
2.25k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
2.25k
                                                 _num_element_after_padding, _size_of_element));
303
304
2.25k
        if (_data.size !=
305
2.25k
            _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.25k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
2.25k
                     _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.25k
        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.25k
        _parsed = true;
325
2.25k
        return Status::OK();
326
2.25k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
298
15.6k
    Status init() override {
299
15.6k
        CHECK(!_parsed);
300
15.6k
        size_t unused;
301
15.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
15.6k
                                                 _num_element_after_padding, _size_of_element));
303
304
15.6k
        if (_data.size !=
305
15.6k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
15.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
15.6k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
15.6k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
15.6k
        _parsed = true;
325
15.6k
        return Status::OK();
326
15.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
298
1.34k
    Status init() override {
299
1.34k
        CHECK(!_parsed);
300
1.34k
        size_t unused;
301
1.34k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.34k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.34k
        if (_data.size !=
305
1.34k
            _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.34k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.34k
                     _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.34k
        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.34k
        _parsed = true;
325
1.34k
        return Status::OK();
326
1.34k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
298
15.4k
    Status init() override {
299
15.4k
        CHECK(!_parsed);
300
15.4k
        size_t unused;
301
15.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
15.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
15.4k
        if (_data.size !=
305
15.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
15.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
15.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
15.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
15.4k
        _parsed = true;
325
15.4k
        return Status::OK();
326
15.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
298
41.4k
    Status init() override {
299
41.4k
        CHECK(!_parsed);
300
41.4k
        size_t unused;
301
41.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
41.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
41.4k
        if (_data.size !=
305
41.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
41.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
41.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
41.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
41.4k
        _parsed = true;
325
41.4k
        return Status::OK();
326
41.4k
    }
_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.73k
    Status init() override {
299
1.73k
        CHECK(!_parsed);
300
1.73k
        size_t unused;
301
1.73k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.73k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.73k
        if (_data.size !=
305
1.73k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.73k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.73k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.73k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.73k
        _parsed = true;
325
1.73k
        return Status::OK();
326
1.73k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
298
946
    Status init() override {
299
946
        CHECK(!_parsed);
300
946
        size_t unused;
301
946
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
946
                                                 _num_element_after_padding, _size_of_element));
303
304
946
        if (_data.size !=
305
946
            _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
946
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
946
                     _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
946
        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
946
        _parsed = true;
325
946
        return Status::OK();
326
946
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
298
983
    Status init() override {
299
983
        CHECK(!_parsed);
300
983
        size_t unused;
301
983
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
983
                                                 _num_element_after_padding, _size_of_element));
303
304
983
        if (_data.size !=
305
983
            _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
983
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
983
                     _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
983
        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
983
        _parsed = true;
325
983
        return Status::OK();
326
983
    }
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.27M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
3.27M
        if (_num_elements == 0) [[unlikely]] {
337
4.45k
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
4.45k
        }
342
343
3.27M
        DCHECK_LE(pos, _num_elements);
344
3.27M
        _cur_index = pos;
345
3.27M
        return Status::OK();
346
3.27M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.92M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
1.92M
        if (_num_elements == 0) [[unlikely]] {
337
2.39k
            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.39k
        }
342
343
1.92M
        DCHECK_LE(pos, _num_elements);
344
1.92M
        _cur_index = pos;
345
1.92M
        return Status::OK();
346
1.92M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
80.0k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
80.0k
        if (_num_elements == 0) [[unlikely]] {
337
358
            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
358
        }
342
343
80.0k
        DCHECK_LE(pos, _num_elements);
344
80.0k
        _cur_index = pos;
345
80.0k
        return Status::OK();
346
80.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
3.80k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
3.80k
        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
3.80k
        DCHECK_LE(pos, _num_elements);
344
3.80k
        _cur_index = pos;
345
3.80k
        return Status::OK();
346
3.80k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
129k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
129k
        if (_num_elements == 0) [[unlikely]] {
337
160
            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
160
        }
342
343
129k
        DCHECK_LE(pos, _num_elements);
344
129k
        _cur_index = pos;
345
129k
        return Status::OK();
346
129k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
334
4.86k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
4.86k
        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
4.86k
        DCHECK_LE(pos, _num_elements);
344
4.86k
        _cur_index = pos;
345
4.86k
        return Status::OK();
346
4.86k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
334
12.0k
    Status seek_to_position_in_page(size_t pos) override {
335
12.0k
        DCHECK(_parsed) << "Must call init()";
336
12.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
12.0k
        DCHECK_LE(pos, _num_elements);
344
12.0k
        _cur_index = pos;
345
12.0k
        return Status::OK();
346
12.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.21k
    Status seek_to_position_in_page(size_t pos) override {
335
1.21k
        DCHECK(_parsed) << "Must call init()";
336
1.21k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
1.21k
        DCHECK_LE(pos, _num_elements);
344
1.21k
        _cur_index = pos;
345
1.21k
        return Status::OK();
346
1.21k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
334
3.18k
    Status seek_to_position_in_page(size_t pos) override {
335
3.18k
        DCHECK(_parsed) << "Must call init()";
336
3.18k
        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
3.18k
        DCHECK_LE(pos, _num_elements);
344
3.18k
        _cur_index = pos;
345
3.18k
        return Status::OK();
346
3.18k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
334
209k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
209k
        if (_num_elements == 0) [[unlikely]] {
337
4
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
4
        }
342
343
209k
        DCHECK_LE(pos, _num_elements);
344
209k
        _cur_index = pos;
345
209k
        return Status::OK();
346
209k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
334
494k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
494k
        if (_num_elements == 0) [[unlikely]] {
337
197
            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
197
        }
342
343
494k
        DCHECK_LE(pos, _num_elements);
344
494k
        _cur_index = pos;
345
494k
        return Status::OK();
346
494k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
334
75.9k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
75.9k
        if (_num_elements == 0) [[unlikely]] {
337
14
            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
14
        }
342
343
75.9k
        DCHECK_LE(pos, _num_elements);
344
75.9k
        _cur_index = pos;
345
75.9k
        return Status::OK();
346
75.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
193k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
193k
        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
193k
        DCHECK_LE(pos, _num_elements);
344
193k
        _cur_index = pos;
345
193k
        return Status::OK();
346
193k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
334
6.75k
    Status seek_to_position_in_page(size_t pos) override {
335
6.75k
        DCHECK(_parsed) << "Must call init()";
336
6.75k
        if (_num_elements == 0) [[unlikely]] {
337
347
            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
347
        }
342
343
6.75k
        DCHECK_LE(pos, _num_elements);
344
6.75k
        _cur_index = pos;
345
6.75k
        return Status::OK();
346
6.75k
    }
_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
898
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
898
        if (_num_elements == 0) [[unlikely]] {
337
26
            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
26
        }
342
343
898
        DCHECK_LE(pos, _num_elements);
344
898
        _cur_index = pos;
345
898
        return Status::OK();
346
898
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
334
17.0k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
17.0k
        if (_num_elements == 0) [[unlikely]] {
337
716
            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
716
        }
342
343
17.0k
        DCHECK_LE(pos, _num_elements);
344
17.0k
        _cur_index = pos;
345
17.0k
        return Status::OK();
346
17.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Line
Count
Source
334
118k
    Status seek_to_position_in_page(size_t pos) override {
335
118k
        DCHECK(_parsed) << "Must call init()";
336
118k
        if (_num_elements == 0) [[unlikely]] {
337
234
            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
234
        }
342
343
118k
        DCHECK_LE(pos, _num_elements);
344
118k
        _cur_index = pos;
345
118k
        return Status::OK();
346
118k
    }
_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
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
1.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
25
    Status seek_to_position_in_page(size_t pos) override {
335
25
        DCHECK(_parsed) << "Must call init()";
336
25
        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
25
        DCHECK_LE(pos, _num_elements);
344
25
        _cur_index = pos;
345
25
        return Status::OK();
346
25
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE24seek_to_position_in_pageEm
Line
Count
Source
334
30
    Status seek_to_position_in_page(size_t pos) override {
335
30
        DCHECK(_parsed) << "Must call init()";
336
30
        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
30
        DCHECK_LE(pos, _num_elements);
344
30
        _cur_index = pos;
345
30
        return Status::OK();
346
30
    }
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
2.03M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
2.03M
        DCHECK(_parsed);
389
2.04M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
2.03M
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
2.03M
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
2.03M
        *n = max_fetch;
398
2.03M
        if constexpr (forward_index) {
399
1.84M
            _cur_index += max_fetch;
400
1.84M
        }
401
402
2.03M
        return Status::OK();
403
2.03M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
852k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
852k
        DCHECK(_parsed);
389
855k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
852k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
852k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
852k
        *n = max_fetch;
398
852k
        if constexpr (forward_index) {
399
852k
            _cur_index += max_fetch;
400
852k
        }
401
402
852k
        return Status::OK();
403
852k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
201k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
201k
        DCHECK(_parsed);
389
202k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
201k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
201k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
201k
        *n = max_fetch;
398
201k
        if constexpr (forward_index) {
399
201k
            _cur_index += max_fetch;
400
201k
        }
401
402
201k
        return Status::OK();
403
201k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
14.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
14.0k
        DCHECK(_parsed);
389
14.0k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
14.0k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
14.0k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
14.0k
        *n = max_fetch;
398
14.0k
        if constexpr (forward_index) {
399
14.0k
            _cur_index += max_fetch;
400
14.0k
        }
401
402
14.0k
        return Status::OK();
403
14.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
63.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
63.5k
        DCHECK(_parsed);
389
63.5k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
63.5k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
63.5k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
63.5k
        *n = max_fetch;
398
63.5k
        if constexpr (forward_index) {
399
63.5k
            _cur_index += max_fetch;
400
63.5k
        }
401
402
63.5k
        return Status::OK();
403
63.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
13.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
13.0k
        DCHECK(_parsed);
389
13.0k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
13.0k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
13.0k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
13.0k
        *n = max_fetch;
398
13.0k
        if constexpr (forward_index) {
399
13.0k
            _cur_index += max_fetch;
400
13.0k
        }
401
402
13.0k
        return Status::OK();
403
13.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
147k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
147k
        DCHECK(_parsed);
389
147k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
147k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
147k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
147k
        *n = max_fetch;
398
147k
        if constexpr (forward_index) {
399
147k
            _cur_index += max_fetch;
400
147k
        }
401
402
147k
        return Status::OK();
403
147k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
196k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
196k
        DCHECK(_parsed);
389
196k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
196k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
196k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
196k
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
196k
        return Status::OK();
403
196k
    }
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
5.64k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
5.64k
        DCHECK(_parsed);
389
5.64k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
5.64k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
5.64k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
5.64k
        *n = max_fetch;
398
5.64k
        if constexpr (forward_index) {
399
5.64k
            _cur_index += max_fetch;
400
5.64k
        }
401
402
5.64k
        return Status::OK();
403
5.64k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
8.18k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
8.18k
        DCHECK(_parsed);
389
8.18k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
8.18k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
8.18k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
8.18k
        *n = max_fetch;
398
8.18k
        if constexpr (forward_index) {
399
8.18k
            _cur_index += max_fetch;
400
8.18k
        }
401
402
8.18k
        return Status::OK();
403
8.18k
    }
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
9.82k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
9.82k
        DCHECK(_parsed);
389
9.83k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
9.82k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
9.82k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
9.82k
        *n = max_fetch;
398
9.82k
        if constexpr (forward_index) {
399
9.82k
            _cur_index += max_fetch;
400
9.82k
        }
401
402
9.82k
        return Status::OK();
403
9.82k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
379k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
379k
        DCHECK(_parsed);
389
379k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
379k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
379k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
379k
        *n = max_fetch;
398
379k
        if constexpr (forward_index) {
399
379k
            _cur_index += max_fetch;
400
379k
        }
401
402
379k
        return Status::OK();
403
379k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
65.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
65.8k
        DCHECK(_parsed);
389
65.8k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
65.8k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
65.8k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
65.8k
        *n = max_fetch;
398
65.8k
        if constexpr (forward_index) {
399
65.8k
            _cur_index += max_fetch;
400
65.8k
        }
401
402
65.8k
        return Status::OK();
403
65.8k
    }
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.15k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.15k
        DCHECK(_parsed);
389
1.15k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.15k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.15k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.15k
        *n = max_fetch;
398
1.15k
        if constexpr (forward_index) {
399
1.15k
            _cur_index += max_fetch;
400
1.15k
        }
401
402
1.15k
        return Status::OK();
403
1.15k
    }
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.95k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
7.95k
        DCHECK(_parsed);
389
7.95k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
7.95k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
7.95k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
7.95k
        *n = max_fetch;
398
7.95k
        if constexpr (forward_index) {
399
7.95k
            _cur_index += max_fetch;
400
7.95k
        }
401
402
7.95k
        return Status::OK();
403
7.95k
    }
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.25k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.25k
        DCHECK(_parsed);
389
1.25k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.25k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.25k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.25k
        *n = max_fetch;
398
1.25k
        if constexpr (forward_index) {
399
1.25k
            _cur_index += max_fetch;
400
1.25k
        }
401
402
1.25k
        return Status::OK();
403
1.25k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
10.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
10.0k
        DCHECK(_parsed);
389
10.0k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
10.0k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
10.0k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
10.0k
        *n = max_fetch;
398
10.0k
        if constexpr (forward_index) {
399
10.0k
            _cur_index += max_fetch;
400
10.0k
        }
401
402
10.0k
        return Status::OK();
403
10.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
33.3k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
33.3k
        DCHECK(_parsed);
389
33.3k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
33.3k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
33.3k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
33.3k
        *n = max_fetch;
398
33.3k
        if constexpr (forward_index) {
399
33.3k
            _cur_index += max_fetch;
400
33.3k
        }
401
402
33.3k
        return Status::OK();
403
33.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
21.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
21.6k
        DCHECK(_parsed);
389
21.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
21.6k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
21.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
21.6k
        *n = max_fetch;
398
21.6k
        if constexpr (forward_index) {
399
21.6k
            _cur_index += max_fetch;
400
21.6k
        }
401
402
21.6k
        return Status::OK();
403
21.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.14k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.14k
        DCHECK(_parsed);
389
3.14k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.14k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.14k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.14k
        *n = max_fetch;
398
3.14k
        if constexpr (forward_index) {
399
3.14k
            _cur_index += max_fetch;
400
3.14k
        }
401
402
3.14k
        return Status::OK();
403
3.14k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
661
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
661
        DCHECK(_parsed);
389
661
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
661
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
661
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
661
        *n = max_fetch;
398
661
        if constexpr (forward_index) {
399
661
            _cur_index += max_fetch;
400
661
        }
401
402
661
        return Status::OK();
403
661
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
680
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
680
        DCHECK(_parsed);
389
681
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
680
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
680
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
680
        *n = max_fetch;
398
680
        if constexpr (forward_index) {
399
680
            _cur_index += max_fetch;
400
680
        }
401
402
680
        return Status::OK();
403
680
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
404
405
1.84M
    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
852k
    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
201k
    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
14.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
63.5k
    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
13.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
147k
    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
5.64k
    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
8.18k
    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
9.83k
    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
379k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
65.8k
    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.15k
    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.95k
    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.26k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
10.0k
    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
33.3k
    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
21.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
3.14k
    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
660
    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
683
    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
391k
                          MutableColumnPtr& dst) override {
409
391k
        DCHECK(_parsed);
410
391k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
391k
        auto total = *n;
416
391k
        auto read_count = 0;
417
391k
        _buffer.resize(total);
418
109M
        for (size_t i = 0; i < total; ++i) {
419
108M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
108M
            if (UNLIKELY(ord >= _num_elements)) {
421
9.56k
                break;
422
9.56k
            }
423
424
108M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
108M
        }
426
427
391k
        if (LIKELY(read_count > 0)) {
428
391k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
391k
        }
430
431
391k
        *n = read_count;
432
391k
        return Status::OK();
433
391k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
82.6k
                          MutableColumnPtr& dst) override {
409
82.6k
        DCHECK(_parsed);
410
82.6k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
82.6k
        auto total = *n;
416
82.6k
        auto read_count = 0;
417
82.6k
        _buffer.resize(total);
418
44.2M
        for (size_t i = 0; i < total; ++i) {
419
44.1M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
44.1M
            if (UNLIKELY(ord >= _num_elements)) {
421
2.02k
                break;
422
2.02k
            }
423
424
44.1M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
44.1M
        }
426
427
82.7k
        if (LIKELY(read_count > 0)) {
428
82.7k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
82.7k
        }
430
431
82.6k
        *n = read_count;
432
82.6k
        return Status::OK();
433
82.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
23.7k
                          MutableColumnPtr& dst) override {
409
23.7k
        DCHECK(_parsed);
410
23.7k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
23.7k
        auto total = *n;
416
23.7k
        auto read_count = 0;
417
23.7k
        _buffer.resize(total);
418
741k
        for (size_t i = 0; i < total; ++i) {
419
718k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
718k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
718k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
718k
        }
426
427
23.9k
        if (LIKELY(read_count > 0)) {
428
23.9k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
23.9k
        }
430
431
23.7k
        *n = read_count;
432
23.7k
        return Status::OK();
433
23.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
7.85k
                          MutableColumnPtr& dst) override {
409
7.85k
        DCHECK(_parsed);
410
7.85k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
7.85k
        auto total = *n;
416
7.85k
        auto read_count = 0;
417
7.85k
        _buffer.resize(total);
418
80.3k
        for (size_t i = 0; i < total; ++i) {
419
72.5k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
72.5k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
72.5k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
72.5k
        }
426
427
7.85k
        if (LIKELY(read_count > 0)) {
428
7.85k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
7.85k
        }
430
431
7.85k
        *n = read_count;
432
7.85k
        return Status::OK();
433
7.85k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
110k
                          MutableColumnPtr& dst) override {
409
110k
        DCHECK(_parsed);
410
110k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
110k
        auto total = *n;
416
110k
        auto read_count = 0;
417
110k
        _buffer.resize(total);
418
13.8M
        for (size_t i = 0; i < total; ++i) {
419
13.7M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
13.7M
            if (UNLIKELY(ord >= _num_elements)) {
421
469
                break;
422
469
            }
423
424
13.7M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
13.7M
        }
426
427
110k
        if (LIKELY(read_count > 0)) {
428
110k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
110k
        }
430
431
110k
        *n = read_count;
432
110k
        return Status::OK();
433
110k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
6.39k
                          MutableColumnPtr& dst) override {
409
6.39k
        DCHECK(_parsed);
410
6.39k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
6.39k
        auto total = *n;
416
6.39k
        auto read_count = 0;
417
6.39k
        _buffer.resize(total);
418
16.0k
        for (size_t i = 0; i < total; ++i) {
419
9.62k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.62k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
9.62k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.62k
        }
426
427
6.39k
        if (LIKELY(read_count > 0)) {
428
6.39k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
6.39k
        }
430
431
6.39k
        *n = read_count;
432
6.39k
        return Status::OK();
433
6.39k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
28.5k
                          MutableColumnPtr& dst) override {
409
28.5k
        DCHECK(_parsed);
410
28.5k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
28.5k
        auto total = *n;
416
28.5k
        auto read_count = 0;
417
28.5k
        _buffer.resize(total);
418
443k
        for (size_t i = 0; i < total; ++i) {
419
415k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
415k
            if (UNLIKELY(ord >= _num_elements)) {
421
12
                break;
422
12
            }
423
424
415k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
415k
        }
426
427
28.5k
        if (LIKELY(read_count > 0)) {
428
28.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
28.5k
        }
430
431
28.5k
        *n = read_count;
432
28.5k
        return Status::OK();
433
28.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
4.93k
                          MutableColumnPtr& dst) override {
409
4.93k
        DCHECK(_parsed);
410
4.93k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.93k
        auto total = *n;
416
4.93k
        auto read_count = 0;
417
4.93k
        _buffer.resize(total);
418
17.4k
        for (size_t i = 0; i < total; ++i) {
419
12.4k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
12.4k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
12.4k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
12.4k
        }
426
427
4.94k
        if (LIKELY(read_count > 0)) {
428
4.94k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.94k
        }
430
431
4.93k
        *n = read_count;
432
4.93k
        return Status::OK();
433
4.93k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
6.45k
                          MutableColumnPtr& dst) override {
409
6.45k
        DCHECK(_parsed);
410
6.45k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
6.45k
        auto total = *n;
416
6.45k
        auto read_count = 0;
417
6.45k
        _buffer.resize(total);
418
28.1k
        for (size_t i = 0; i < total; ++i) {
419
21.7k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
21.7k
            if (UNLIKELY(ord >= _num_elements)) {
421
90
                break;
422
90
            }
423
424
21.7k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
21.7k
        }
426
427
6.45k
        if (LIKELY(read_count > 0)) {
428
6.45k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
6.45k
        }
430
431
6.45k
        *n = read_count;
432
6.45k
        return Status::OK();
433
6.45k
    }
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.46k
                          MutableColumnPtr& dst) override {
409
1.46k
        DCHECK(_parsed);
410
1.46k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.46k
        auto total = *n;
416
1.46k
        auto read_count = 0;
417
1.46k
        _buffer.resize(total);
418
504k
        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.46k
        if (LIKELY(read_count > 0)) {
428
1.46k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.46k
        }
430
431
1.46k
        *n = read_count;
432
1.46k
        return Status::OK();
433
1.46k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
27.8k
                          MutableColumnPtr& dst) override {
409
27.8k
        DCHECK(_parsed);
410
27.8k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
27.8k
        auto total = *n;
416
27.8k
        auto read_count = 0;
417
27.8k
        _buffer.resize(total);
418
8.34M
        for (size_t i = 0; i < total; ++i) {
419
8.31M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
8.31M
            if (UNLIKELY(ord >= _num_elements)) {
421
512
                break;
422
512
            }
423
424
8.31M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
8.31M
        }
426
427
27.8k
        if (LIKELY(read_count > 0)) {
428
27.8k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
27.8k
        }
430
431
27.8k
        *n = read_count;
432
27.8k
        return Status::OK();
433
27.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
31.2k
                          MutableColumnPtr& dst) override {
409
31.2k
        DCHECK(_parsed);
410
31.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
31.2k
        auto total = *n;
416
31.2k
        auto read_count = 0;
417
31.2k
        _buffer.resize(total);
418
9.48M
        for (size_t i = 0; i < total; ++i) {
419
9.45M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.45M
            if (UNLIKELY(ord >= _num_elements)) {
421
206
                break;
422
206
            }
423
424
9.45M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.45M
        }
426
427
31.2k
        if (LIKELY(read_count > 0)) {
428
31.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
31.2k
        }
430
431
31.2k
        *n = read_count;
432
31.2k
        return Status::OK();
433
31.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1.72k
                          MutableColumnPtr& dst) override {
409
1.72k
        DCHECK(_parsed);
410
1.72k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.72k
        auto total = *n;
416
1.72k
        auto read_count = 0;
417
1.72k
        _buffer.resize(total);
418
502k
        for (size_t i = 0; i < total; ++i) {
419
501k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
501k
            if (UNLIKELY(ord >= _num_elements)) {
421
250
                break;
422
250
            }
423
424
500k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
500k
        }
426
427
1.72k
        if (LIKELY(read_count > 0)) {
428
1.72k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.72k
        }
430
431
1.72k
        *n = read_count;
432
1.72k
        return Status::OK();
433
1.72k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
12.2k
                          MutableColumnPtr& dst) override {
409
12.2k
        DCHECK(_parsed);
410
12.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
12.2k
        auto total = *n;
416
12.2k
        auto read_count = 0;
417
12.2k
        _buffer.resize(total);
418
26.0k
        for (size_t i = 0; i < total; ++i) {
419
13.7k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
13.7k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
13.7k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
13.7k
        }
426
427
12.2k
        if (LIKELY(read_count > 0)) {
428
12.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
12.2k
        }
430
431
12.2k
        *n = read_count;
432
12.2k
        return Status::OK();
433
12.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
133
                          MutableColumnPtr& dst) override {
409
133
        DCHECK(_parsed);
410
133
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
133
        auto total = *n;
416
133
        auto read_count = 0;
417
133
        _buffer.resize(total);
418
271
        for (size_t i = 0; i < total; ++i) {
419
138
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
138
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
138
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
138
        }
426
427
133
        if (LIKELY(read_count > 0)) {
428
133
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
133
        }
430
431
133
        *n = read_count;
432
133
        return Status::OK();
433
133
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4.54k
                          MutableColumnPtr& dst) override {
409
4.54k
        DCHECK(_parsed);
410
4.54k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.54k
        auto total = *n;
416
4.54k
        auto read_count = 0;
417
4.54k
        _buffer.resize(total);
418
18.9k
        for (size_t i = 0; i < total; ++i) {
419
14.3k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.3k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
14.3k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.3k
        }
426
427
4.55k
        if (LIKELY(read_count > 0)) {
428
4.55k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.55k
        }
430
431
4.54k
        *n = read_count;
432
4.54k
        return Status::OK();
433
4.54k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
26.3k
                          MutableColumnPtr& dst) override {
409
26.3k
        DCHECK(_parsed);
410
26.3k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
26.3k
        auto total = *n;
416
26.3k
        auto read_count = 0;
417
26.3k
        _buffer.resize(total);
418
22.0M
        for (size_t i = 0; i < total; ++i) {
419
21.9M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
21.9M
            if (UNLIKELY(ord >= _num_elements)) {
421
5.23k
                break;
422
5.23k
            }
423
424
21.9M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
21.9M
        }
426
427
26.3k
        if (LIKELY(read_count > 0)) {
428
26.3k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
26.3k
        }
430
431
26.3k
        *n = read_count;
432
26.3k
        return Status::OK();
433
26.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.1k
                          MutableColumnPtr& dst) override {
409
13.1k
        DCHECK(_parsed);
410
13.1k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.1k
        auto total = *n;
416
13.1k
        auto read_count = 0;
417
13.1k
        _buffer.resize(total);
418
8.73M
        for (size_t i = 0; i < total; ++i) {
419
8.72M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
8.72M
            if (UNLIKELY(ord >= _num_elements)) {
421
739
                break;
422
739
            }
423
424
8.72M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
8.72M
        }
426
427
13.1k
        if (LIKELY(read_count > 0)) {
428
13.1k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.1k
        }
430
431
13.1k
        *n = read_count;
432
13.1k
        return Status::OK();
433
13.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
959
                          MutableColumnPtr& dst) override {
409
959
        DCHECK(_parsed);
410
959
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
959
        auto total = *n;
416
959
        auto read_count = 0;
417
959
        _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
960
        if (LIKELY(read_count > 0)) {
428
960
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
960
        }
430
431
959
        *n = read_count;
432
959
        return Status::OK();
433
959
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
290
                          MutableColumnPtr& dst) override {
409
290
        DCHECK(_parsed);
410
290
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
290
        auto total = *n;
416
290
        auto read_count = 0;
417
290
        _buffer.resize(total);
418
824
        for (size_t i = 0; i < total; ++i) {
419
534
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
534
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
534
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
534
        }
426
427
290
        if (LIKELY(read_count > 0)) {
428
290
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
290
        }
430
431
290
        *n = read_count;
432
290
        return Status::OK();
433
290
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
323
                          MutableColumnPtr& dst) override {
409
323
        DCHECK(_parsed);
410
323
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
323
        auto total = *n;
416
323
        auto read_count = 0;
417
323
        _buffer.resize(total);
418
1.16k
        for (size_t i = 0; i < total; ++i) {
419
838
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
838
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
838
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
838
        }
426
427
323
        if (LIKELY(read_count > 0)) {
428
323
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
323
        }
430
431
323
        *n = read_count;
432
323
        return Status::OK();
433
323
    }
434
435
197k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
197k
        return next_batch<false>(n, dst);
437
197k
    }
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
197k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
197k
        return next_batch<false>(n, dst);
437
197k
    }
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
2.64M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
1.67M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
441
1.22k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
441
736
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
177k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
441
321
    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
627
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
2.01k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
441
201k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
441
218k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
441
49.2k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
441
192k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Line
Count
Source
441
1.01k
    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.49k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
441
1.68k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
441
114k
    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
41
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
Line
Count
Source
441
47
    size_t current_index() const override { return _cur_index; }
442
443
111M
    char* get_data(size_t index) const {
444
111M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
111M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
45.9M
    char* get_data(size_t index) const {
444
45.9M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
45.9M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
920k
    char* get_data(size_t index) const {
444
920k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
920k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
443
86.5k
    char* get_data(size_t index) const {
444
86.5k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
86.5k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
443
13.8M
    char* get_data(size_t index) const {
444
13.8M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
13.8M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
22.7k
    char* get_data(size_t index) const {
444
22.7k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
22.7k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
759k
    char* get_data(size_t index) const {
444
759k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
759k
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
18.1k
    char* get_data(size_t index) const {
444
18.1k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
18.1k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
29.8k
    char* get_data(size_t index) const {
444
29.8k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
29.8k
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
512k
    char* get_data(size_t index) const {
444
512k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
512k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
8.69M
    char* get_data(size_t index) const {
444
8.69M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
8.69M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
443
9.52M
    char* get_data(size_t index) const {
444
9.52M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.52M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
443
502k
    char* get_data(size_t index) const {
444
502k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
502k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
443
21.7k
    char* get_data(size_t index) const {
444
21.7k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
21.7k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
443
1.40k
    char* get_data(size_t index) const {
444
1.40k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.40k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
443
24.4k
    char* get_data(size_t index) const {
444
24.4k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
24.4k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
443
22.0M
    char* get_data(size_t index) const {
444
22.0M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
22.0M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
8.74M
    char* get_data(size_t index) const {
444
8.74M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
8.74M
    }
_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
1.19k
    char* get_data(size_t index) const {
444
1.19k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.19k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
Line
Count
Source
443
1.52k
    char* get_data(size_t index) const {
444
1.52k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.52k
    }
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