Coverage Report

Created: 2026-08-31 12:26

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
673k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
338k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
55.4k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
12.3k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
34.6k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
15.2k
    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
9.88k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
95
11.3k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
355
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
37.5k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
95
42.3k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
450
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
95
7.32k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
352
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
95
9.76k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
95
11.9k
    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
729
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
95
726
    Status init() override { return reset(); }
96
97
144M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
144M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
56.5k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
14.5k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
53.1k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
14.2k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
65.7k
    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
9.28k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
97
11.2k
    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
371
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
43.8k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
42.0k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
97
513
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
Line
Count
Source
97
7.61k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
97
255
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
97
5.23k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
23.0k
    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.39k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Line
Count
Source
97
629
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
97
642
    bool is_page_full() override { return _remain_element_capacity == 0; }
98
99
1.03M
    Status add(const uint8_t* vals, size_t* count) override {
100
1.03M
        return add_internal<false>(vals, count);
101
1.03M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
99
669k
    Status add(const uint8_t* vals, size_t* count) override {
100
669k
        return add_internal<false>(vals, count);
101
669k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
56.5k
    Status add(const uint8_t* vals, size_t* count) override {
100
56.5k
        return add_internal<false>(vals, count);
101
56.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
14.5k
    Status add(const uint8_t* vals, size_t* count) override {
100
14.5k
        return add_internal<false>(vals, count);
101
14.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
53.1k
    Status add(const uint8_t* vals, size_t* count) override {
100
53.1k
        return add_internal<false>(vals, count);
101
53.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
14.2k
    Status add(const uint8_t* vals, size_t* count) override {
100
14.2k
        return add_internal<false>(vals, count);
101
14.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
65.7k
    Status add(const uint8_t* vals, size_t* count) override {
100
65.7k
        return add_internal<false>(vals, count);
101
65.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
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
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
99
11.2k
    Status add(const uint8_t* vals, size_t* count) override {
100
11.2k
        return add_internal<false>(vals, count);
101
11.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
371
    Status add(const uint8_t* vals, size_t* count) override {
100
371
        return add_internal<false>(vals, count);
101
371
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
43.8k
    Status add(const uint8_t* vals, size_t* count) override {
100
43.8k
        return add_internal<false>(vals, count);
101
43.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
42.0k
    Status add(const uint8_t* vals, size_t* count) override {
100
42.0k
        return add_internal<false>(vals, count);
101
42.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
99
513
    Status add(const uint8_t* vals, size_t* count) override {
100
513
        return add_internal<false>(vals, count);
101
513
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
Line
Count
Source
99
7.62k
    Status add(const uint8_t* vals, size_t* count) override {
100
7.62k
        return add_internal<false>(vals, count);
101
7.62k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
255
    Status add(const uint8_t* vals, size_t* count) override {
100
255
        return add_internal<false>(vals, count);
101
255
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
99
5.23k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.23k
        return add_internal<false>(vals, count);
101
5.23k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
23.0k
    Status add(const uint8_t* vals, size_t* count) override {
100
23.0k
        return add_internal<false>(vals, count);
101
23.0k
    }
_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.39k
    Status add(const uint8_t* vals, size_t* count) override {
100
1.39k
        return add_internal<false>(vals, count);
101
1.39k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Line
Count
Source
99
629
    Status add(const uint8_t* vals, size_t* count) override {
100
629
        return add_internal<false>(vals, count);
101
629
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
99
642
    Status add(const uint8_t* vals, size_t* count) override {
100
642
        return add_internal<false>(vals, count);
101
642
    }
102
103
145M
    Status single_add(const uint8_t* vals, size_t* count) {
104
145M
        return add_internal<true>(vals, count);
105
145M
    }
106
107
    template <bool single>
108
143M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
143M
        DCHECK(!_finished);
110
143M
        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
143M
        uint32_t to_add = cast_set<UInt32>(
126
143M
                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
143M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
143M
        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
143M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
146M
        _count += to_add;
134
146M
        _remain_element_capacity -= to_add;
135
146M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
146M
        *num_written = to_add;
138
146M
        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
145M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
145M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
145M
                        *reinterpret_cast<const uint32_t*>(vals);
149
145M
                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
145M
        }
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
146M
        return Status::OK();
159
143M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
669k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
669k
        DCHECK(!_finished);
110
669k
        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
669k
        uint32_t to_add = cast_set<UInt32>(
126
669k
                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
669k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
669k
        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
669k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
669k
        _count += to_add;
134
669k
        _remain_element_capacity -= to_add;
135
669k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
669k
        *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
669k
        memcpy(&_data[orig_size], vals, to_add_size);
158
669k
        return Status::OK();
159
669k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
142M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
142M
        DCHECK(!_finished);
110
142M
        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
142M
        uint32_t to_add = cast_set<UInt32>(
126
142M
                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
142M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
142M
        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
142M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
145M
        _count += to_add;
134
145M
        _remain_element_capacity -= to_add;
135
145M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
145M
        *num_written = to_add;
138
145M
        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
145M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
145M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
145M
                        *reinterpret_cast<const uint32_t*>(vals);
149
145M
                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
145M
        }
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
145M
        return Status::OK();
159
142M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
56.5k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
56.5k
        DCHECK(!_finished);
110
56.5k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
56.5k
        uint32_t to_add = cast_set<UInt32>(
126
56.5k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
56.5k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
56.5k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
56.5k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
56.5k
        _count += to_add;
134
56.5k
        _remain_element_capacity -= to_add;
135
56.5k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
56.5k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
56.5k
        memcpy(&_data[orig_size], vals, to_add_size);
158
56.5k
        return Status::OK();
159
56.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
14.5k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
14.5k
        DCHECK(!_finished);
110
14.5k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
14.5k
        uint32_t to_add = cast_set<UInt32>(
126
14.5k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
14.5k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
14.5k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
14.5k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
14.5k
        _count += to_add;
134
14.5k
        _remain_element_capacity -= to_add;
135
14.5k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
14.5k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
14.5k
        memcpy(&_data[orig_size], vals, to_add_size);
158
14.5k
        return Status::OK();
159
14.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
53.1k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
53.1k
        DCHECK(!_finished);
110
53.1k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
53.1k
        uint32_t to_add = cast_set<UInt32>(
126
53.1k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
53.1k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
53.1k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
53.1k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
53.1k
        _count += to_add;
134
53.1k
        _remain_element_capacity -= to_add;
135
53.1k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
53.1k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
53.1k
        memcpy(&_data[orig_size], vals, to_add_size);
158
53.1k
        return Status::OK();
159
53.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
14.2k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
14.2k
        DCHECK(!_finished);
110
14.2k
        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
14.2k
        uint32_t to_add = cast_set<UInt32>(
126
14.2k
                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
14.2k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
14.2k
        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
14.2k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
14.2k
        _count += to_add;
134
14.2k
        _remain_element_capacity -= to_add;
135
14.2k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
14.2k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
14.2k
        memcpy(&_data[orig_size], vals, to_add_size);
158
14.2k
        return Status::OK();
159
14.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
65.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
65.7k
        DCHECK(!_finished);
110
65.7k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
65.7k
        uint32_t to_add = cast_set<UInt32>(
126
65.7k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
65.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
65.7k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
65.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
65.7k
        _count += to_add;
134
65.7k
        _remain_element_capacity -= to_add;
135
65.7k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
65.7k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
65.7k
        memcpy(&_data[orig_size], vals, to_add_size);
158
65.7k
        return Status::OK();
159
65.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_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
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
11.2k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
11.2k
        DCHECK(!_finished);
110
11.2k
        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.2k
        uint32_t to_add = cast_set<UInt32>(
126
11.2k
                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.2k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
11.2k
        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.2k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
11.2k
        _count += to_add;
134
11.2k
        _remain_element_capacity -= to_add;
135
11.2k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
11.2k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
11.2k
        memcpy(&_data[orig_size], vals, to_add_size);
158
11.2k
        return Status::OK();
159
11.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
371
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
371
        DCHECK(!_finished);
110
371
        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
371
        uint32_t to_add = cast_set<UInt32>(
126
371
                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
371
        int to_add_size = to_add * SIZE_OF_TYPE;
129
371
        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
371
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
371
        _count += to_add;
134
371
        _remain_element_capacity -= to_add;
135
371
        _raw_data_size += to_add_size;
136
        // return added number through count
137
371
        *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
371
        memcpy(&_data[orig_size], vals, to_add_size);
158
371
        return Status::OK();
159
371
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
43.8k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
43.8k
        DCHECK(!_finished);
110
43.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
43.8k
        uint32_t to_add = cast_set<UInt32>(
126
43.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
43.8k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
43.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
43.8k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
43.8k
        _count += to_add;
134
43.8k
        _remain_element_capacity -= to_add;
135
43.8k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
43.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
43.8k
        memcpy(&_data[orig_size], vals, to_add_size);
158
43.8k
        return Status::OK();
159
43.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
42.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
42.0k
        DCHECK(!_finished);
110
42.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
42.0k
        uint32_t to_add = cast_set<UInt32>(
126
42.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
42.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
42.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
42.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
42.0k
        _count += to_add;
134
42.0k
        _remain_element_capacity -= to_add;
135
42.0k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
42.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
42.0k
        memcpy(&_data[orig_size], vals, to_add_size);
158
42.0k
        return Status::OK();
159
42.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
513
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
513
        DCHECK(!_finished);
110
513
        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
513
        uint32_t to_add = cast_set<UInt32>(
126
513
                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
513
        int to_add_size = to_add * SIZE_OF_TYPE;
129
513
        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
513
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
513
        _count += to_add;
134
513
        _remain_element_capacity -= to_add;
135
513
        _raw_data_size += to_add_size;
136
        // return added number through count
137
513
        *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
513
        memcpy(&_data[orig_size], vals, to_add_size);
158
513
        return Status::OK();
159
513
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
7.61k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
7.61k
        DCHECK(!_finished);
110
7.61k
        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.61k
        uint32_t to_add = cast_set<UInt32>(
126
7.61k
                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.61k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
7.61k
        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.61k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
7.62k
        _count += to_add;
134
7.62k
        _remain_element_capacity -= to_add;
135
7.62k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
7.62k
        *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.62k
        memcpy(&_data[orig_size], vals, to_add_size);
158
7.62k
        return Status::OK();
159
7.61k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
255
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
255
        DCHECK(!_finished);
110
255
        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
255
        uint32_t to_add = cast_set<UInt32>(
126
255
                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
255
        int to_add_size = to_add * SIZE_OF_TYPE;
129
255
        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
255
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
255
        _count += to_add;
134
255
        _remain_element_capacity -= to_add;
135
255
        _raw_data_size += to_add_size;
136
        // return added number through count
137
255
        *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
255
        memcpy(&_data[orig_size], vals, to_add_size);
158
255
        return Status::OK();
159
255
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
5.23k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.23k
        DCHECK(!_finished);
110
5.23k
        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.23k
        uint32_t to_add = cast_set<UInt32>(
126
5.23k
                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.23k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.23k
        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.23k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.23k
        _count += to_add;
134
5.23k
        _remain_element_capacity -= to_add;
135
5.23k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.23k
        *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.23k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.23k
        return Status::OK();
159
5.23k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
23.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
23.0k
        DCHECK(!_finished);
110
23.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
23.0k
        uint32_t to_add = cast_set<UInt32>(
126
23.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
23.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
23.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
23.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
23.0k
        _count += to_add;
134
23.0k
        _remain_element_capacity -= to_add;
135
23.0k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
23.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
23.0k
        memcpy(&_data[orig_size], vals, to_add_size);
158
23.0k
        return Status::OK();
159
23.0k
    }
_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.39k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
1.39k
        DCHECK(!_finished);
110
1.39k
        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.39k
        uint32_t to_add = cast_set<UInt32>(
126
1.39k
                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.39k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
1.39k
        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.39k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
1.39k
        _count += to_add;
134
1.39k
        _remain_element_capacity -= to_add;
135
1.39k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
1.39k
        *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.39k
        memcpy(&_data[orig_size], vals, to_add_size);
158
1.39k
        return Status::OK();
159
1.39k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
629
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
629
        DCHECK(!_finished);
110
629
        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
629
        uint32_t to_add = cast_set<UInt32>(
126
629
                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
629
        int to_add_size = to_add * SIZE_OF_TYPE;
129
629
        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
629
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
629
        _count += to_add;
134
629
        _remain_element_capacity -= to_add;
135
629
        _raw_data_size += to_add_size;
136
        // return added number through count
137
629
        *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
629
        memcpy(&_data[orig_size], vals, to_add_size);
158
629
        return Status::OK();
159
629
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
642
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
642
        DCHECK(!_finished);
110
642
        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
642
        uint32_t to_add = cast_set<UInt32>(
126
642
                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
642
        int to_add_size = to_add * SIZE_OF_TYPE;
129
642
        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
642
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
642
        _count += to_add;
134
642
        _remain_element_capacity -= to_add;
135
642
        _raw_data_size += to_add_size;
136
        // return added number through count
137
642
        *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
642
        memcpy(&_data[orig_size], vals, to_add_size);
158
642
        return Status::OK();
159
642
    }
160
161
662k
    Status finish(OwnedSlice* slice) override {
162
662k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
662k
        return Status::OK();
164
662k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
324k
    Status finish(OwnedSlice* slice) override {
162
324k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
324k
        return Status::OK();
164
324k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
53.7k
    Status finish(OwnedSlice* slice) override {
162
53.7k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
53.7k
        return Status::OK();
164
53.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
11.3k
    Status finish(OwnedSlice* slice) override {
162
11.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
11.3k
        return Status::OK();
164
11.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
38.0k
    Status finish(OwnedSlice* slice) override {
162
38.0k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
38.0k
        return Status::OK();
164
38.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
14.2k
    Status finish(OwnedSlice* slice) override {
162
14.2k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
14.2k
        return Status::OK();
164
14.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
65.6k
    Status finish(OwnedSlice* slice) override {
162
65.6k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
65.6k
        return Status::OK();
164
65.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
8.98k
    Status finish(OwnedSlice* slice) override {
162
8.98k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
8.98k
        return Status::OK();
164
8.98k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
10.9k
    Status finish(OwnedSlice* slice) override {
162
10.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
10.9k
        return Status::OK();
164
10.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
366
    Status finish(OwnedSlice* slice) override {
162
366
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
366
        return Status::OK();
164
366
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
37.9k
    Status finish(OwnedSlice* slice) override {
162
37.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
37.9k
        return Status::OK();
164
37.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
41.3k
    Status finish(OwnedSlice* slice) override {
162
41.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
41.3k
        return Status::OK();
164
41.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
603
    Status finish(OwnedSlice* slice) override {
162
603
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
603
        return Status::OK();
164
603
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7.70k
    Status finish(OwnedSlice* slice) override {
162
7.70k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.71k
        return Status::OK();
164
7.70k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
257
    Status finish(OwnedSlice* slice) override {
162
257
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
257
        return Status::OK();
164
257
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
9.76k
    Status finish(OwnedSlice* slice) override {
162
9.76k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
9.77k
        return Status::OK();
164
9.76k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
18.2k
    Status finish(OwnedSlice* slice) override {
162
18.2k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
18.2k
        return Status::OK();
164
18.2k
    }
_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.12k
    Status finish(OwnedSlice* slice) override {
162
1.12k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
1.12k
        return Status::OK();
164
1.12k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
635
    Status finish(OwnedSlice* slice) override {
162
635
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
635
        return Status::OK();
164
635
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
632
    Status finish(OwnedSlice* slice) override {
162
632
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
632
        return Status::OK();
164
632
    }
165
166
1.60M
    Status reset() override {
167
1.60M
        RETURN_IF_CATCH_EXCEPTION({
168
1.60M
            size_t block_size = _options.data_page_size;
169
1.60M
            _count = 0;
170
1.60M
            _raw_data_size = 0;
171
1.60M
            _data.clear();
172
1.60M
            _data.reserve(block_size);
173
1.60M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.60M
                    << "buffer must be naturally-aligned";
175
1.60M
            _buffer.clear();
176
1.60M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.60M
            _finished = false;
178
1.60M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.60M
        });
180
1.61M
        return Status::OK();
181
1.60M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
166
935k
    Status reset() override {
167
935k
        RETURN_IF_CATCH_EXCEPTION({
168
935k
            size_t block_size = _options.data_page_size;
169
935k
            _count = 0;
170
935k
            _raw_data_size = 0;
171
935k
            _data.clear();
172
935k
            _data.reserve(block_size);
173
935k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
935k
                    << "buffer must be naturally-aligned";
175
935k
            _buffer.clear();
176
935k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
935k
            _finished = false;
178
935k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
935k
        });
180
938k
        return Status::OK();
181
935k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
109k
    Status reset() override {
167
109k
        RETURN_IF_CATCH_EXCEPTION({
168
109k
            size_t block_size = _options.data_page_size;
169
109k
            _count = 0;
170
109k
            _raw_data_size = 0;
171
109k
            _data.clear();
172
109k
            _data.reserve(block_size);
173
109k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
109k
                    << "buffer must be naturally-aligned";
175
109k
            _buffer.clear();
176
109k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
109k
            _finished = false;
178
109k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
109k
        });
180
109k
        return Status::OK();
181
109k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
166
23.6k
    Status reset() override {
167
23.6k
        RETURN_IF_CATCH_EXCEPTION({
168
23.6k
            size_t block_size = _options.data_page_size;
169
23.6k
            _count = 0;
170
23.6k
            _raw_data_size = 0;
171
23.6k
            _data.clear();
172
23.6k
            _data.reserve(block_size);
173
23.6k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
23.6k
                    << "buffer must be naturally-aligned";
175
23.6k
            _buffer.clear();
176
23.6k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
23.6k
            _finished = false;
178
23.6k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
23.6k
        });
180
23.6k
        return Status::OK();
181
23.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
72.7k
    Status reset() override {
167
72.7k
        RETURN_IF_CATCH_EXCEPTION({
168
72.7k
            size_t block_size = _options.data_page_size;
169
72.7k
            _count = 0;
170
72.7k
            _raw_data_size = 0;
171
72.7k
            _data.clear();
172
72.7k
            _data.reserve(block_size);
173
72.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
72.7k
                    << "buffer must be naturally-aligned";
175
72.7k
            _buffer.clear();
176
72.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
72.7k
            _finished = false;
178
72.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
72.7k
        });
180
72.9k
        return Status::OK();
181
72.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
166
29.4k
    Status reset() override {
167
29.4k
        RETURN_IF_CATCH_EXCEPTION({
168
29.4k
            size_t block_size = _options.data_page_size;
169
29.4k
            _count = 0;
170
29.4k
            _raw_data_size = 0;
171
29.4k
            _data.clear();
172
29.4k
            _data.reserve(block_size);
173
29.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
29.4k
                    << "buffer must be naturally-aligned";
175
29.4k
            _buffer.clear();
176
29.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
29.4k
            _finished = false;
178
29.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
29.4k
        });
180
29.4k
        return Status::OK();
181
29.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
166
131k
    Status reset() override {
167
131k
        RETURN_IF_CATCH_EXCEPTION({
168
131k
            size_t block_size = _options.data_page_size;
169
131k
            _count = 0;
170
131k
            _raw_data_size = 0;
171
131k
            _data.clear();
172
131k
            _data.reserve(block_size);
173
131k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
131k
                    << "buffer must be naturally-aligned";
175
131k
            _buffer.clear();
176
131k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
131k
            _finished = false;
178
131k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
131k
        });
180
131k
        return Status::OK();
181
131k
    }
_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
18.8k
    Status reset() override {
167
18.8k
        RETURN_IF_CATCH_EXCEPTION({
168
18.8k
            size_t block_size = _options.data_page_size;
169
18.8k
            _count = 0;
170
18.8k
            _raw_data_size = 0;
171
18.8k
            _data.clear();
172
18.8k
            _data.reserve(block_size);
173
18.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
18.8k
                    << "buffer must be naturally-aligned";
175
18.8k
            _buffer.clear();
176
18.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
18.8k
            _finished = false;
178
18.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
18.8k
        });
180
18.8k
        return Status::OK();
181
18.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
166
22.3k
    Status reset() override {
167
22.3k
        RETURN_IF_CATCH_EXCEPTION({
168
22.3k
            size_t block_size = _options.data_page_size;
169
22.3k
            _count = 0;
170
22.3k
            _raw_data_size = 0;
171
22.3k
            _data.clear();
172
22.3k
            _data.reserve(block_size);
173
22.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
22.3k
                    << "buffer must be naturally-aligned";
175
22.3k
            _buffer.clear();
176
22.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
22.3k
            _finished = false;
178
22.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
22.3k
        });
180
22.3k
        return Status::OK();
181
22.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
166
721
    Status reset() override {
167
721
        RETURN_IF_CATCH_EXCEPTION({
168
721
            size_t block_size = _options.data_page_size;
169
721
            _count = 0;
170
721
            _raw_data_size = 0;
171
721
            _data.clear();
172
721
            _data.reserve(block_size);
173
721
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
721
                    << "buffer must be naturally-aligned";
175
721
            _buffer.clear();
176
721
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
721
            _finished = false;
178
721
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
721
        });
180
721
        return Status::OK();
181
721
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
166
75.4k
    Status reset() override {
167
75.4k
        RETURN_IF_CATCH_EXCEPTION({
168
75.4k
            size_t block_size = _options.data_page_size;
169
75.4k
            _count = 0;
170
75.4k
            _raw_data_size = 0;
171
75.4k
            _data.clear();
172
75.4k
            _data.reserve(block_size);
173
75.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
75.4k
                    << "buffer must be naturally-aligned";
175
75.4k
            _buffer.clear();
176
75.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
75.4k
            _finished = false;
178
75.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
75.4k
        });
180
75.5k
        return Status::OK();
181
75.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
166
83.5k
    Status reset() override {
167
83.5k
        RETURN_IF_CATCH_EXCEPTION({
168
83.5k
            size_t block_size = _options.data_page_size;
169
83.5k
            _count = 0;
170
83.5k
            _raw_data_size = 0;
171
83.5k
            _data.clear();
172
83.5k
            _data.reserve(block_size);
173
83.5k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
83.5k
                    << "buffer must be naturally-aligned";
175
83.5k
            _buffer.clear();
176
83.5k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
83.5k
            _finished = false;
178
83.5k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
83.5k
        });
180
83.6k
        return Status::OK();
181
83.5k
    }
_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
14.9k
    Status reset() override {
167
14.9k
        RETURN_IF_CATCH_EXCEPTION({
168
14.9k
            size_t block_size = _options.data_page_size;
169
14.9k
            _count = 0;
170
14.9k
            _raw_data_size = 0;
171
14.9k
            _data.clear();
172
14.9k
            _data.reserve(block_size);
173
14.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
14.9k
                    << "buffer must be naturally-aligned";
175
14.9k
            _buffer.clear();
176
14.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
14.9k
            _finished = false;
178
14.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
14.9k
        });
180
15.4k
        return Status::OK();
181
14.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
166
609
    Status reset() override {
167
609
        RETURN_IF_CATCH_EXCEPTION({
168
609
            size_t block_size = _options.data_page_size;
169
609
            _count = 0;
170
609
            _raw_data_size = 0;
171
609
            _data.clear();
172
609
            _data.reserve(block_size);
173
609
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
609
                    << "buffer must be naturally-aligned";
175
609
            _buffer.clear();
176
609
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
609
            _finished = false;
178
609
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
609
        });
180
609
        return Status::OK();
181
609
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
166
19.5k
    Status reset() override {
167
19.5k
        RETURN_IF_CATCH_EXCEPTION({
168
19.5k
            size_t block_size = _options.data_page_size;
169
19.5k
            _count = 0;
170
19.5k
            _raw_data_size = 0;
171
19.5k
            _data.clear();
172
19.5k
            _data.reserve(block_size);
173
19.5k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
19.5k
                    << "buffer must be naturally-aligned";
175
19.5k
            _buffer.clear();
176
19.5k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
19.5k
            _finished = false;
178
19.5k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
19.5k
        });
180
19.5k
        return Status::OK();
181
19.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
30.1k
    Status reset() override {
167
30.1k
        RETURN_IF_CATCH_EXCEPTION({
168
30.1k
            size_t block_size = _options.data_page_size;
169
30.1k
            _count = 0;
170
30.1k
            _raw_data_size = 0;
171
30.1k
            _data.clear();
172
30.1k
            _data.reserve(block_size);
173
30.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
30.1k
                    << "buffer must be naturally-aligned";
175
30.1k
            _buffer.clear();
176
30.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
30.1k
            _finished = false;
178
30.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
30.1k
        });
180
30.2k
        return Status::OK();
181
30.1k
    }
_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
33.9k
        return Status::OK();
181
33.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Line
Count
Source
166
2.34k
    Status reset() override {
167
2.34k
        RETURN_IF_CATCH_EXCEPTION({
168
2.34k
            size_t block_size = _options.data_page_size;
169
2.34k
            _count = 0;
170
2.34k
            _raw_data_size = 0;
171
2.34k
            _data.clear();
172
2.34k
            _data.reserve(block_size);
173
2.34k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
2.34k
                    << "buffer must be naturally-aligned";
175
2.34k
            _buffer.clear();
176
2.34k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
2.34k
            _finished = false;
178
2.34k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
2.34k
        });
180
2.35k
        return Status::OK();
181
2.34k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
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
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
166
1.35k
    Status reset() override {
167
1.35k
        RETURN_IF_CATCH_EXCEPTION({
168
1.35k
            size_t block_size = _options.data_page_size;
169
1.35k
            _count = 0;
170
1.35k
            _raw_data_size = 0;
171
1.35k
            _data.clear();
172
1.35k
            _data.reserve(block_size);
173
1.35k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.35k
                    << "buffer must be naturally-aligned";
175
1.35k
            _buffer.clear();
176
1.35k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.35k
            _finished = false;
178
1.35k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.35k
        });
180
1.36k
        return Status::OK();
181
1.35k
    }
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.0k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
18.5k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
185
3.22k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
185
716
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
2.15k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
1.17k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
699
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
286
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
185
280
    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.60k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
2.20k
    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
215
    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.14k
    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
404k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
65.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
53.7k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
11.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
38.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
187
14.2k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
65.6k
    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
8.98k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
10.9k
    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
366
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
187
37.9k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
187
41.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
187
603
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
Line
Count
Source
187
7.71k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
187
257
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
187
9.77k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
18.2k
    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.12k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Line
Count
Source
187
635
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
187
632
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
671k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
337k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
55.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
12.3k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
34.6k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
15.1k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
65.5k
            : _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
9.87k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
11.3k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
355
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
37.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
42.2k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
450
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
7.27k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
352
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.76k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
11.9k
            : _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
729
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
726
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
192
193
662k
    OwnedSlice _finish(int final_size_of_type) {
194
662k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
662k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
662k
        int padding_elems = num_elems_after_padding - _count;
199
662k
        int padding_bytes = padding_elems * final_size_of_type;
200
17.9M
        for (int i = 0; i < padding_bytes; i++) {
201
17.2M
            _data.push_back(0);
202
17.2M
        }
203
204
        // reserve enough place for compression
205
662k
        _buffer.resize(
206
662k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
662k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
662k
        int64_t bytes =
210
662k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
662k
                                         num_elems_after_padding, final_size_of_type, 0);
212
662k
        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
662k
        encode_fixed32_le(&_buffer[0], _count);
222
662k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
662k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
662k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
662k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
662k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
662k
        return _buffer.build();
229
662k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
324k
    OwnedSlice _finish(int final_size_of_type) {
194
324k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
324k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
324k
        int padding_elems = num_elems_after_padding - _count;
199
324k
        int padding_bytes = padding_elems * final_size_of_type;
200
6.27M
        for (int i = 0; i < padding_bytes; i++) {
201
5.95M
            _data.push_back(0);
202
5.95M
        }
203
204
        // reserve enough place for compression
205
324k
        _buffer.resize(
206
324k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
324k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
324k
        int64_t bytes =
210
324k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
324k
                                         num_elems_after_padding, final_size_of_type, 0);
212
324k
        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
324k
        encode_fixed32_le(&_buffer[0], _count);
222
324k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
324k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
324k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
324k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
324k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
324k
        return _buffer.build();
229
324k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
53.7k
    OwnedSlice _finish(int final_size_of_type) {
194
53.7k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
53.7k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
53.7k
        int padding_elems = num_elems_after_padding - _count;
199
53.7k
        int padding_bytes = padding_elems * final_size_of_type;
200
344k
        for (int i = 0; i < padding_bytes; i++) {
201
291k
            _data.push_back(0);
202
291k
        }
203
204
        // reserve enough place for compression
205
53.7k
        _buffer.resize(
206
53.7k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
53.7k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
53.7k
        int64_t bytes =
210
53.7k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
53.7k
                                         num_elems_after_padding, final_size_of_type, 0);
212
53.7k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
53.7k
        encode_fixed32_le(&_buffer[0], _count);
222
53.7k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
53.7k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
53.7k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
53.7k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
53.7k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
53.7k
        return _buffer.build();
229
53.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
11.3k
    OwnedSlice _finish(int final_size_of_type) {
194
11.3k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
11.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
11.3k
        int padding_elems = num_elems_after_padding - _count;
199
11.3k
        int padding_bytes = padding_elems * final_size_of_type;
200
120k
        for (int i = 0; i < padding_bytes; i++) {
201
109k
            _data.push_back(0);
202
109k
        }
203
204
        // reserve enough place for compression
205
11.3k
        _buffer.resize(
206
11.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
11.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
11.3k
        int64_t bytes =
210
11.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
11.3k
                                         num_elems_after_padding, final_size_of_type, 0);
212
11.3k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
11.3k
        encode_fixed32_le(&_buffer[0], _count);
222
11.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
11.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
11.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
11.3k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
11.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
11.3k
        return _buffer.build();
229
11.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
38.0k
    OwnedSlice _finish(int final_size_of_type) {
194
38.0k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
38.0k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
38.0k
        int padding_elems = num_elems_after_padding - _count;
199
38.0k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.42M
        for (int i = 0; i < padding_bytes; i++) {
201
1.38M
            _data.push_back(0);
202
1.38M
        }
203
204
        // reserve enough place for compression
205
38.0k
        _buffer.resize(
206
38.0k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
38.0k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
38.0k
        int64_t bytes =
210
38.0k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
38.0k
                                         num_elems_after_padding, final_size_of_type, 0);
212
38.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
38.0k
        encode_fixed32_le(&_buffer[0], _count);
222
38.0k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
38.0k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
38.0k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
38.0k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
38.0k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
38.0k
        return _buffer.build();
229
38.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
14.2k
    OwnedSlice _finish(int final_size_of_type) {
194
14.2k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
14.2k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
14.2k
        int padding_elems = num_elems_after_padding - _count;
199
14.2k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.01M
        for (int i = 0; i < padding_bytes; i++) {
201
999k
            _data.push_back(0);
202
999k
        }
203
204
        // reserve enough place for compression
205
14.2k
        _buffer.resize(
206
14.2k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
14.2k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
14.2k
        int64_t bytes =
210
14.2k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
14.2k
                                         num_elems_after_padding, final_size_of_type, 0);
212
14.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
14.2k
        encode_fixed32_le(&_buffer[0], _count);
222
14.2k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
14.2k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
14.2k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
14.2k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
14.2k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
14.2k
        return _buffer.build();
229
14.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
65.6k
    OwnedSlice _finish(int final_size_of_type) {
194
65.6k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
65.6k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
65.6k
        int padding_elems = num_elems_after_padding - _count;
199
65.6k
        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.6k
        _buffer.resize(
206
65.6k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
65.6k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
65.6k
        int64_t bytes =
210
65.6k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
65.6k
                                         num_elems_after_padding, final_size_of_type, 0);
212
65.6k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
65.6k
        encode_fixed32_le(&_buffer[0], _count);
222
65.6k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
65.6k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
65.6k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
65.6k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
65.6k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
65.6k
        return _buffer.build();
229
65.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
8.98k
    OwnedSlice _finish(int final_size_of_type) {
194
8.98k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
8.98k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
8.98k
        int padding_elems = num_elems_after_padding - _count;
199
8.98k
        int padding_bytes = padding_elems * final_size_of_type;
200
192k
        for (int i = 0; i < padding_bytes; i++) {
201
183k
            _data.push_back(0);
202
183k
        }
203
204
        // reserve enough place for compression
205
8.98k
        _buffer.resize(
206
8.98k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
8.98k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
8.98k
        int64_t bytes =
210
8.98k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
8.98k
                                         num_elems_after_padding, final_size_of_type, 0);
212
8.98k
        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.98k
        encode_fixed32_le(&_buffer[0], _count);
222
8.98k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
8.98k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
8.98k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
8.98k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
8.98k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
8.98k
        return _buffer.build();
229
8.98k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
10.9k
    OwnedSlice _finish(int final_size_of_type) {
194
10.9k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
10.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
10.9k
        int padding_elems = num_elems_after_padding - _count;
199
10.9k
        int padding_bytes = padding_elems * final_size_of_type;
200
444k
        for (int i = 0; i < padding_bytes; i++) {
201
433k
            _data.push_back(0);
202
433k
        }
203
204
        // reserve enough place for compression
205
10.9k
        _buffer.resize(
206
10.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
10.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
10.9k
        int64_t bytes =
210
10.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
10.9k
                                         num_elems_after_padding, final_size_of_type, 0);
212
10.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
10.9k
        encode_fixed32_le(&_buffer[0], _count);
222
10.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
10.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
10.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
10.9k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
10.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
10.9k
        return _buffer.build();
229
10.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
366
    OwnedSlice _finish(int final_size_of_type) {
194
366
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
366
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
366
        int padding_elems = num_elems_after_padding - _count;
199
366
        int padding_bytes = padding_elems * final_size_of_type;
200
5.48k
        for (int i = 0; i < padding_bytes; i++) {
201
5.12k
            _data.push_back(0);
202
5.12k
        }
203
204
        // reserve enough place for compression
205
366
        _buffer.resize(
206
366
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
366
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
366
        int64_t bytes =
210
366
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
366
                                         num_elems_after_padding, final_size_of_type, 0);
212
366
        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
366
        encode_fixed32_le(&_buffer[0], _count);
222
366
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
366
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
366
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
366
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
366
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
366
        return _buffer.build();
229
366
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
193
37.9k
    OwnedSlice _finish(int final_size_of_type) {
194
37.9k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
37.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
37.9k
        int padding_elems = num_elems_after_padding - _count;
199
37.9k
        int padding_bytes = padding_elems * final_size_of_type;
200
807k
        for (int i = 0; i < padding_bytes; i++) {
201
769k
            _data.push_back(0);
202
769k
        }
203
204
        // reserve enough place for compression
205
37.9k
        _buffer.resize(
206
37.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
37.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
37.9k
        int64_t bytes =
210
37.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
37.9k
                                         num_elems_after_padding, final_size_of_type, 0);
212
37.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
37.9k
        encode_fixed32_le(&_buffer[0], _count);
222
37.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
37.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
37.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
37.9k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
37.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
37.9k
        return _buffer.build();
229
37.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
193
41.3k
    OwnedSlice _finish(int final_size_of_type) {
194
41.3k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
41.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
41.3k
        int padding_elems = num_elems_after_padding - _count;
199
41.3k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.72M
        for (int i = 0; i < padding_bytes; i++) {
201
1.68M
            _data.push_back(0);
202
1.68M
        }
203
204
        // reserve enough place for compression
205
41.3k
        _buffer.resize(
206
41.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
41.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
41.3k
        int64_t bytes =
210
41.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
41.3k
                                         num_elems_after_padding, final_size_of_type, 0);
212
41.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
41.3k
        encode_fixed32_le(&_buffer[0], _count);
222
41.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
41.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
41.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
41.3k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
41.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
41.3k
        return _buffer.build();
229
41.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
193
603
    OwnedSlice _finish(int final_size_of_type) {
194
603
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
603
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
603
        int padding_elems = num_elems_after_padding - _count;
199
603
        int padding_bytes = padding_elems * final_size_of_type;
200
13.9k
        for (int i = 0; i < padding_bytes; i++) {
201
13.3k
            _data.push_back(0);
202
13.3k
        }
203
204
        // reserve enough place for compression
205
603
        _buffer.resize(
206
603
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
603
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
603
        int64_t bytes =
210
603
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
603
                                         num_elems_after_padding, final_size_of_type, 0);
212
603
        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
603
        encode_fixed32_le(&_buffer[0], _count);
222
603
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
603
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
603
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
603
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
603
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
603
        return _buffer.build();
229
603
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
Line
Count
Source
193
7.70k
    OwnedSlice _finish(int final_size_of_type) {
194
7.70k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.70k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.70k
        int padding_elems = num_elems_after_padding - _count;
199
7.70k
        int padding_bytes = padding_elems * final_size_of_type;
200
400k
        for (int i = 0; i < padding_bytes; i++) {
201
393k
            _data.push_back(0);
202
393k
        }
203
204
        // reserve enough place for compression
205
7.70k
        _buffer.resize(
206
7.70k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.70k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.70k
        int64_t bytes =
210
7.70k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.70k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.70k
        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.70k
        encode_fixed32_le(&_buffer[0], _count);
222
7.70k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.70k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.70k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.70k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.70k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.70k
        return _buffer.build();
229
7.70k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
193
257
    OwnedSlice _finish(int final_size_of_type) {
194
257
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
257
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
257
        int padding_elems = num_elems_after_padding - _count;
199
257
        int padding_bytes = padding_elems * final_size_of_type;
200
15.9k
        for (int i = 0; i < padding_bytes; i++) {
201
15.6k
            _data.push_back(0);
202
15.6k
        }
203
204
        // reserve enough place for compression
205
257
        _buffer.resize(
206
257
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
257
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
257
        int64_t bytes =
210
257
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
257
                                         num_elems_after_padding, final_size_of_type, 0);
212
257
        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
257
        encode_fixed32_le(&_buffer[0], _count);
222
257
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
257
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
257
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
257
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
257
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
257
        return _buffer.build();
229
257
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
193
9.76k
    OwnedSlice _finish(int final_size_of_type) {
194
9.76k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
9.76k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
9.76k
        int padding_elems = num_elems_after_padding - _count;
199
9.76k
        int padding_bytes = padding_elems * final_size_of_type;
200
118k
        for (int i = 0; i < padding_bytes; i++) {
201
109k
            _data.push_back(0);
202
109k
        }
203
204
        // reserve enough place for compression
205
9.76k
        _buffer.resize(
206
9.76k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
9.76k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
9.76k
        int64_t bytes =
210
9.76k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
9.76k
                                         num_elems_after_padding, final_size_of_type, 0);
212
9.76k
        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.76k
        encode_fixed32_le(&_buffer[0], _count);
222
9.76k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
9.76k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
9.76k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
9.76k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
9.76k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
9.76k
        return _buffer.build();
229
9.76k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
18.2k
    OwnedSlice _finish(int final_size_of_type) {
194
18.2k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
18.2k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
18.2k
        int padding_elems = num_elems_after_padding - _count;
199
18.2k
        int padding_bytes = padding_elems * final_size_of_type;
200
480k
        for (int i = 0; i < padding_bytes; i++) {
201
462k
            _data.push_back(0);
202
462k
        }
203
204
        // reserve enough place for compression
205
18.2k
        _buffer.resize(
206
18.2k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
18.2k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
18.2k
        int64_t bytes =
210
18.2k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
18.2k
                                         num_elems_after_padding, final_size_of_type, 0);
212
18.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
18.2k
        encode_fixed32_le(&_buffer[0], _count);
222
18.2k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
18.2k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
18.2k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
18.2k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
18.2k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
18.2k
        return _buffer.build();
229
18.2k
    }
_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.12k
    OwnedSlice _finish(int final_size_of_type) {
194
1.12k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
1.12k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
1.12k
        int padding_elems = num_elems_after_padding - _count;
199
1.12k
        int padding_bytes = padding_elems * final_size_of_type;
200
176k
        for (int i = 0; i < padding_bytes; i++) {
201
174k
            _data.push_back(0);
202
174k
        }
203
204
        // reserve enough place for compression
205
1.12k
        _buffer.resize(
206
1.12k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
1.12k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
1.12k
        int64_t bytes =
210
1.12k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
1.12k
                                         num_elems_after_padding, final_size_of_type, 0);
212
1.12k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
1.12k
        encode_fixed32_le(&_buffer[0], _count);
222
1.12k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
1.12k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
1.12k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
1.12k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
1.12k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
1.12k
        return _buffer.build();
229
1.12k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Line
Count
Source
193
635
    OwnedSlice _finish(int final_size_of_type) {
194
635
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
635
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
635
        int padding_elems = num_elems_after_padding - _count;
199
635
        int padding_bytes = padding_elems * final_size_of_type;
200
13.0k
        for (int i = 0; i < padding_bytes; i++) {
201
12.3k
            _data.push_back(0);
202
12.3k
        }
203
204
        // reserve enough place for compression
205
635
        _buffer.resize(
206
635
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
635
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
635
        int64_t bytes =
210
635
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
635
                                         num_elems_after_padding, final_size_of_type, 0);
212
635
        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
635
        encode_fixed32_le(&_buffer[0], _count);
222
635
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
635
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
635
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
635
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
635
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
635
        return _buffer.build();
229
635
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
193
632
    OwnedSlice _finish(int final_size_of_type) {
194
632
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
632
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
632
        int padding_elems = num_elems_after_padding - _count;
199
632
        int padding_bytes = padding_elems * final_size_of_type;
200
51.5k
        for (int i = 0; i < padding_bytes; i++) {
201
50.9k
            _data.push_back(0);
202
50.9k
        }
203
204
        // reserve enough place for compression
205
632
        _buffer.resize(
206
632
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
632
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
632
        int64_t bytes =
210
632
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
632
                                         num_elems_after_padding, final_size_of_type, 0);
212
632
        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
632
        encode_fixed32_le(&_buffer[0], _count);
222
632
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
632
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
632
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
632
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
632
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
632
        return _buffer.build();
229
632
    }
230
231
    using CppType = typename TypeTraits<Type>::CppType;
232
233
    CppType cell(int idx) const {
234
        DCHECK_GE(idx, 0);
235
        CppType ret;
236
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
237
        return ret;
238
    }
239
240
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
241
    PageBuilderOptions _options;
242
    uint32_t _count;
243
    uint32_t _remain_element_capacity;
244
    bool _finished;
245
    faststring _data;
246
    faststring _buffer;
247
    uint64_t _raw_data_size = 0;
248
};
249
250
inline Status parse_bit_shuffle_header(const Slice& data, size_t& num_elements,
251
                                       size_t& compressed_size, size_t& num_element_after_padding,
252
1.68M
                                       int& size_of_element) {
253
1.68M
    if (data.size < BITSHUFFLE_PAGE_HEADER_SIZE) {
254
0
        return Status::InternalError("file corruption: invalid data size:{}, header size:{}",
255
0
                                     data.size, BITSHUFFLE_PAGE_HEADER_SIZE);
256
0
    }
257
258
1.68M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
1.68M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
1.68M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
1.68M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
1.68M
    if (num_element_after_padding != ALIGN_UP(num_elements, 8)) {
263
0
        return Status::InternalError(
264
0
                "num of element information corrupted,"
265
0
                " _num_element_after_padding:{}, _num_elements:{}, expected_padding:{},"
266
0
                " compressed_size:{}, size_of_element:{}, data_size:{}",
267
0
                num_element_after_padding, num_elements, ALIGN_UP(num_elements, 8), compressed_size,
268
0
                size_of_element, data.size);
269
0
    }
270
1.68M
    switch (size_of_element) {
271
157k
    case 1:
272
181k
    case 2:
273
183k
    case 3:
274
1.15M
    case 4:
275
1.60M
    case 8:
276
1.60M
    case 12:
277
1.68M
    case 16:
278
1.68M
    case 32:
279
1.68M
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
1.68M
    }
283
1.68M
    return Status::OK();
284
1.68M
}
285
286
template <FieldType Type>
287
class BitShufflePageDecoder : public PageDecoder {
288
public:
289
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
290
1.03M
            : _data(data),
291
1.03M
              _options(options),
292
1.03M
              _parsed(false),
293
1.03M
              _num_elements(0),
294
1.03M
              _num_element_after_padding(0),
295
1.03M
              _size_of_element(0),
296
1.03M
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
507k
            : _data(data),
291
507k
              _options(options),
292
507k
              _parsed(false),
293
507k
              _num_elements(0),
294
507k
              _num_element_after_padding(0),
295
507k
              _size_of_element(0),
296
507k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
95.5k
            : _data(data),
291
95.5k
              _options(options),
292
95.5k
              _parsed(false),
293
95.5k
              _num_elements(0),
294
95.5k
              _num_element_after_padding(0),
295
95.5k
              _size_of_element(0),
296
95.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
14.7k
            : _data(data),
291
14.7k
              _options(options),
292
14.7k
              _parsed(false),
293
14.7k
              _num_elements(0),
294
14.7k
              _num_element_after_padding(0),
295
14.7k
              _size_of_element(0),
296
14.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
48.2k
            : _data(data),
291
48.2k
              _options(options),
292
48.2k
              _parsed(false),
293
48.2k
              _num_elements(0),
294
48.2k
              _num_element_after_padding(0),
295
48.2k
              _size_of_element(0),
296
48.2k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
17.2k
            : _data(data),
291
17.2k
              _options(options),
292
17.2k
              _parsed(false),
293
17.2k
              _num_elements(0),
294
17.2k
              _num_element_after_padding(0),
295
17.2k
              _size_of_element(0),
296
17.2k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
89.8k
            : _data(data),
291
89.8k
              _options(options),
292
89.8k
              _parsed(false),
293
89.8k
              _num_elements(0),
294
89.8k
              _num_element_after_padding(0),
295
89.8k
              _size_of_element(0),
296
89.8k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
11.7k
            : _data(data),
291
11.7k
              _options(options),
292
11.7k
              _parsed(false),
293
11.7k
              _num_elements(0),
294
11.7k
              _num_element_after_padding(0),
295
11.7k
              _size_of_element(0),
296
11.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
18.3k
            : _data(data),
291
18.3k
              _options(options),
292
18.3k
              _parsed(false),
293
18.3k
              _num_elements(0),
294
18.3k
              _num_element_after_padding(0),
295
18.3k
              _size_of_element(0),
296
18.3k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.53k
            : _data(data),
291
1.53k
              _options(options),
292
1.53k
              _parsed(false),
293
1.53k
              _num_elements(0),
294
1.53k
              _num_element_after_padding(0),
295
1.53k
              _size_of_element(0),
296
1.53k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
57.6k
            : _data(data),
291
57.6k
              _options(options),
292
57.6k
              _parsed(false),
293
57.6k
              _num_elements(0),
294
57.6k
              _num_element_after_padding(0),
295
57.6k
              _size_of_element(0),
296
57.6k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
64.7k
            : _data(data),
291
64.7k
              _options(options),
292
64.7k
              _parsed(false),
293
64.7k
              _num_elements(0),
294
64.7k
              _num_element_after_padding(0),
295
64.7k
              _size_of_element(0),
296
64.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
2.18k
            : _data(data),
291
2.18k
              _options(options),
292
2.18k
              _parsed(false),
293
2.18k
              _num_elements(0),
294
2.18k
              _num_element_after_padding(0),
295
2.18k
              _size_of_element(0),
296
2.18k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
15.9k
            : _data(data),
291
15.9k
              _options(options),
292
15.9k
              _parsed(false),
293
15.9k
              _num_elements(0),
294
15.9k
              _num_element_after_padding(0),
295
15.9k
              _size_of_element(0),
296
15.9k
              _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
40.6k
            : _data(data),
291
40.6k
              _options(options),
292
40.6k
              _parsed(false),
293
40.6k
              _num_elements(0),
294
40.6k
              _num_element_after_padding(0),
295
40.6k
              _size_of_element(0),
296
40.6k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
29.9k
            : _data(data),
291
29.9k
              _options(options),
292
29.9k
              _parsed(false),
293
29.9k
              _num_elements(0),
294
29.9k
              _num_element_after_padding(0),
295
29.9k
              _size_of_element(0),
296
29.9k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.75k
            : _data(data),
291
1.75k
              _options(options),
292
1.75k
              _parsed(false),
293
1.75k
              _num_elements(0),
294
1.75k
              _num_element_after_padding(0),
295
1.75k
              _size_of_element(0),
296
1.75k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
946
            : _data(data),
291
946
              _options(options),
292
946
              _parsed(false),
293
946
              _num_elements(0),
294
946
              _num_element_after_padding(0),
295
946
              _size_of_element(0),
296
946
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
979
            : _data(data),
291
979
              _options(options),
292
979
              _parsed(false),
293
979
              _num_elements(0),
294
979
              _num_element_after_padding(0),
295
979
              _size_of_element(0),
296
979
              _cur_index(0) {}
297
298
1.03M
    Status init() override {
299
1.03M
        CHECK(!_parsed);
300
1.03M
        size_t unused;
301
1.03M
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.03M
                                                 _num_element_after_padding, _size_of_element));
303
304
1.03M
        if (_data.size !=
305
1.03M
            _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.03M
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.03M
                     _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.03M
        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.03M
        _parsed = true;
325
1.03M
        return Status::OK();
326
1.03M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
298
505k
    Status init() override {
299
505k
        CHECK(!_parsed);
300
505k
        size_t unused;
301
505k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
505k
                                                 _num_element_after_padding, _size_of_element));
303
304
505k
        if (_data.size !=
305
505k
            _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
505k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
505k
                     _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
505k
        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
505k
        _parsed = true;
325
505k
        return Status::OK();
326
505k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
95.4k
    Status init() override {
299
95.4k
        CHECK(!_parsed);
300
95.4k
        size_t unused;
301
95.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
95.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
95.4k
        if (_data.size !=
305
95.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
95.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
95.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
95.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
95.4k
        _parsed = true;
325
95.4k
        return Status::OK();
326
95.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
14.7k
    Status init() override {
299
14.7k
        CHECK(!_parsed);
300
14.7k
        size_t unused;
301
14.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
14.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
14.7k
        if (_data.size !=
305
14.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
14.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
14.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
14.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
14.7k
        _parsed = true;
325
14.7k
        return Status::OK();
326
14.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
48.1k
    Status init() override {
299
48.1k
        CHECK(!_parsed);
300
48.1k
        size_t unused;
301
48.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
48.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
48.1k
        if (_data.size !=
305
48.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
48.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
48.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
48.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
48.1k
        _parsed = true;
325
48.1k
        return Status::OK();
326
48.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
298
17.1k
    Status init() override {
299
17.1k
        CHECK(!_parsed);
300
17.1k
        size_t unused;
301
17.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
17.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
17.1k
        if (_data.size !=
305
17.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
17.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
17.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
17.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
17.1k
        _parsed = true;
325
17.1k
        return Status::OK();
326
17.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
298
89.7k
    Status init() override {
299
89.7k
        CHECK(!_parsed);
300
89.7k
        size_t unused;
301
89.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
89.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
89.7k
        if (_data.size !=
305
89.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
89.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
89.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
89.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
89.7k
        _parsed = true;
325
89.7k
        return Status::OK();
326
89.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
298
11.7k
    Status init() override {
299
11.7k
        CHECK(!_parsed);
300
11.7k
        size_t unused;
301
11.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
11.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
11.7k
        if (_data.size !=
305
11.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
11.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
11.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
11.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
11.7k
        _parsed = true;
325
11.7k
        return Status::OK();
326
11.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
298
18.3k
    Status init() override {
299
18.3k
        CHECK(!_parsed);
300
18.3k
        size_t unused;
301
18.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
18.3k
                                                 _num_element_after_padding, _size_of_element));
303
304
18.3k
        if (_data.size !=
305
18.3k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
18.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
18.3k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
18.3k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
18.3k
        _parsed = true;
325
18.3k
        return Status::OK();
326
18.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
1.53k
    Status init() override {
299
1.53k
        CHECK(!_parsed);
300
1.53k
        size_t unused;
301
1.53k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.53k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.53k
        if (_data.size !=
305
1.53k
            _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.53k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.53k
                     _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.53k
        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.53k
        _parsed = true;
325
1.53k
        return Status::OK();
326
1.53k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
57.6k
    Status init() override {
299
57.6k
        CHECK(!_parsed);
300
57.6k
        size_t unused;
301
57.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
57.6k
                                                 _num_element_after_padding, _size_of_element));
303
304
57.6k
        if (_data.size !=
305
57.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
57.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
57.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
57.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
57.6k
        _parsed = true;
325
57.6k
        return Status::OK();
326
57.6k
    }
_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.18k
    Status init() override {
299
2.18k
        CHECK(!_parsed);
300
2.18k
        size_t unused;
301
2.18k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
2.18k
                                                 _num_element_after_padding, _size_of_element));
303
304
2.18k
        if (_data.size !=
305
2.18k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
2.18k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
2.18k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
2.18k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
2.18k
        _parsed = true;
325
2.18k
        return Status::OK();
326
2.18k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
298
15.9k
    Status init() override {
299
15.9k
        CHECK(!_parsed);
300
15.9k
        size_t unused;
301
15.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
15.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
15.9k
        if (_data.size !=
305
15.9k
            _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.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
15.9k
                     _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.9k
        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.9k
        _parsed = true;
325
15.9k
        return Status::OK();
326
15.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
298
1.38k
    Status init() override {
299
1.38k
        CHECK(!_parsed);
300
1.38k
        size_t unused;
301
1.38k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.38k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.38k
        if (_data.size !=
305
1.38k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.38k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.38k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.38k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.38k
        _parsed = true;
325
1.38k
        return Status::OK();
326
1.38k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
298
15.5k
    Status init() override {
299
15.5k
        CHECK(!_parsed);
300
15.5k
        size_t unused;
301
15.5k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
15.5k
                                                 _num_element_after_padding, _size_of_element));
303
304
15.5k
        if (_data.size !=
305
15.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
15.5k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
15.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
15.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
15.5k
        _parsed = true;
325
15.5k
        return Status::OK();
326
15.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
298
40.6k
    Status init() override {
299
40.6k
        CHECK(!_parsed);
300
40.6k
        size_t unused;
301
40.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
40.6k
                                                 _num_element_after_padding, _size_of_element));
303
304
40.6k
        if (_data.size !=
305
40.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
40.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
40.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
40.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
40.6k
        _parsed = true;
325
40.6k
        return Status::OK();
326
40.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
298
29.9k
    Status init() override {
299
29.9k
        CHECK(!_parsed);
300
29.9k
        size_t unused;
301
29.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
29.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
29.9k
        if (_data.size !=
305
29.9k
            _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.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
29.9k
                     _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.9k
        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.9k
        _parsed = true;
325
29.9k
        return Status::OK();
326
29.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
298
1.75k
    Status init() override {
299
1.75k
        CHECK(!_parsed);
300
1.75k
        size_t unused;
301
1.75k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.75k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.75k
        if (_data.size !=
305
1.75k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.75k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.75k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.75k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.75k
        _parsed = true;
325
1.75k
        return Status::OK();
326
1.75k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
298
944
    Status init() override {
299
944
        CHECK(!_parsed);
300
944
        size_t unused;
301
944
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
944
                                                 _num_element_after_padding, _size_of_element));
303
304
944
        if (_data.size !=
305
944
            _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
944
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
944
                     _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
944
        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
944
        _parsed = true;
325
944
        return Status::OK();
326
944
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
298
976
    Status init() override {
299
976
        CHECK(!_parsed);
300
976
        size_t unused;
301
976
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
976
                                                 _num_element_after_padding, _size_of_element));
303
304
976
        if (_data.size !=
305
976
            _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
976
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
976
                     _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
976
        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
976
        _parsed = true;
325
976
        return Status::OK();
326
976
    }
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
2.46M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
2.46M
        if (_num_elements == 0) [[unlikely]] {
337
8.63k
            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
8.63k
        }
342
343
2.46M
        DCHECK_LE(pos, _num_elements);
344
2.46M
        _cur_index = pos;
345
2.46M
        return Status::OK();
346
2.46M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.21M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
1.21M
        if (_num_elements == 0) [[unlikely]] {
337
4.53k
            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.53k
        }
342
343
1.21M
        DCHECK_LE(pos, _num_elements);
344
1.21M
        _cur_index = pos;
345
1.21M
        return Status::OK();
346
1.21M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
63.4k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
63.4k
        if (_num_elements == 0) [[unlikely]] {
337
440
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
440
        }
342
343
63.4k
        DCHECK_LE(pos, _num_elements);
344
63.4k
        _cur_index = pos;
345
63.4k
        return Status::OK();
346
63.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
2.14k
    Status seek_to_position_in_page(size_t pos) override {
335
2.14k
        DCHECK(_parsed) << "Must call init()";
336
2.14k
        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
2.14k
        DCHECK_LE(pos, _num_elements);
344
2.14k
        _cur_index = pos;
345
2.14k
        return Status::OK();
346
2.14k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
47.5k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
47.5k
        if (_num_elements == 0) [[unlikely]] {
337
663
            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
663
        }
342
343
47.5k
        DCHECK_LE(pos, _num_elements);
344
47.5k
        _cur_index = pos;
345
47.5k
        return Status::OK();
346
47.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
334
4.92k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
4.92k
        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.92k
        DCHECK_LE(pos, _num_elements);
344
4.92k
        _cur_index = pos;
345
4.92k
        return Status::OK();
346
4.92k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
334
13.8k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
13.8k
        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
13.8k
        DCHECK_LE(pos, _num_elements);
344
13.8k
        _cur_index = pos;
345
13.8k
        return Status::OK();
346
13.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
855
    Status seek_to_position_in_page(size_t pos) override {
335
855
        DCHECK(_parsed) << "Must call init()";
336
855
        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
855
        DCHECK_LE(pos, _num_elements);
344
855
        _cur_index = pos;
345
855
        return Status::OK();
346
855
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
334
3.14k
    Status seek_to_position_in_page(size_t pos) override {
335
3.14k
        DCHECK(_parsed) << "Must call init()";
336
3.14k
        if (_num_elements == 0) [[unlikely]] {
337
6
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
6
        }
342
343
3.14k
        DCHECK_LE(pos, _num_elements);
344
3.14k
        _cur_index = pos;
345
3.14k
        return Status::OK();
346
3.14k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
334
213k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
213k
        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
213k
        DCHECK_LE(pos, _num_elements);
344
213k
        _cur_index = pos;
345
213k
        return Status::OK();
346
213k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
334
494k
    Status seek_to_position_in_page(size_t pos) override {
335
494k
        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
52.5k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
52.5k
        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
52.5k
        DCHECK_LE(pos, _num_elements);
344
52.5k
        _cur_index = pos;
345
52.5k
        return Status::OK();
346
52.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
201k
    Status seek_to_position_in_page(size_t pos) override {
335
201k
        DCHECK(_parsed) << "Must call init()";
336
201k
        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
201k
        DCHECK_LE(pos, _num_elements);
344
201k
        _cur_index = pos;
345
201k
        return Status::OK();
346
201k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
334
6.92k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
6.92k
        if (_num_elements == 0) [[unlikely]] {
337
351
            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
351
        }
342
343
6.92k
        DCHECK_LE(pos, _num_elements);
344
6.92k
        _cur_index = pos;
345
6.92k
        return Status::OK();
346
6.92k
    }
_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
865
    Status seek_to_position_in_page(size_t pos) override {
335
865
        DCHECK(_parsed) << "Must call init()";
336
865
        if (_num_elements == 0) [[unlikely]] {
337
25
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
25
        }
342
343
865
        DCHECK_LE(pos, _num_elements);
344
865
        _cur_index = pos;
345
865
        return Status::OK();
346
865
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
334
19.0k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
19.0k
        if (_num_elements == 0) [[unlikely]] {
337
1.81k
            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.81k
        }
342
343
19.0k
        DCHECK_LE(pos, _num_elements);
344
19.0k
        _cur_index = pos;
345
19.0k
        return Status::OK();
346
19.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
584
            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
584
        }
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.98k
    Status seek_to_position_in_page(size_t pos) override {
335
1.98k
        DCHECK(_parsed) << "Must call init()";
336
1.98k
        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.98k
        DCHECK_LE(pos, _num_elements);
344
1.98k
        _cur_index = pos;
345
1.98k
        return Status::OK();
346
1.98k
    }
_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
1.76M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.76M
        DCHECK(_parsed);
389
1.76M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.76M
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.76M
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.76M
        *n = max_fetch;
398
1.76M
        if constexpr (forward_index) {
399
1.57M
            _cur_index += max_fetch;
400
1.57M
        }
401
402
1.76M
        return Status::OK();
403
1.76M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
599k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
599k
        DCHECK(_parsed);
389
599k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
599k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
599k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
599k
        *n = max_fetch;
398
599k
        if constexpr (forward_index) {
399
599k
            _cur_index += max_fetch;
400
599k
        }
401
402
599k
        return Status::OK();
403
599k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
191k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
191k
        DCHECK(_parsed);
389
191k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
191k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
191k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
191k
        *n = max_fetch;
398
191k
        if constexpr (forward_index) {
399
191k
            _cur_index += max_fetch;
400
191k
        }
401
402
191k
        return Status::OK();
403
191k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
16.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
16.4k
        DCHECK(_parsed);
389
16.4k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
16.4k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
16.4k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
16.4k
        *n = max_fetch;
398
16.4k
        if constexpr (forward_index) {
399
16.4k
            _cur_index += max_fetch;
400
16.4k
        }
401
402
16.4k
        return Status::OK();
403
16.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
66.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
66.8k
        DCHECK(_parsed);
389
66.8k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
66.8k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
66.8k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
66.8k
        *n = max_fetch;
398
66.8k
        if constexpr (forward_index) {
399
66.8k
            _cur_index += max_fetch;
400
66.8k
        }
401
402
66.8k
        return Status::OK();
403
66.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
18.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
18.6k
        DCHECK(_parsed);
389
18.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
18.6k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
18.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
18.6k
        *n = max_fetch;
398
18.6k
        if constexpr (forward_index) {
399
18.6k
            _cur_index += max_fetch;
400
18.6k
        }
401
402
18.6k
        return Status::OK();
403
18.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
148k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
148k
        DCHECK(_parsed);
389
148k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
148k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
148k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
148k
        *n = max_fetch;
398
148k
        if constexpr (forward_index) {
399
148k
            _cur_index += max_fetch;
400
148k
        }
401
402
148k
        return Status::OK();
403
148k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
195k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
195k
        DCHECK(_parsed);
389
195k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
195k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
195k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
195k
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
195k
        return Status::OK();
403
195k
    }
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
10.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
10.5k
        DCHECK(_parsed);
389
10.5k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
10.5k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
10.5k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
10.5k
        *n = max_fetch;
398
10.5k
        if constexpr (forward_index) {
399
10.5k
            _cur_index += max_fetch;
400
10.5k
        }
401
402
10.5k
        return Status::OK();
403
10.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
15.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
15.7k
        DCHECK(_parsed);
389
15.7k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
15.7k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
15.7k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
15.7k
        *n = max_fetch;
398
15.7k
        if constexpr (forward_index) {
399
15.7k
            _cur_index += max_fetch;
400
15.7k
        }
401
402
15.7k
        return Status::OK();
403
15.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.29k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.29k
        DCHECK(_parsed);
389
3.29k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.29k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.29k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.29k
        *n = max_fetch;
398
3.29k
        if constexpr (forward_index) {
399
3.29k
            _cur_index += max_fetch;
400
3.29k
        }
401
402
3.29k
        return Status::OK();
403
3.29k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
359k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
359k
        DCHECK(_parsed);
389
359k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
359k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
359k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
359k
        *n = max_fetch;
398
359k
        if constexpr (forward_index) {
399
359k
            _cur_index += max_fetch;
400
359k
        }
401
402
359k
        return Status::OK();
403
359k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
64.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
64.7k
        DCHECK(_parsed);
389
64.7k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
64.7k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
64.7k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
64.7k
        *n = max_fetch;
398
64.7k
        if constexpr (forward_index) {
399
64.7k
            _cur_index += max_fetch;
400
64.7k
        }
401
402
64.7k
        return Status::OK();
403
64.7k
    }
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.04k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.04k
        DCHECK(_parsed);
389
1.04k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.04k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.04k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.04k
        *n = max_fetch;
398
1.04k
        if constexpr (forward_index) {
399
1.04k
            _cur_index += max_fetch;
400
1.04k
        }
401
402
1.04k
        return Status::OK();
403
1.04k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
8.10k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
8.10k
        DCHECK(_parsed);
389
8.10k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
8.10k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
8.10k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
8.10k
        *n = max_fetch;
398
8.10k
        if constexpr (forward_index) {
399
8.10k
            _cur_index += max_fetch;
400
8.10k
        }
401
402
8.10k
        return Status::OK();
403
8.10k
    }
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.26k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.26k
        DCHECK(_parsed);
389
1.26k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.26k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.26k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.26k
        *n = max_fetch;
398
1.26k
        if constexpr (forward_index) {
399
1.26k
            _cur_index += max_fetch;
400
1.26k
        }
401
402
1.26k
        return Status::OK();
403
1.26k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
9.86k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
9.86k
        DCHECK(_parsed);
389
9.86k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
9.86k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
9.86k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
9.86k
        *n = max_fetch;
398
9.86k
        if constexpr (forward_index) {
399
9.86k
            _cur_index += max_fetch;
400
9.86k
        }
401
402
9.86k
        return Status::OK();
403
9.86k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
29.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
29.5k
        DCHECK(_parsed);
389
29.5k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
29.5k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
29.5k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
29.5k
        *n = max_fetch;
398
29.5k
        if constexpr (forward_index) {
399
29.5k
            _cur_index += max_fetch;
400
29.5k
        }
401
402
29.5k
        return Status::OK();
403
29.5k
    }
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.19k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.19k
        DCHECK(_parsed);
389
3.19k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.19k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.19k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.19k
        *n = max_fetch;
398
3.19k
        if constexpr (forward_index) {
399
3.19k
            _cur_index += max_fetch;
400
3.19k
        }
401
402
3.19k
        return Status::OK();
403
3.19k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
660
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
660
        DCHECK(_parsed);
389
660
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
660
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
660
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
660
        *n = max_fetch;
398
660
        if constexpr (forward_index) {
399
660
            _cur_index += max_fetch;
400
660
        }
401
402
660
        return Status::OK();
403
660
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
678
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
678
        DCHECK(_parsed);
389
679
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
678
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
678
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
678
        *n = max_fetch;
398
678
        if constexpr (forward_index) {
399
678
            _cur_index += max_fetch;
400
678
        }
401
402
678
        return Status::OK();
403
678
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
404
405
1.57M
    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
598k
    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
191k
    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
16.4k
    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
66.8k
    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
18.6k
    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
148k
    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
10.5k
    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
15.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
3.29k
    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
359k
    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
64.7k
    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.04k
    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
8.10k
    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
9.86k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
29.5k
    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.19k
    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
661
    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
679
    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
305k
                          MutableColumnPtr& dst) override {
409
305k
        DCHECK(_parsed);
410
305k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
305k
        auto total = *n;
416
305k
        auto read_count = 0;
417
305k
        _buffer.resize(total);
418
101M
        for (size_t i = 0; i < total; ++i) {
419
101M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
101M
            if (UNLIKELY(ord >= _num_elements)) {
421
12.6k
                break;
422
12.6k
            }
423
424
101M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
101M
        }
426
427
305k
        if (LIKELY(read_count > 0)) {
428
305k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
305k
        }
430
431
305k
        *n = read_count;
432
305k
        return Status::OK();
433
305k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
79.6k
                          MutableColumnPtr& dst) override {
409
79.6k
        DCHECK(_parsed);
410
79.6k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
79.6k
        auto total = *n;
416
79.6k
        auto read_count = 0;
417
79.6k
        _buffer.resize(total);
418
34.0M
        for (size_t i = 0; i < total; ++i) {
419
34.0M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
34.0M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.77k
                break;
422
1.77k
            }
423
424
34.0M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
34.0M
        }
426
427
79.6k
        if (LIKELY(read_count > 0)) {
428
79.6k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
79.6k
        }
430
431
79.6k
        *n = read_count;
432
79.6k
        return Status::OK();
433
79.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
17.8k
                          MutableColumnPtr& dst) override {
409
17.8k
        DCHECK(_parsed);
410
17.8k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
17.8k
        auto total = *n;
416
17.8k
        auto read_count = 0;
417
17.8k
        _buffer.resize(total);
418
755k
        for (size_t i = 0; i < total; ++i) {
419
737k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
737k
            if (UNLIKELY(ord >= _num_elements)) {
421
8
                break;
422
8
            }
423
424
737k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
737k
        }
426
427
17.8k
        if (LIKELY(read_count > 0)) {
428
17.8k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
17.8k
        }
430
431
17.8k
        *n = read_count;
432
17.8k
        return Status::OK();
433
17.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
5.90k
                          MutableColumnPtr& dst) override {
409
5.90k
        DCHECK(_parsed);
410
5.90k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
5.90k
        auto total = *n;
416
5.90k
        auto read_count = 0;
417
5.90k
        _buffer.resize(total);
418
51.5k
        for (size_t i = 0; i < total; ++i) {
419
45.6k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
45.6k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
45.6k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
45.6k
        }
426
427
5.90k
        if (LIKELY(read_count > 0)) {
428
5.90k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
5.90k
        }
430
431
5.90k
        *n = read_count;
432
5.90k
        return Status::OK();
433
5.90k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
30.0k
                          MutableColumnPtr& dst) override {
409
30.0k
        DCHECK(_parsed);
410
30.0k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
30.0k
        auto total = *n;
416
30.0k
        auto read_count = 0;
417
30.0k
        _buffer.resize(total);
418
11.7M
        for (size_t i = 0; i < total; ++i) {
419
11.7M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
11.7M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.60k
                break;
422
1.60k
            }
423
424
11.7M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
11.7M
        }
426
427
30.0k
        if (LIKELY(read_count > 0)) {
428
30.0k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
30.0k
        }
430
431
30.0k
        *n = read_count;
432
30.0k
        return Status::OK();
433
30.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
7.09k
                          MutableColumnPtr& dst) override {
409
7.09k
        DCHECK(_parsed);
410
7.09k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
7.09k
        auto total = *n;
416
7.09k
        auto read_count = 0;
417
7.09k
        _buffer.resize(total);
418
16.6k
        for (size_t i = 0; i < total; ++i) {
419
9.56k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.56k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
9.56k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.56k
        }
426
427
7.09k
        if (LIKELY(read_count > 0)) {
428
7.09k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
7.09k
        }
430
431
7.09k
        *n = read_count;
432
7.09k
        return Status::OK();
433
7.09k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
29.0k
                          MutableColumnPtr& dst) override {
409
29.0k
        DCHECK(_parsed);
410
29.0k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
29.0k
        auto total = *n;
416
29.0k
        auto read_count = 0;
417
29.0k
        _buffer.resize(total);
418
707k
        for (size_t i = 0; i < total; ++i) {
419
678k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
678k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
678k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
678k
        }
426
427
29.0k
        if (LIKELY(read_count > 0)) {
428
29.0k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
29.0k
        }
430
431
29.0k
        *n = read_count;
432
29.0k
        return Status::OK();
433
29.0k
    }
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.87k
                          MutableColumnPtr& dst) override {
409
4.87k
        DCHECK(_parsed);
410
4.87k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.87k
        auto total = *n;
416
4.87k
        auto read_count = 0;
417
4.87k
        _buffer.resize(total);
418
16.2k
        for (size_t i = 0; i < total; ++i) {
419
11.3k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
11.3k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
11.3k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
11.3k
        }
426
427
4.87k
        if (LIKELY(read_count > 0)) {
428
4.87k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.87k
        }
430
431
4.87k
        *n = read_count;
432
4.87k
        return Status::OK();
433
4.87k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
8.47k
                          MutableColumnPtr& dst) override {
409
8.47k
        DCHECK(_parsed);
410
8.47k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
8.47k
        auto total = *n;
416
8.47k
        auto read_count = 0;
417
8.47k
        _buffer.resize(total);
418
3.09M
        for (size_t i = 0; i < total; ++i) {
419
3.08M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
3.08M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.24k
                break;
422
1.24k
            }
423
424
3.08M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
3.08M
        }
426
427
8.47k
        if (LIKELY(read_count > 0)) {
428
8.47k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
8.47k
        }
430
431
8.47k
        *n = read_count;
432
8.47k
        return Status::OK();
433
8.47k
    }
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.36k
                          MutableColumnPtr& dst) override {
409
1.36k
        DCHECK(_parsed);
410
1.36k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.36k
        auto total = *n;
416
1.36k
        auto read_count = 0;
417
1.36k
        _buffer.resize(total);
418
480k
        for (size_t i = 0; i < total; ++i) {
419
479k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
479k
            if (UNLIKELY(ord >= _num_elements)) {
421
10
                break;
422
10
            }
423
424
479k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
479k
        }
426
427
1.36k
        if (LIKELY(read_count > 0)) {
428
1.36k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.36k
        }
430
431
1.36k
        *n = read_count;
432
1.36k
        return Status::OK();
433
1.36k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_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
6.56M
        for (size_t i = 0; i < total; ++i) {
419
6.53M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
6.53M
            if (UNLIKELY(ord >= _num_elements)) {
421
743
                break;
422
743
            }
423
424
6.53M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
6.53M
        }
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
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
31.3k
                          MutableColumnPtr& dst) override {
409
31.3k
        DCHECK(_parsed);
410
31.3k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
31.3k
        auto total = *n;
416
31.3k
        auto read_count = 0;
417
31.3k
        _buffer.resize(total);
418
9.93M
        for (size_t i = 0; i < total; ++i) {
419
9.90M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.90M
            if (UNLIKELY(ord >= _num_elements)) {
421
183
                break;
422
183
            }
423
424
9.90M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.90M
        }
426
427
31.3k
        if (LIKELY(read_count > 0)) {
428
31.3k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
31.3k
        }
430
431
31.3k
        *n = read_count;
432
31.3k
        return Status::OK();
433
31.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1.71k
                          MutableColumnPtr& dst) override {
409
1.71k
        DCHECK(_parsed);
410
1.71k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.71k
        auto total = *n;
416
1.71k
        auto read_count = 0;
417
1.71k
        _buffer.resize(total);
418
481k
        for (size_t i = 0; i < total; ++i) {
419
480k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
480k
            if (UNLIKELY(ord >= _num_elements)) {
421
244
                break;
422
244
            }
423
424
480k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
480k
        }
426
427
1.71k
        if (LIKELY(read_count > 0)) {
428
1.71k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.71k
        }
430
431
1.71k
        *n = read_count;
432
1.71k
        return Status::OK();
433
1.71k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
12.5k
                          MutableColumnPtr& dst) override {
409
12.5k
        DCHECK(_parsed);
410
12.5k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
12.5k
        auto total = *n;
416
12.5k
        auto read_count = 0;
417
12.5k
        _buffer.resize(total);
418
26.6k
        for (size_t i = 0; i < total; ++i) {
419
14.0k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.0k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
14.0k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.0k
        }
426
427
12.5k
        if (LIKELY(read_count > 0)) {
428
12.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
12.5k
        }
430
431
12.5k
        *n = read_count;
432
12.5k
        return Status::OK();
433
12.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
141
                          MutableColumnPtr& dst) override {
409
141
        DCHECK(_parsed);
410
141
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
141
        auto total = *n;
416
141
        auto read_count = 0;
417
141
        _buffer.resize(total);
418
287
        for (size_t i = 0; i < total; ++i) {
419
146
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
146
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
146
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
146
        }
426
427
141
        if (LIKELY(read_count > 0)) {
428
141
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
141
        }
430
431
141
        *n = read_count;
432
141
        return Status::OK();
433
141
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4.57k
                          MutableColumnPtr& dst) override {
409
4.57k
        DCHECK(_parsed);
410
4.57k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.57k
        auto total = *n;
416
4.57k
        auto read_count = 0;
417
4.57k
        _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.57k
        if (LIKELY(read_count > 0)) {
428
4.57k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.57k
        }
430
431
4.57k
        *n = read_count;
432
4.57k
        return Status::OK();
433
4.57k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
27.2k
                          MutableColumnPtr& dst) override {
409
27.2k
        DCHECK(_parsed);
410
27.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
27.2k
        auto total = *n;
416
27.2k
        auto read_count = 0;
417
27.2k
        _buffer.resize(total);
418
24.3M
        for (size_t i = 0; i < total; ++i) {
419
24.3M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
24.3M
            if (UNLIKELY(ord >= _num_elements)) {
421
6.09k
                break;
422
6.09k
            }
423
424
24.3M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
24.3M
        }
426
427
27.2k
        if (LIKELY(read_count > 0)) {
428
27.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
27.2k
        }
430
431
27.2k
        *n = read_count;
432
27.2k
        return Status::OK();
433
27.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.2k
                          MutableColumnPtr& dst) override {
409
13.2k
        DCHECK(_parsed);
410
13.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.2k
        auto total = *n;
416
13.2k
        auto read_count = 0;
417
13.2k
        _buffer.resize(total);
418
8.90M
        for (size_t i = 0; i < total; ++i) {
419
8.89M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
8.89M
            if (UNLIKELY(ord >= _num_elements)) {
421
723
                break;
422
723
            }
423
424
8.89M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
8.89M
        }
426
427
13.2k
        if (LIKELY(read_count > 0)) {
428
13.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.2k
        }
430
431
13.2k
        *n = read_count;
432
13.2k
        return Status::OK();
433
13.2k
    }
_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
289
                          MutableColumnPtr& dst) override {
409
289
        DCHECK(_parsed);
410
289
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
289
        auto total = *n;
416
289
        auto read_count = 0;
417
289
        _buffer.resize(total);
418
823
        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
289
        *n = read_count;
432
289
        return Status::OK();
433
289
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
322
                          MutableColumnPtr& dst) override {
409
322
        DCHECK(_parsed);
410
322
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
322
        auto total = *n;
416
322
        auto read_count = 0;
417
322
        _buffer.resize(total);
418
1.15k
        for (size_t i = 0; i < total; ++i) {
419
837
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
837
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
837
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
837
        }
426
427
322
        if (LIKELY(read_count > 0)) {
428
322
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
322
        }
430
431
322
        *n = read_count;
432
322
        return Status::OK();
433
322
    }
434
435
195k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
195k
        return next_batch<false>(n, dst);
437
195k
    }
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
195k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
195k
        return next_batch<false>(n, dst);
437
195k
    }
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
1.56M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
768k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
441
500
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
441
266
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
9.57k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
441
339
    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
250
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
385
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
441
210k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
441
227k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
441
26.4k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
441
199k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Line
Count
Source
441
1.05k
    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.45k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
441
2.44k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
441
113k
    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
39
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
Line
Count
Source
441
44
    size_t current_index() const override { return _cur_index; }
442
443
103M
    char* get_data(size_t index) const {
444
103M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
103M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
35.0M
    char* get_data(size_t index) const {
444
35.0M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
35.0M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
929k
    char* get_data(size_t index) const {
444
929k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
929k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
443
62.0k
    char* get_data(size_t index) const {
444
62.0k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
62.0k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
443
11.8M
    char* get_data(size_t index) const {
444
11.8M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
11.8M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
28.1k
    char* get_data(size_t index) const {
444
28.1k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
28.1k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
1.02M
    char* get_data(size_t index) const {
444
1.02M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.02M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
21.9k
    char* get_data(size_t index) const {
444
21.9k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
21.9k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
3.09M
    char* get_data(size_t index) const {
444
3.09M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
3.09M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
482k
    char* get_data(size_t index) const {
444
482k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
482k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
6.89M
    char* get_data(size_t index) const {
444
6.89M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
6.89M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
443
9.96M
    char* get_data(size_t index) const {
444
9.96M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.96M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
443
481k
    char* get_data(size_t index) const {
444
481k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
481k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
443
22.1k
    char* get_data(size_t index) const {
444
22.1k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
22.1k
    }
_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.2k
    char* get_data(size_t index) const {
444
24.2k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
24.2k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
443
24.3M
    char* get_data(size_t index) const {
444
24.3M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
24.3M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
8.91M
    char* get_data(size_t index) const {
444
8.91M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
8.91M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
443
5.00k
    char* get_data(size_t index) const {
444
5.00k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
5.00k
    }
_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.51k
    char* get_data(size_t index) const {
444
1.51k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.51k
    }
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