Coverage Report

Created: 2026-08-27 18:29

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
698k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
335k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
45.6k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
8.93k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
86.6k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
11.8k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
95
66.4k
    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
5.88k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
95
7.23k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
351
    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.1k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
451
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
95
7.61k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
342
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
95
9.68k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
95
12.0k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
95
16.9k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
95
1.22k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
95
721
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
95
720
    Status init() override { return reset(); }
96
97
141M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
140M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
47.9k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
11.4k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
271k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
11.8k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
66.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
5.78k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
97
8.32k
    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
368
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
45.5k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
41.9k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
97
514
    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
252
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
97
5.16k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
25.8k
    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
627
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
97
640
    bool is_page_full() override { return _remain_element_capacity == 0; }
98
99
1.24M
    Status add(const uint8_t* vals, size_t* count) override {
100
1.24M
        return add_internal<false>(vals, count);
101
1.24M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
99
675k
    Status add(const uint8_t* vals, size_t* count) override {
100
675k
        return add_internal<false>(vals, count);
101
675k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
47.9k
    Status add(const uint8_t* vals, size_t* count) override {
100
47.9k
        return add_internal<false>(vals, count);
101
47.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
11.4k
    Status add(const uint8_t* vals, size_t* count) override {
100
11.4k
        return add_internal<false>(vals, count);
101
11.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
271k
    Status add(const uint8_t* vals, size_t* count) override {
100
271k
        return add_internal<false>(vals, count);
101
271k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
11.8k
    Status add(const uint8_t* vals, size_t* count) override {
100
11.8k
        return add_internal<false>(vals, count);
101
11.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
66.7k
    Status add(const uint8_t* vals, size_t* count) override {
100
66.7k
        return add_internal<false>(vals, count);
101
66.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
99
5.78k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.78k
        return add_internal<false>(vals, count);
101
5.78k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
99
8.32k
    Status add(const uint8_t* vals, size_t* count) override {
100
8.32k
        return add_internal<false>(vals, count);
101
8.32k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
368
    Status add(const uint8_t* vals, size_t* count) override {
100
368
        return add_internal<false>(vals, count);
101
368
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
45.5k
    Status add(const uint8_t* vals, size_t* count) override {
100
45.5k
        return add_internal<false>(vals, count);
101
45.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
41.9k
    Status add(const uint8_t* vals, size_t* count) override {
100
41.9k
        return add_internal<false>(vals, count);
101
41.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
99
514
    Status add(const uint8_t* vals, size_t* count) override {
100
514
        return add_internal<false>(vals, count);
101
514
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
Line
Count
Source
99
7.61k
    Status add(const uint8_t* vals, size_t* count) override {
100
7.61k
        return add_internal<false>(vals, count);
101
7.61k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
252
    Status add(const uint8_t* vals, size_t* count) override {
100
252
        return add_internal<false>(vals, count);
101
252
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
99
5.16k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.16k
        return add_internal<false>(vals, count);
101
5.16k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
25.8k
    Status add(const uint8_t* vals, size_t* count) override {
100
25.8k
        return add_internal<false>(vals, count);
101
25.8k
    }
_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
627
    Status add(const uint8_t* vals, size_t* count) override {
100
627
        return add_internal<false>(vals, count);
101
627
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
99
640
    Status add(const uint8_t* vals, size_t* count) override {
100
640
        return add_internal<false>(vals, count);
101
640
    }
102
103
140M
    Status single_add(const uint8_t* vals, size_t* count) {
104
140M
        return add_internal<true>(vals, count);
105
140M
    }
106
107
    template <bool single>
108
138M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
138M
        DCHECK(!_finished);
110
138M
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
138M
        uint32_t to_add = cast_set<UInt32>(
126
138M
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
138M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
138M
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
138M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
141M
        _count += to_add;
134
141M
        _remain_element_capacity -= to_add;
135
141M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
141M
        *num_written = to_add;
138
141M
        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
140M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
140M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
140M
                        *reinterpret_cast<const uint32_t*>(vals);
149
140M
                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
140M
        }
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
141M
        return Status::OK();
159
138M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
675k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
675k
        DCHECK(!_finished);
110
675k
        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
675k
        uint32_t to_add = cast_set<UInt32>(
126
675k
                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
675k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
675k
        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
675k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
675k
        _count += to_add;
134
675k
        _remain_element_capacity -= to_add;
135
675k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
675k
        *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
675k
        memcpy(&_data[orig_size], vals, to_add_size);
158
675k
        return Status::OK();
159
675k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
137M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
137M
        DCHECK(!_finished);
110
137M
        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
137M
        uint32_t to_add = cast_set<UInt32>(
126
137M
                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
137M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
137M
        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
137M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
140M
        _count += to_add;
134
140M
        _remain_element_capacity -= to_add;
135
140M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
140M
        *num_written = to_add;
138
140M
        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
140M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
140M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
140M
                        *reinterpret_cast<const uint32_t*>(vals);
149
140M
                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
140M
        }
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
140M
        return Status::OK();
159
137M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
47.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
47.9k
        DCHECK(!_finished);
110
47.9k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
47.9k
        uint32_t to_add = cast_set<UInt32>(
126
47.9k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
47.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
47.9k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
47.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
47.9k
        _count += to_add;
134
47.9k
        _remain_element_capacity -= to_add;
135
47.9k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
47.9k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
47.9k
        memcpy(&_data[orig_size], vals, to_add_size);
158
47.9k
        return Status::OK();
159
47.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
11.4k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
11.4k
        DCHECK(!_finished);
110
11.4k
        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.4k
        uint32_t to_add = cast_set<UInt32>(
126
11.4k
                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.4k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
11.4k
        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.4k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
11.4k
        _count += to_add;
134
11.4k
        _remain_element_capacity -= to_add;
135
11.4k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
11.4k
        *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.4k
        memcpy(&_data[orig_size], vals, to_add_size);
158
11.4k
        return Status::OK();
159
11.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
271k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
271k
        DCHECK(!_finished);
110
271k
        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
271k
        uint32_t to_add = cast_set<UInt32>(
126
271k
                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
271k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
271k
        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
271k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
272k
        _count += to_add;
134
272k
        _remain_element_capacity -= to_add;
135
272k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
272k
        *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
272k
        memcpy(&_data[orig_size], vals, to_add_size);
158
272k
        return Status::OK();
159
271k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
11.8k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
11.8k
        DCHECK(!_finished);
110
11.8k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
11.8k
        uint32_t to_add = cast_set<UInt32>(
126
11.8k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
11.8k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
11.8k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
11.8k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
11.8k
        _count += to_add;
134
11.8k
        _remain_element_capacity -= to_add;
135
11.8k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
11.8k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
11.8k
        memcpy(&_data[orig_size], vals, to_add_size);
158
11.8k
        return Status::OK();
159
11.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
66.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
66.7k
        DCHECK(!_finished);
110
66.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
66.7k
        uint32_t to_add = cast_set<UInt32>(
126
66.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
66.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
66.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
66.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
66.7k
        _count += to_add;
134
66.7k
        _remain_element_capacity -= to_add;
135
66.7k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
66.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
66.7k
        memcpy(&_data[orig_size], vals, to_add_size);
158
66.7k
        return Status::OK();
159
66.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
5.78k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.78k
        DCHECK(!_finished);
110
5.78k
        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.78k
        uint32_t to_add = cast_set<UInt32>(
126
5.78k
                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.78k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.78k
        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.78k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.78k
        _count += to_add;
134
5.78k
        _remain_element_capacity -= to_add;
135
5.78k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.78k
        *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.78k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.78k
        return Status::OK();
159
5.78k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
8.32k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
8.32k
        DCHECK(!_finished);
110
8.32k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
8.32k
        uint32_t to_add = cast_set<UInt32>(
126
8.32k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
8.32k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
8.32k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
8.32k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
8.32k
        _count += to_add;
134
8.32k
        _remain_element_capacity -= to_add;
135
8.32k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
8.32k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
8.32k
        memcpy(&_data[orig_size], vals, to_add_size);
158
8.32k
        return Status::OK();
159
8.32k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
368
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
368
        DCHECK(!_finished);
110
368
        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
368
        uint32_t to_add = cast_set<UInt32>(
126
368
                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
368
        int to_add_size = to_add * SIZE_OF_TYPE;
129
368
        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
368
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
368
        _count += to_add;
134
368
        _remain_element_capacity -= to_add;
135
368
        _raw_data_size += to_add_size;
136
        // return added number through count
137
368
        *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
368
        memcpy(&_data[orig_size], vals, to_add_size);
158
368
        return Status::OK();
159
368
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
45.5k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
45.5k
        DCHECK(!_finished);
110
45.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
45.5k
        uint32_t to_add = cast_set<UInt32>(
126
45.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
45.5k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
45.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
45.5k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
45.5k
        _count += to_add;
134
45.5k
        _remain_element_capacity -= to_add;
135
45.5k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
45.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
45.5k
        memcpy(&_data[orig_size], vals, to_add_size);
158
45.5k
        return Status::OK();
159
45.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
41.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
41.9k
        DCHECK(!_finished);
110
41.9k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
41.9k
        uint32_t to_add = cast_set<UInt32>(
126
41.9k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
41.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
41.9k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
41.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
41.9k
        _count += to_add;
134
41.9k
        _remain_element_capacity -= to_add;
135
41.9k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
41.9k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
41.9k
        memcpy(&_data[orig_size], vals, to_add_size);
158
41.9k
        return Status::OK();
159
41.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
514
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
514
        DCHECK(!_finished);
110
514
        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
514
        uint32_t to_add = cast_set<UInt32>(
126
514
                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
514
        int to_add_size = to_add * SIZE_OF_TYPE;
129
514
        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
514
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
514
        _count += to_add;
134
514
        _remain_element_capacity -= to_add;
135
514
        _raw_data_size += to_add_size;
136
        // return added number through count
137
514
        *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
514
        memcpy(&_data[orig_size], vals, to_add_size);
158
514
        return Status::OK();
159
514
    }
_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.61k
        _count += to_add;
134
7.61k
        _remain_element_capacity -= to_add;
135
7.61k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
7.61k
        *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.61k
        memcpy(&_data[orig_size], vals, to_add_size);
158
7.61k
        return Status::OK();
159
7.61k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
252
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
252
        DCHECK(!_finished);
110
252
        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
252
        uint32_t to_add = cast_set<UInt32>(
126
252
                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
252
        int to_add_size = to_add * SIZE_OF_TYPE;
129
252
        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
252
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
252
        _count += to_add;
134
252
        _remain_element_capacity -= to_add;
135
252
        _raw_data_size += to_add_size;
136
        // return added number through count
137
252
        *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
252
        memcpy(&_data[orig_size], vals, to_add_size);
158
252
        return Status::OK();
159
252
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
5.16k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.16k
        DCHECK(!_finished);
110
5.16k
        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.16k
        uint32_t to_add = cast_set<UInt32>(
126
5.16k
                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.16k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.16k
        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.16k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.16k
        _count += to_add;
134
5.16k
        _remain_element_capacity -= to_add;
135
5.16k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.16k
        *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.16k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.16k
        return Status::OK();
159
5.16k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
25.8k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
25.8k
        DCHECK(!_finished);
110
25.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
25.8k
        uint32_t to_add = cast_set<UInt32>(
126
25.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
25.8k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
25.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
25.8k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
25.8k
        _count += to_add;
134
25.8k
        _remain_element_capacity -= to_add;
135
25.8k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
25.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
25.8k
        memcpy(&_data[orig_size], vals, to_add_size);
158
25.8k
        return Status::OK();
159
25.8k
    }
_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
627
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
627
        DCHECK(!_finished);
110
627
        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
627
        uint32_t to_add = cast_set<UInt32>(
126
627
                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
627
        int to_add_size = to_add * SIZE_OF_TYPE;
129
627
        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
627
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
627
        _count += to_add;
134
627
        _remain_element_capacity -= to_add;
135
627
        _raw_data_size += to_add_size;
136
        // return added number through count
137
627
        *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
627
        memcpy(&_data[orig_size], vals, to_add_size);
158
627
        return Status::OK();
159
627
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
640
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
640
        DCHECK(!_finished);
110
640
        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
640
        uint32_t to_add = cast_set<UInt32>(
126
640
                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
640
        int to_add_size = to_add * SIZE_OF_TYPE;
129
640
        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
640
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
640
        _count += to_add;
134
640
        _remain_element_capacity -= to_add;
135
640
        _raw_data_size += to_add_size;
136
        // return added number through count
137
640
        *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
640
        memcpy(&_data[orig_size], vals, to_add_size);
158
640
        return Status::OK();
159
640
    }
160
161
702k
    Status finish(OwnedSlice* slice) override {
162
702k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
702k
        return Status::OK();
164
702k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
329k
    Status finish(OwnedSlice* slice) override {
162
329k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
329k
        return Status::OK();
164
329k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
45.1k
    Status finish(OwnedSlice* slice) override {
162
45.1k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
45.1k
        return Status::OK();
164
45.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
8.52k
    Status finish(OwnedSlice* slice) override {
162
8.52k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
8.52k
        return Status::OK();
164
8.52k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
91.3k
    Status finish(OwnedSlice* slice) override {
162
91.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
91.3k
        return Status::OK();
164
91.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
12.0k
    Status finish(OwnedSlice* slice) override {
162
12.0k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
12.0k
        return Status::OK();
164
12.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
66.0k
    Status finish(OwnedSlice* slice) override {
162
66.0k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
66.0k
        return Status::OK();
164
66.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
5.56k
    Status finish(OwnedSlice* slice) override {
162
5.56k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
5.57k
        return Status::OK();
164
5.56k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7.36k
    Status finish(OwnedSlice* slice) override {
162
7.36k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.36k
        return Status::OK();
164
7.36k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
363
    Status finish(OwnedSlice* slice) override {
162
363
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
363
        return Status::OK();
164
363
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
38.3k
    Status finish(OwnedSlice* slice) override {
162
38.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
38.3k
        return Status::OK();
164
38.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
41.1k
    Status finish(OwnedSlice* slice) override {
162
41.1k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
41.1k
        return Status::OK();
164
41.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
604
    Status finish(OwnedSlice* slice) override {
162
604
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
604
        return Status::OK();
164
604
    }
_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.70k
        return Status::OK();
164
7.70k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
254
    Status finish(OwnedSlice* slice) override {
162
254
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
254
        return Status::OK();
164
254
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
9.69k
    Status finish(OwnedSlice* slice) override {
162
9.69k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
9.69k
        return Status::OK();
164
9.69k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
19.2k
    Status finish(OwnedSlice* slice) override {
162
19.2k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
19.2k
        return Status::OK();
164
19.2k
    }
_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
633
    Status finish(OwnedSlice* slice) override {
162
633
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
633
        return Status::OK();
164
633
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
630
    Status finish(OwnedSlice* slice) override {
162
630
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
630
        return Status::OK();
164
630
    }
165
166
1.67M
    Status reset() override {
167
1.67M
        RETURN_IF_CATCH_EXCEPTION({
168
1.67M
            size_t block_size = _options.data_page_size;
169
1.67M
            _count = 0;
170
1.67M
            _raw_data_size = 0;
171
1.67M
            _data.clear();
172
1.67M
            _data.reserve(block_size);
173
1.67M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.67M
                    << "buffer must be naturally-aligned";
175
1.67M
            _buffer.clear();
176
1.67M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.67M
            _finished = false;
178
1.67M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.67M
        });
180
1.67M
        return Status::OK();
181
1.67M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
166
940k
    Status reset() override {
167
940k
        RETURN_IF_CATCH_EXCEPTION({
168
940k
            size_t block_size = _options.data_page_size;
169
940k
            _count = 0;
170
940k
            _raw_data_size = 0;
171
940k
            _data.clear();
172
940k
            _data.reserve(block_size);
173
940k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
940k
                    << "buffer must be naturally-aligned";
175
940k
            _buffer.clear();
176
940k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
940k
            _finished = false;
178
940k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
940k
        });
180
942k
        return Status::OK();
181
940k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
90.7k
    Status reset() override {
167
90.7k
        RETURN_IF_CATCH_EXCEPTION({
168
90.7k
            size_t block_size = _options.data_page_size;
169
90.7k
            _count = 0;
170
90.7k
            _raw_data_size = 0;
171
90.7k
            _data.clear();
172
90.7k
            _data.reserve(block_size);
173
90.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
90.7k
                    << "buffer must be naturally-aligned";
175
90.7k
            _buffer.clear();
176
90.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
90.7k
            _finished = false;
178
90.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
90.7k
        });
180
90.7k
        return Status::OK();
181
90.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
166
17.4k
    Status reset() override {
167
17.4k
        RETURN_IF_CATCH_EXCEPTION({
168
17.4k
            size_t block_size = _options.data_page_size;
169
17.4k
            _count = 0;
170
17.4k
            _raw_data_size = 0;
171
17.4k
            _data.clear();
172
17.4k
            _data.reserve(block_size);
173
17.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
17.4k
                    << "buffer must be naturally-aligned";
175
17.4k
            _buffer.clear();
176
17.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
17.4k
            _finished = false;
178
17.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
17.4k
        });
180
17.4k
        return Status::OK();
181
17.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
177k
    Status reset() override {
167
177k
        RETURN_IF_CATCH_EXCEPTION({
168
177k
            size_t block_size = _options.data_page_size;
169
177k
            _count = 0;
170
177k
            _raw_data_size = 0;
171
177k
            _data.clear();
172
177k
            _data.reserve(block_size);
173
177k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
177k
                    << "buffer must be naturally-aligned";
175
177k
            _buffer.clear();
176
177k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
177k
            _finished = false;
178
177k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
177k
        });
180
178k
        return Status::OK();
181
177k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
166
23.8k
    Status reset() override {
167
23.8k
        RETURN_IF_CATCH_EXCEPTION({
168
23.8k
            size_t block_size = _options.data_page_size;
169
23.8k
            _count = 0;
170
23.8k
            _raw_data_size = 0;
171
23.8k
            _data.clear();
172
23.8k
            _data.reserve(block_size);
173
23.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
23.8k
                    << "buffer must be naturally-aligned";
175
23.8k
            _buffer.clear();
176
23.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
23.8k
            _finished = false;
178
23.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
23.8k
        });
180
23.8k
        return Status::OK();
181
23.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
166
132k
    Status reset() override {
167
132k
        RETURN_IF_CATCH_EXCEPTION({
168
132k
            size_t block_size = _options.data_page_size;
169
132k
            _count = 0;
170
132k
            _raw_data_size = 0;
171
132k
            _data.clear();
172
132k
            _data.reserve(block_size);
173
132k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
132k
                    << "buffer must be naturally-aligned";
175
132k
            _buffer.clear();
176
132k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
132k
            _finished = false;
178
132k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
132k
        });
180
132k
        return Status::OK();
181
132k
    }
_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
11.4k
    Status reset() override {
167
11.4k
        RETURN_IF_CATCH_EXCEPTION({
168
11.4k
            size_t block_size = _options.data_page_size;
169
11.4k
            _count = 0;
170
11.4k
            _raw_data_size = 0;
171
11.4k
            _data.clear();
172
11.4k
            _data.reserve(block_size);
173
11.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
11.4k
                    << "buffer must be naturally-aligned";
175
11.4k
            _buffer.clear();
176
11.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
11.4k
            _finished = false;
178
11.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
11.4k
        });
180
11.4k
        return Status::OK();
181
11.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
166
14.5k
    Status reset() override {
167
14.5k
        RETURN_IF_CATCH_EXCEPTION({
168
14.5k
            size_t block_size = _options.data_page_size;
169
14.5k
            _count = 0;
170
14.5k
            _raw_data_size = 0;
171
14.5k
            _data.clear();
172
14.5k
            _data.reserve(block_size);
173
14.5k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
14.5k
                    << "buffer must be naturally-aligned";
175
14.5k
            _buffer.clear();
176
14.5k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
14.5k
            _finished = false;
178
14.5k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
14.5k
        });
180
14.6k
        return Status::OK();
181
14.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
166
714
    Status reset() override {
167
714
        RETURN_IF_CATCH_EXCEPTION({
168
714
            size_t block_size = _options.data_page_size;
169
714
            _count = 0;
170
714
            _raw_data_size = 0;
171
714
            _data.clear();
172
714
            _data.reserve(block_size);
173
714
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
714
                    << "buffer must be naturally-aligned";
175
714
            _buffer.clear();
176
714
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
714
            _finished = false;
178
714
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
714
        });
180
715
        return Status::OK();
181
714
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
166
75.8k
    Status reset() override {
167
75.8k
        RETURN_IF_CATCH_EXCEPTION({
168
75.8k
            size_t block_size = _options.data_page_size;
169
75.8k
            _count = 0;
170
75.8k
            _raw_data_size = 0;
171
75.8k
            _data.clear();
172
75.8k
            _data.reserve(block_size);
173
75.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
75.8k
                    << "buffer must be naturally-aligned";
175
75.8k
            _buffer.clear();
176
75.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
75.8k
            _finished = false;
178
75.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
75.8k
        });
180
75.9k
        return Status::OK();
181
75.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
166
83.3k
    Status reset() override {
167
83.3k
        RETURN_IF_CATCH_EXCEPTION({
168
83.3k
            size_t block_size = _options.data_page_size;
169
83.3k
            _count = 0;
170
83.3k
            _raw_data_size = 0;
171
83.3k
            _data.clear();
172
83.3k
            _data.reserve(block_size);
173
83.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
83.3k
                    << "buffer must be naturally-aligned";
175
83.3k
            _buffer.clear();
176
83.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
83.3k
            _finished = false;
178
83.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
83.3k
        });
180
83.4k
        return Status::OK();
181
83.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
166
1.05k
    Status reset() override {
167
1.05k
        RETURN_IF_CATCH_EXCEPTION({
168
1.05k
            size_t block_size = _options.data_page_size;
169
1.05k
            _count = 0;
170
1.05k
            _raw_data_size = 0;
171
1.05k
            _data.clear();
172
1.05k
            _data.reserve(block_size);
173
1.05k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.05k
                    << "buffer must be naturally-aligned";
175
1.05k
            _buffer.clear();
176
1.05k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.05k
            _finished = false;
178
1.05k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.05k
        });
180
1.05k
        return Status::OK();
181
1.05k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
Line
Count
Source
166
15.2k
    Status reset() override {
167
15.2k
        RETURN_IF_CATCH_EXCEPTION({
168
15.2k
            size_t block_size = _options.data_page_size;
169
15.2k
            _count = 0;
170
15.2k
            _raw_data_size = 0;
171
15.2k
            _data.clear();
172
15.2k
            _data.reserve(block_size);
173
15.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
15.2k
                    << "buffer must be naturally-aligned";
175
15.2k
            _buffer.clear();
176
15.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
15.2k
            _finished = false;
178
15.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
15.2k
        });
180
15.4k
        return Status::OK();
181
15.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
166
596
    Status reset() override {
167
596
        RETURN_IF_CATCH_EXCEPTION({
168
596
            size_t block_size = _options.data_page_size;
169
596
            _count = 0;
170
596
            _raw_data_size = 0;
171
596
            _data.clear();
172
596
            _data.reserve(block_size);
173
596
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
596
                    << "buffer must be naturally-aligned";
175
596
            _buffer.clear();
176
596
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
596
            _finished = false;
178
596
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
596
        });
180
596
        return Status::OK();
181
596
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
166
19.3k
    Status reset() override {
167
19.3k
        RETURN_IF_CATCH_EXCEPTION({
168
19.3k
            size_t block_size = _options.data_page_size;
169
19.3k
            _count = 0;
170
19.3k
            _raw_data_size = 0;
171
19.3k
            _data.clear();
172
19.3k
            _data.reserve(block_size);
173
19.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
19.3k
                    << "buffer must be naturally-aligned";
175
19.3k
            _buffer.clear();
176
19.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
19.3k
            _finished = false;
178
19.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
19.3k
        });
180
19.3k
        return Status::OK();
181
19.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
31.1k
    Status reset() override {
167
31.1k
        RETURN_IF_CATCH_EXCEPTION({
168
31.1k
            size_t block_size = _options.data_page_size;
169
31.1k
            _count = 0;
170
31.1k
            _raw_data_size = 0;
171
31.1k
            _data.clear();
172
31.1k
            _data.reserve(block_size);
173
31.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
31.1k
                    << "buffer must be naturally-aligned";
175
31.1k
            _buffer.clear();
176
31.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
31.1k
            _finished = false;
178
31.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
31.1k
        });
180
31.2k
        return Status::OK();
181
31.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.34k
        return Status::OK();
181
2.34k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
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.35k
        return Status::OK();
181
1.35k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
166
1.34k
    Status reset() override {
167
1.34k
        RETURN_IF_CATCH_EXCEPTION({
168
1.34k
            size_t block_size = _options.data_page_size;
169
1.34k
            _count = 0;
170
1.34k
            _raw_data_size = 0;
171
1.34k
            _data.clear();
172
1.34k
            _data.reserve(block_size);
173
1.34k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.34k
                    << "buffer must be naturally-aligned";
175
1.34k
            _buffer.clear();
176
1.34k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.34k
            _finished = false;
178
1.34k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.34k
        });
180
1.35k
        return Status::OK();
181
1.34k
    }
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
32.1k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
17.4k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
185
2.99k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
185
836
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
2.38k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
1.24k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
716
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
350
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
185
367
    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.59k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
2.13k
    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
203
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
185
340
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
185
1.16k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4sizeEv
Line
Count
Source
185
54
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4sizeEv
Line
Count
Source
185
76
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4sizeEv
Line
Count
Source
185
60
    uint64_t size() const override { return _buffer.size(); }
186
187
436k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
63.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
45.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
8.52k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
91.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
187
12.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
66.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
187
5.56k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
7.36k
    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
363
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
187
38.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
187
41.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
187
604
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
Line
Count
Source
187
7.70k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
187
254
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
187
9.69k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
19.1k
    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
633
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
187
630
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
696k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
334k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
45.6k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
8.93k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
86.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
11.8k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
66.2k
            : _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
5.88k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
7.23k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
352
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
37.5k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
42.1k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
451
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
7.59k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
342
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.68k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
12.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
16.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1.21k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
721
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
720
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
192
193
702k
    OwnedSlice _finish(int final_size_of_type) {
194
702k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
702k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
702k
        int padding_elems = num_elems_after_padding - _count;
199
702k
        int padding_bytes = padding_elems * final_size_of_type;
200
20.1M
        for (int i = 0; i < padding_bytes; i++) {
201
19.4M
            _data.push_back(0);
202
19.4M
        }
203
204
        // reserve enough place for compression
205
702k
        _buffer.resize(
206
702k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
702k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
702k
        int64_t bytes =
210
702k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
702k
                                         num_elems_after_padding, final_size_of_type, 0);
212
702k
        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
702k
        encode_fixed32_le(&_buffer[0], _count);
222
702k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
702k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
702k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
702k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
702k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
702k
        return _buffer.build();
229
702k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
329k
    OwnedSlice _finish(int final_size_of_type) {
194
329k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
329k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
329k
        int padding_elems = num_elems_after_padding - _count;
199
329k
        int padding_bytes = padding_elems * final_size_of_type;
200
6.44M
        for (int i = 0; i < padding_bytes; i++) {
201
6.11M
            _data.push_back(0);
202
6.11M
        }
203
204
        // reserve enough place for compression
205
329k
        _buffer.resize(
206
329k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
329k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
329k
        int64_t bytes =
210
329k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
329k
                                         num_elems_after_padding, final_size_of_type, 0);
212
329k
        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
329k
        encode_fixed32_le(&_buffer[0], _count);
222
329k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
329k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
329k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
329k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
329k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
329k
        return _buffer.build();
229
329k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
45.1k
    OwnedSlice _finish(int final_size_of_type) {
194
45.1k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
45.1k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
45.1k
        int padding_elems = num_elems_after_padding - _count;
199
45.1k
        int padding_bytes = padding_elems * final_size_of_type;
200
287k
        for (int i = 0; i < padding_bytes; i++) {
201
242k
            _data.push_back(0);
202
242k
        }
203
204
        // reserve enough place for compression
205
45.1k
        _buffer.resize(
206
45.1k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
45.1k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
45.1k
        int64_t bytes =
210
45.1k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
45.1k
                                         num_elems_after_padding, final_size_of_type, 0);
212
45.1k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
45.1k
        encode_fixed32_le(&_buffer[0], _count);
222
45.1k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
45.1k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
45.1k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
45.1k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
45.1k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
45.1k
        return _buffer.build();
229
45.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
8.52k
    OwnedSlice _finish(int final_size_of_type) {
194
8.52k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
8.52k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
8.52k
        int padding_elems = num_elems_after_padding - _count;
199
8.52k
        int padding_bytes = padding_elems * final_size_of_type;
200
87.8k
        for (int i = 0; i < padding_bytes; i++) {
201
79.3k
            _data.push_back(0);
202
79.3k
        }
203
204
        // reserve enough place for compression
205
8.52k
        _buffer.resize(
206
8.52k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
8.52k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
8.52k
        int64_t bytes =
210
8.52k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
8.52k
                                         num_elems_after_padding, final_size_of_type, 0);
212
8.52k
        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.52k
        encode_fixed32_le(&_buffer[0], _count);
222
8.52k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
8.52k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
8.52k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
8.52k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
8.52k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
8.52k
        return _buffer.build();
229
8.52k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
91.3k
    OwnedSlice _finish(int final_size_of_type) {
194
91.3k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
91.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
91.3k
        int padding_elems = num_elems_after_padding - _count;
199
91.3k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.91M
        for (int i = 0; i < padding_bytes; i++) {
201
3.81M
            _data.push_back(0);
202
3.81M
        }
203
204
        // reserve enough place for compression
205
91.3k
        _buffer.resize(
206
91.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
91.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
91.3k
        int64_t bytes =
210
91.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
91.3k
                                         num_elems_after_padding, final_size_of_type, 0);
212
91.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
91.3k
        encode_fixed32_le(&_buffer[0], _count);
222
91.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
91.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
91.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
91.3k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
91.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
91.3k
        return _buffer.build();
229
91.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
11.9k
    OwnedSlice _finish(int final_size_of_type) {
194
11.9k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
11.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
11.9k
        int padding_elems = num_elems_after_padding - _count;
199
11.9k
        int padding_bytes = padding_elems * final_size_of_type;
200
807k
        for (int i = 0; i < padding_bytes; i++) {
201
795k
            _data.push_back(0);
202
795k
        }
203
204
        // reserve enough place for compression
205
11.9k
        _buffer.resize(
206
11.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
11.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
11.9k
        int64_t bytes =
210
11.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
11.9k
                                         num_elems_after_padding, final_size_of_type, 0);
212
11.9k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
11.9k
        encode_fixed32_le(&_buffer[0], _count);
222
11.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
11.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
11.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
11.9k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
11.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
11.9k
        return _buffer.build();
229
11.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
66.0k
    OwnedSlice _finish(int final_size_of_type) {
194
66.0k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
66.0k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
66.0k
        int padding_elems = num_elems_after_padding - _count;
199
66.0k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.21M
        for (int i = 0; i < padding_bytes; i++) {
201
3.15M
            _data.push_back(0);
202
3.15M
        }
203
204
        // reserve enough place for compression
205
66.0k
        _buffer.resize(
206
66.0k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
66.0k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
66.0k
        int64_t bytes =
210
66.0k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
66.0k
                                         num_elems_after_padding, final_size_of_type, 0);
212
66.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
66.0k
        encode_fixed32_le(&_buffer[0], _count);
222
66.0k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
66.0k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
66.0k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
66.0k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
66.0k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
66.0k
        return _buffer.build();
229
66.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
5.56k
    OwnedSlice _finish(int final_size_of_type) {
194
5.56k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
5.56k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
5.56k
        int padding_elems = num_elems_after_padding - _count;
199
5.56k
        int padding_bytes = padding_elems * final_size_of_type;
200
121k
        for (int i = 0; i < padding_bytes; i++) {
201
116k
            _data.push_back(0);
202
116k
        }
203
204
        // reserve enough place for compression
205
5.56k
        _buffer.resize(
206
5.56k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
5.56k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
5.56k
        int64_t bytes =
210
5.56k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
5.56k
                                         num_elems_after_padding, final_size_of_type, 0);
212
5.56k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
5.56k
        encode_fixed32_le(&_buffer[0], _count);
222
5.56k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
5.56k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
5.56k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
5.56k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
5.56k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
5.56k
        return _buffer.build();
229
5.56k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
7.36k
    OwnedSlice _finish(int final_size_of_type) {
194
7.36k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.36k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.36k
        int padding_elems = num_elems_after_padding - _count;
199
7.36k
        int padding_bytes = padding_elems * final_size_of_type;
200
301k
        for (int i = 0; i < padding_bytes; i++) {
201
294k
            _data.push_back(0);
202
294k
        }
203
204
        // reserve enough place for compression
205
7.36k
        _buffer.resize(
206
7.36k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.36k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.36k
        int64_t bytes =
210
7.36k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.36k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.36k
        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.36k
        encode_fixed32_le(&_buffer[0], _count);
222
7.36k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.36k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.36k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.36k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.36k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.36k
        return _buffer.build();
229
7.36k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
363
    OwnedSlice _finish(int final_size_of_type) {
194
363
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
363
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
363
        int padding_elems = num_elems_after_padding - _count;
199
363
        int padding_bytes = padding_elems * final_size_of_type;
200
5.44k
        for (int i = 0; i < padding_bytes; i++) {
201
5.08k
            _data.push_back(0);
202
5.08k
        }
203
204
        // reserve enough place for compression
205
363
        _buffer.resize(
206
363
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
363
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
363
        int64_t bytes =
210
363
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
363
                                         num_elems_after_padding, final_size_of_type, 0);
212
363
        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
363
        encode_fixed32_le(&_buffer[0], _count);
222
363
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
363
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
363
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
363
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
363
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
363
        return _buffer.build();
229
363
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
193
38.3k
    OwnedSlice _finish(int final_size_of_type) {
194
38.3k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
38.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
38.3k
        int padding_elems = num_elems_after_padding - _count;
199
38.3k
        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
38.3k
        _buffer.resize(
206
38.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
38.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
38.3k
        int64_t bytes =
210
38.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
38.3k
                                         num_elems_after_padding, final_size_of_type, 0);
212
38.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
38.3k
        encode_fixed32_le(&_buffer[0], _count);
222
38.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
38.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
38.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
38.3k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
38.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
38.3k
        return _buffer.build();
229
38.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
193
41.1k
    OwnedSlice _finish(int final_size_of_type) {
194
41.1k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
41.1k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
41.1k
        int padding_elems = num_elems_after_padding - _count;
199
41.1k
        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.1k
        _buffer.resize(
206
41.1k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
41.1k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
41.1k
        int64_t bytes =
210
41.1k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
41.1k
                                         num_elems_after_padding, final_size_of_type, 0);
212
41.1k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
41.1k
        encode_fixed32_le(&_buffer[0], _count);
222
41.1k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
41.1k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
41.1k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
41.1k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
41.1k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
41.1k
        return _buffer.build();
229
41.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
193
604
    OwnedSlice _finish(int final_size_of_type) {
194
604
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
604
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
604
        int padding_elems = num_elems_after_padding - _count;
199
604
        int padding_bytes = padding_elems * final_size_of_type;
200
14.0k
        for (int i = 0; i < padding_bytes; i++) {
201
13.4k
            _data.push_back(0);
202
13.4k
        }
203
204
        // reserve enough place for compression
205
604
        _buffer.resize(
206
604
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
604
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
604
        int64_t bytes =
210
604
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
604
                                         num_elems_after_padding, final_size_of_type, 0);
212
604
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
604
        encode_fixed32_le(&_buffer[0], _count);
222
604
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
604
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
604
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
604
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
604
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
604
        return _buffer.build();
229
604
    }
_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
401k
        for (int i = 0; i < padding_bytes; i++) {
201
394k
            _data.push_back(0);
202
394k
        }
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
254
    OwnedSlice _finish(int final_size_of_type) {
194
254
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
254
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
254
        int padding_elems = num_elems_after_padding - _count;
199
254
        int padding_bytes = padding_elems * final_size_of_type;
200
15.7k
        for (int i = 0; i < padding_bytes; i++) {
201
15.4k
            _data.push_back(0);
202
15.4k
        }
203
204
        // reserve enough place for compression
205
254
        _buffer.resize(
206
254
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
254
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
254
        int64_t bytes =
210
254
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
254
                                         num_elems_after_padding, final_size_of_type, 0);
212
254
        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
254
        encode_fixed32_le(&_buffer[0], _count);
222
254
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
254
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
254
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
254
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
254
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
254
        return _buffer.build();
229
254
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
193
9.69k
    OwnedSlice _finish(int final_size_of_type) {
194
9.69k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
9.69k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
9.69k
        int padding_elems = num_elems_after_padding - _count;
199
9.69k
        int padding_bytes = padding_elems * final_size_of_type;
200
117k
        for (int i = 0; i < padding_bytes; i++) {
201
107k
            _data.push_back(0);
202
107k
        }
203
204
        // reserve enough place for compression
205
9.69k
        _buffer.resize(
206
9.69k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
9.69k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
9.69k
        int64_t bytes =
210
9.69k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
9.69k
                                         num_elems_after_padding, final_size_of_type, 0);
212
9.69k
        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.69k
        encode_fixed32_le(&_buffer[0], _count);
222
9.69k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
9.69k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
9.69k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
9.69k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
9.69k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
9.69k
        return _buffer.build();
229
9.69k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
19.2k
    OwnedSlice _finish(int final_size_of_type) {
194
19.2k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
19.2k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
19.2k
        int padding_elems = num_elems_after_padding - _count;
199
19.2k
        int padding_bytes = padding_elems * final_size_of_type;
200
485k
        for (int i = 0; i < padding_bytes; i++) {
201
466k
            _data.push_back(0);
202
466k
        }
203
204
        // reserve enough place for compression
205
19.2k
        _buffer.resize(
206
19.2k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
19.2k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
19.2k
        int64_t bytes =
210
19.2k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
19.2k
                                         num_elems_after_padding, final_size_of_type, 0);
212
19.2k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
19.2k
        encode_fixed32_le(&_buffer[0], _count);
222
19.2k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
19.2k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
19.2k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
19.2k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
19.2k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
19.2k
        return _buffer.build();
229
19.2k
    }
_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
175k
        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
633
    OwnedSlice _finish(int final_size_of_type) {
194
633
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
633
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
633
        int padding_elems = num_elems_after_padding - _count;
199
633
        int padding_bytes = padding_elems * final_size_of_type;
200
12.9k
        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
633
        _buffer.resize(
206
633
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
633
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
633
        int64_t bytes =
210
633
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
633
                                         num_elems_after_padding, final_size_of_type, 0);
212
633
        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
633
        encode_fixed32_le(&_buffer[0], _count);
222
633
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
633
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
633
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
633
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
633
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
633
        return _buffer.build();
229
633
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
193
630
    OwnedSlice _finish(int final_size_of_type) {
194
630
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
630
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
630
        int padding_elems = num_elems_after_padding - _count;
199
630
        int padding_bytes = padding_elems * final_size_of_type;
200
51.3k
        for (int i = 0; i < padding_bytes; i++) {
201
50.7k
            _data.push_back(0);
202
50.7k
        }
203
204
        // reserve enough place for compression
205
630
        _buffer.resize(
206
630
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
630
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
630
        int64_t bytes =
210
630
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
630
                                         num_elems_after_padding, final_size_of_type, 0);
212
630
        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
630
        encode_fixed32_le(&_buffer[0], _count);
222
630
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
630
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
630
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
630
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
630
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
630
        return _buffer.build();
229
630
    }
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.72M
                                       int& size_of_element) {
253
1.72M
    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.72M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
1.72M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
1.72M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
1.72M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
1.72M
    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.72M
    switch (size_of_element) {
271
137k
    case 1:
272
157k
    case 2:
273
160k
    case 3:
274
1.08M
    case 4:
275
1.64M
    case 8:
276
1.64M
    case 12:
277
1.72M
    case 16:
278
1.72M
    case 32:
279
1.72M
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
1.72M
    }
283
1.72M
    return Status::OK();
284
1.72M
}
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
474k
            : _data(data),
291
474k
              _options(options),
292
474k
              _parsed(false),
293
474k
              _num_elements(0),
294
474k
              _num_element_after_padding(0),
295
474k
              _size_of_element(0),
296
474k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
79.0k
            : _data(data),
291
79.0k
              _options(options),
292
79.0k
              _parsed(false),
293
79.0k
              _num_elements(0),
294
79.0k
              _num_element_after_padding(0),
295
79.0k
              _size_of_element(0),
296
79.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
11.3k
            : _data(data),
291
11.3k
              _options(options),
292
11.3k
              _parsed(false),
293
11.3k
              _num_elements(0),
294
11.3k
              _num_element_after_padding(0),
295
11.3k
              _size_of_element(0),
296
11.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
105k
            : _data(data),
291
105k
              _options(options),
292
105k
              _parsed(false),
293
105k
              _num_elements(0),
294
105k
              _num_element_after_padding(0),
295
105k
              _size_of_element(0),
296
105k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
17.1k
            : _data(data),
291
17.1k
              _options(options),
292
17.1k
              _parsed(false),
293
17.1k
              _num_elements(0),
294
17.1k
              _num_element_after_padding(0),
295
17.1k
              _size_of_element(0),
296
17.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
91.4k
            : _data(data),
291
91.4k
              _options(options),
292
91.4k
              _parsed(false),
293
91.4k
              _num_elements(0),
294
91.4k
              _num_element_after_padding(0),
295
91.4k
              _size_of_element(0),
296
91.4k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
7.82k
            : _data(data),
291
7.82k
              _options(options),
292
7.82k
              _parsed(false),
293
7.82k
              _num_elements(0),
294
7.82k
              _num_element_after_padding(0),
295
7.82k
              _size_of_element(0),
296
7.82k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
13.2k
            : _data(data),
291
13.2k
              _options(options),
292
13.2k
              _parsed(false),
293
13.2k
              _num_elements(0),
294
13.2k
              _num_element_after_padding(0),
295
13.2k
              _size_of_element(0),
296
13.2k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
2.13k
            : _data(data),
291
2.13k
              _options(options),
292
2.13k
              _parsed(false),
293
2.13k
              _num_elements(0),
294
2.13k
              _num_element_after_padding(0),
295
2.13k
              _size_of_element(0),
296
2.13k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
59.3k
            : _data(data),
291
59.3k
              _options(options),
292
59.3k
              _parsed(false),
293
59.3k
              _num_elements(0),
294
59.3k
              _num_element_after_padding(0),
295
59.3k
              _size_of_element(0),
296
59.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
64.4k
            : _data(data),
291
64.4k
              _options(options),
292
64.4k
              _parsed(false),
293
64.4k
              _num_elements(0),
294
64.4k
              _num_element_after_padding(0),
295
64.4k
              _size_of_element(0),
296
64.4k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
2.81k
            : _data(data),
291
2.81k
              _options(options),
292
2.81k
              _parsed(false),
293
2.81k
              _num_elements(0),
294
2.81k
              _num_element_after_padding(0),
295
2.81k
              _size_of_element(0),
296
2.81k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
16.6k
            : _data(data),
291
16.6k
              _options(options),
292
16.6k
              _parsed(false),
293
16.6k
              _num_elements(0),
294
16.6k
              _num_element_after_padding(0),
295
16.6k
              _size_of_element(0),
296
16.6k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.36k
            : _data(data),
291
1.36k
              _options(options),
292
1.36k
              _parsed(false),
293
1.36k
              _num_elements(0),
294
1.36k
              _num_element_after_padding(0),
295
1.36k
              _size_of_element(0),
296
1.36k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
15.1k
            : _data(data),
291
15.1k
              _options(options),
292
15.1k
              _parsed(false),
293
15.1k
              _num_elements(0),
294
15.1k
              _num_element_after_padding(0),
295
15.1k
              _size_of_element(0),
296
15.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
40.1k
            : _data(data),
291
40.1k
              _options(options),
292
40.1k
              _parsed(false),
293
40.1k
              _num_elements(0),
294
40.1k
              _num_element_after_padding(0),
295
40.1k
              _size_of_element(0),
296
40.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
30.4k
            : _data(data),
291
30.4k
              _options(options),
292
30.4k
              _parsed(false),
293
30.4k
              _num_elements(0),
294
30.4k
              _num_element_after_padding(0),
295
30.4k
              _size_of_element(0),
296
30.4k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.75k
            : _data(data),
291
1.75k
              _options(options),
292
1.75k
              _parsed(false),
293
1.75k
              _num_elements(0),
294
1.75k
              _num_element_after_padding(0),
295
1.75k
              _size_of_element(0),
296
1.75k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
943
            : _data(data),
291
943
              _options(options),
292
943
              _parsed(false),
293
943
              _num_elements(0),
294
943
              _num_element_after_padding(0),
295
943
              _size_of_element(0),
296
943
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
983
            : _data(data),
291
983
              _options(options),
292
983
              _parsed(false),
293
983
              _num_elements(0),
294
983
              _num_element_after_padding(0),
295
983
              _size_of_element(0),
296
983
              _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
473k
    Status init() override {
299
473k
        CHECK(!_parsed);
300
473k
        size_t unused;
301
473k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
473k
                                                 _num_element_after_padding, _size_of_element));
303
304
473k
        if (_data.size !=
305
473k
            _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
473k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
473k
                     _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
473k
        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
473k
        _parsed = true;
325
473k
        return Status::OK();
326
473k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
78.9k
    Status init() override {
299
78.9k
        CHECK(!_parsed);
300
78.9k
        size_t unused;
301
78.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
78.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
78.9k
        if (_data.size !=
305
78.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
78.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
78.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
78.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
78.9k
        _parsed = true;
325
78.9k
        return Status::OK();
326
78.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
11.3k
    Status init() override {
299
11.3k
        CHECK(!_parsed);
300
11.3k
        size_t unused;
301
11.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
11.3k
                                                 _num_element_after_padding, _size_of_element));
303
304
11.3k
        if (_data.size !=
305
11.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
11.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
11.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
11.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
11.3k
        _parsed = true;
325
11.3k
        return Status::OK();
326
11.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
105k
    Status init() override {
299
105k
        CHECK(!_parsed);
300
105k
        size_t unused;
301
105k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
105k
                                                 _num_element_after_padding, _size_of_element));
303
304
105k
        if (_data.size !=
305
105k
            _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
105k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
105k
                     _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
105k
        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
105k
        _parsed = true;
325
105k
        return Status::OK();
326
105k
    }
_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
91.4k
    Status init() override {
299
91.4k
        CHECK(!_parsed);
300
91.4k
        size_t unused;
301
91.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
91.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
91.4k
        if (_data.size !=
305
91.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
91.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
91.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
91.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
91.4k
        _parsed = true;
325
91.4k
        return Status::OK();
326
91.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
298
7.82k
    Status init() override {
299
7.82k
        CHECK(!_parsed);
300
7.82k
        size_t unused;
301
7.82k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
7.82k
                                                 _num_element_after_padding, _size_of_element));
303
304
7.82k
        if (_data.size !=
305
7.82k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
7.82k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
7.82k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
7.82k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
7.82k
        _parsed = true;
325
7.82k
        return Status::OK();
326
7.82k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
298
13.2k
    Status init() override {
299
13.2k
        CHECK(!_parsed);
300
13.2k
        size_t unused;
301
13.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
13.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
13.2k
        if (_data.size !=
305
13.2k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
13.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
13.2k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
13.2k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
13.2k
        _parsed = true;
325
13.2k
        return Status::OK();
326
13.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
2.13k
    Status init() override {
299
2.13k
        CHECK(!_parsed);
300
2.13k
        size_t unused;
301
2.13k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
2.13k
                                                 _num_element_after_padding, _size_of_element));
303
304
2.13k
        if (_data.size !=
305
2.13k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
2.13k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
2.13k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
2.13k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
2.13k
        _parsed = true;
325
2.13k
        return Status::OK();
326
2.13k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
59.2k
    Status init() override {
299
59.2k
        CHECK(!_parsed);
300
59.2k
        size_t unused;
301
59.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
59.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
59.2k
        if (_data.size !=
305
59.2k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
59.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
59.2k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
59.2k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
59.2k
        _parsed = true;
325
59.2k
        return Status::OK();
326
59.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
298
64.4k
    Status init() override {
299
64.4k
        CHECK(!_parsed);
300
64.4k
        size_t unused;
301
64.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
64.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
64.4k
        if (_data.size !=
305
64.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
64.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
64.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
64.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
64.4k
        _parsed = true;
325
64.4k
        return Status::OK();
326
64.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
298
2.81k
    Status init() override {
299
2.81k
        CHECK(!_parsed);
300
2.81k
        size_t unused;
301
2.81k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
2.81k
                                                 _num_element_after_padding, _size_of_element));
303
304
2.81k
        if (_data.size !=
305
2.81k
            _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.81k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
2.81k
                     _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.81k
        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.81k
        _parsed = true;
325
2.81k
        return Status::OK();
326
2.81k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
298
16.6k
    Status init() override {
299
16.6k
        CHECK(!_parsed);
300
16.6k
        size_t unused;
301
16.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
16.6k
                                                 _num_element_after_padding, _size_of_element));
303
304
16.6k
        if (_data.size !=
305
16.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
16.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
16.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
16.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
16.6k
        _parsed = true;
325
16.6k
        return Status::OK();
326
16.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
298
1.36k
    Status init() override {
299
1.36k
        CHECK(!_parsed);
300
1.36k
        size_t unused;
301
1.36k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.36k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.36k
        if (_data.size !=
305
1.36k
            _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.36k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.36k
                     _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.36k
        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.36k
        _parsed = true;
325
1.36k
        return Status::OK();
326
1.36k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
298
15.1k
    Status init() override {
299
15.1k
        CHECK(!_parsed);
300
15.1k
        size_t unused;
301
15.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
15.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
15.1k
        if (_data.size !=
305
15.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
15.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
15.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
15.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
15.1k
        _parsed = true;
325
15.1k
        return Status::OK();
326
15.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
298
40.0k
    Status init() override {
299
40.0k
        CHECK(!_parsed);
300
40.0k
        size_t unused;
301
40.0k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
40.0k
                                                 _num_element_after_padding, _size_of_element));
303
304
40.0k
        if (_data.size !=
305
40.0k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
40.0k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
40.0k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
40.0k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
40.0k
        _parsed = true;
325
40.0k
        return Status::OK();
326
40.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
298
30.4k
    Status init() override {
299
30.4k
        CHECK(!_parsed);
300
30.4k
        size_t unused;
301
30.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
30.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
30.4k
        if (_data.size !=
305
30.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
30.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
30.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
30.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
30.4k
        _parsed = true;
325
30.4k
        return Status::OK();
326
30.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
298
1.75k
    Status init() override {
299
1.75k
        CHECK(!_parsed);
300
1.75k
        size_t unused;
301
1.75k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.75k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.75k
        if (_data.size !=
305
1.75k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.75k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.75k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.75k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.75k
        _parsed = true;
325
1.75k
        return Status::OK();
326
1.75k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
298
942
    Status init() override {
299
942
        CHECK(!_parsed);
300
942
        size_t unused;
301
942
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
942
                                                 _num_element_after_padding, _size_of_element));
303
304
942
        if (_data.size !=
305
942
            _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
942
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
942
                     _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
942
        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
942
        _parsed = true;
325
942
        return Status::OK();
326
942
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
298
982
    Status init() override {
299
982
        CHECK(!_parsed);
300
982
        size_t unused;
301
982
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
982
                                                 _num_element_after_padding, _size_of_element));
303
304
982
        if (_data.size !=
305
982
            _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
982
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
982
                     _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
982
        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
982
        _parsed = true;
325
982
        return Status::OK();
326
982
    }
327
328
    // If the page only contains null, then _num_elements == 0, and the nullmap has
329
    // some value. But in _seek_columns --> seek_to_ordinal --> _seek_to_pos_in_page
330
    // in this call stack it will pass pos == 0 to this method. Although we can add some
331
    // code such as check if the count == 0, then skip seek, but there are other method such
332
    // as init will also call seek with pos == 0. And the seek is useless when _num_elements
333
    // == 0, because next batch will return empty in this method.
334
3.69M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
3.69M
        if (_num_elements == 0) [[unlikely]] {
337
3.29k
            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
3.29k
        }
342
343
3.69M
        DCHECK_LE(pos, _num_elements);
344
3.69M
        _cur_index = pos;
345
3.69M
        return Status::OK();
346
3.69M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
1.36M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
1.36M
        if (_num_elements == 0) [[unlikely]] {
337
1.80k
            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.80k
        }
342
343
1.36M
        DCHECK_LE(pos, _num_elements);
344
1.36M
        _cur_index = pos;
345
1.36M
        return Status::OK();
346
1.36M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
284k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
284k
        if (_num_elements == 0) [[unlikely]] {
337
352
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
352
        }
342
343
284k
        DCHECK_LE(pos, _num_elements);
344
284k
        _cur_index = pos;
345
284k
        return Status::OK();
346
284k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
215k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
215k
        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
215k
        DCHECK_LE(pos, _num_elements);
344
215k
        _cur_index = pos;
345
215k
        return Status::OK();
346
215k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
181k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
181k
        if (_num_elements == 0) [[unlikely]] {
337
513
            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
513
        }
342
343
181k
        DCHECK_LE(pos, _num_elements);
344
181k
        _cur_index = pos;
345
181k
        return Status::OK();
346
181k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
334
120k
    Status seek_to_position_in_page(size_t pos) override {
335
120k
        DCHECK(_parsed) << "Must call init()";
336
120k
        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
120k
        DCHECK_LE(pos, _num_elements);
344
120k
        _cur_index = pos;
345
120k
        return Status::OK();
346
120k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
334
17.2k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
17.2k
        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
17.2k
        DCHECK_LE(pos, _num_elements);
344
17.2k
        _cur_index = pos;
345
17.2k
        return Status::OK();
346
17.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
219k
    Status seek_to_position_in_page(size_t pos) override {
335
219k
        DCHECK(_parsed) << "Must call init()";
336
219k
        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
219k
        DCHECK_LE(pos, _num_elements);
344
219k
        _cur_index = pos;
345
219k
        return Status::OK();
346
219k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
334
195k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
195k
        if (_num_elements == 0) [[unlikely]] {
337
5
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
5
        }
342
343
195k
        DCHECK_LE(pos, _num_elements);
344
195k
        _cur_index = pos;
345
195k
        return Status::OK();
346
195k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
334
205k
    Status seek_to_position_in_page(size_t pos) override {
335
205k
        DCHECK(_parsed) << "Must call init()";
336
205k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
205k
        DCHECK_LE(pos, _num_elements);
344
205k
        _cur_index = pos;
345
205k
        return Status::OK();
346
205k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
334
477k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
477k
        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
477k
        DCHECK_LE(pos, _num_elements);
344
477k
        _cur_index = pos;
345
477k
        return Status::OK();
346
477k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
334
74.3k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
74.3k
        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
74.3k
        DCHECK_LE(pos, _num_elements);
344
74.3k
        _cur_index = pos;
345
74.3k
        return Status::OK();
346
74.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
195k
    Status seek_to_position_in_page(size_t pos) override {
335
195k
        DCHECK(_parsed) << "Must call init()";
336
195k
        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
195k
        DCHECK_LE(pos, _num_elements);
344
195k
        _cur_index = pos;
345
195k
        return Status::OK();
346
195k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
334
7.55k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
7.55k
        if (_num_elements == 0) [[unlikely]] {
337
353
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
353
        }
342
343
7.55k
        DCHECK_LE(pos, _num_elements);
344
7.55k
        _cur_index = pos;
345
7.55k
        return Status::OK();
346
7.55k
    }
_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
868
    Status seek_to_position_in_page(size_t pos) override {
335
868
        DCHECK(_parsed) << "Must call init()";
336
868
        if (_num_elements == 0) [[unlikely]] {
337
26
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
26
        }
342
343
868
        DCHECK_LE(pos, _num_elements);
344
868
        _cur_index = pos;
345
868
        return Status::OK();
346
868
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
334
18.5k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
18.5k
        if (_num_elements == 0) [[unlikely]] {
337
12
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
12
        }
342
343
18.5k
        DCHECK_LE(pos, _num_elements);
344
18.5k
        _cur_index = pos;
345
18.5k
        return Status::OK();
346
18.5k
    }
_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
10
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
10
        }
342
343
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.95k
    Status seek_to_position_in_page(size_t pos) override {
335
1.95k
        DCHECK(_parsed) << "Must call init()";
336
1.95k
        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.95k
        DCHECK_LE(pos, _num_elements);
344
1.95k
        _cur_index = pos;
345
1.95k
        return Status::OK();
346
1.95k
    }
_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.44M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.44M
        DCHECK(_parsed);
389
1.44M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.44M
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.44M
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.44M
        *n = max_fetch;
398
1.44M
        if constexpr (forward_index) {
399
1.25M
            _cur_index += max_fetch;
400
1.25M
        }
401
402
1.44M
        return Status::OK();
403
1.44M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
293k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
293k
        DCHECK(_parsed);
389
293k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
293k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
293k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
293k
        *n = max_fetch;
398
293k
        if constexpr (forward_index) {
399
293k
            _cur_index += max_fetch;
400
293k
        }
401
402
293k
        return Status::OK();
403
293k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
180k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
180k
        DCHECK(_parsed);
389
180k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
180k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
180k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
180k
        *n = max_fetch;
398
180k
        if constexpr (forward_index) {
399
180k
            _cur_index += max_fetch;
400
180k
        }
401
402
180k
        return Status::OK();
403
180k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
12.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
12.8k
        DCHECK(_parsed);
389
12.8k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
12.8k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
12.8k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
12.8k
        *n = max_fetch;
398
12.8k
        if constexpr (forward_index) {
399
12.8k
            _cur_index += max_fetch;
400
12.8k
        }
401
402
12.8k
        return Status::OK();
403
12.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
92.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
92.0k
        DCHECK(_parsed);
389
92.0k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
92.0k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
92.0k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
92.0k
        *n = max_fetch;
398
92.0k
        if constexpr (forward_index) {
399
92.0k
            _cur_index += max_fetch;
400
92.0k
        }
401
402
92.0k
        return Status::OK();
403
92.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
15.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
15.8k
        DCHECK(_parsed);
389
15.8k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
15.8k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
15.8k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
15.8k
        *n = max_fetch;
398
15.8k
        if constexpr (forward_index) {
399
15.8k
            _cur_index += max_fetch;
400
15.8k
        }
401
402
15.8k
        return Status::OK();
403
15.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
143k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
143k
        DCHECK(_parsed);
389
144k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
143k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
143k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
143k
        *n = max_fetch;
398
143k
        if constexpr (forward_index) {
399
143k
            _cur_index += max_fetch;
400
143k
        }
401
402
143k
        return Status::OK();
403
143k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
187k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
187k
        DCHECK(_parsed);
389
187k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
187k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
187k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
187k
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
187k
        return Status::OK();
403
187k
    }
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
6.78k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
6.78k
        DCHECK(_parsed);
389
6.78k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
6.78k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
6.78k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
6.78k
        *n = max_fetch;
398
6.78k
        if constexpr (forward_index) {
399
6.78k
            _cur_index += max_fetch;
400
6.78k
        }
401
402
6.78k
        return Status::OK();
403
6.78k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
10.3k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
10.3k
        DCHECK(_parsed);
389
10.3k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
10.3k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
10.3k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
10.3k
        *n = max_fetch;
398
10.3k
        if constexpr (forward_index) {
399
10.3k
            _cur_index += max_fetch;
400
10.3k
        }
401
402
10.3k
        return Status::OK();
403
10.3k
    }
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
2.88k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
2.88k
        DCHECK(_parsed);
389
2.88k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
2.88k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
2.88k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
2.88k
        *n = max_fetch;
398
2.88k
        if constexpr (forward_index) {
399
2.88k
            _cur_index += max_fetch;
400
2.88k
        }
401
402
2.88k
        return Status::OK();
403
2.88k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
358k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
358k
        DCHECK(_parsed);
389
358k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
358k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
358k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
358k
        *n = max_fetch;
398
358k
        if constexpr (forward_index) {
399
358k
            _cur_index += max_fetch;
400
358k
        }
401
402
358k
        return Status::OK();
403
358k
    }
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.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
64.5k
        DCHECK(_parsed);
389
64.5k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
64.5k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
64.5k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
64.5k
        *n = max_fetch;
398
64.5k
        if constexpr (forward_index) {
399
64.5k
            _cur_index += max_fetch;
400
64.5k
        }
401
402
64.5k
        return Status::OK();
403
64.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
1.43k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.43k
        DCHECK(_parsed);
389
1.43k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.43k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.43k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.43k
        *n = max_fetch;
398
1.43k
        if constexpr (forward_index) {
399
1.43k
            _cur_index += max_fetch;
400
1.43k
        }
401
402
1.43k
        return Status::OK();
403
1.43k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
8.67k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
8.67k
        DCHECK(_parsed);
389
8.67k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
8.67k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
8.67k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
8.67k
        *n = max_fetch;
398
8.67k
        if constexpr (forward_index) {
399
8.67k
            _cur_index += max_fetch;
400
8.67k
        }
401
402
8.67k
        return Status::OK();
403
8.67k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
1.25k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.25k
        DCHECK(_parsed);
389
1.25k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.25k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.25k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.25k
        *n = max_fetch;
398
1.25k
        if constexpr (forward_index) {
399
1.25k
            _cur_index += max_fetch;
400
1.25k
        }
401
402
1.25k
        return Status::OK();
403
1.25k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
9.07k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
9.07k
        DCHECK(_parsed);
389
9.07k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
9.07k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
9.07k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
9.07k
        *n = max_fetch;
398
9.07k
        if constexpr (forward_index) {
399
9.07k
            _cur_index += max_fetch;
400
9.07k
        }
401
402
9.07k
        return Status::OK();
403
9.07k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
31.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
31.5k
        DCHECK(_parsed);
389
31.5k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
31.5k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
31.5k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
31.5k
        *n = max_fetch;
398
31.5k
        if constexpr (forward_index) {
399
31.5k
            _cur_index += max_fetch;
400
31.5k
        }
401
402
31.5k
        return Status::OK();
403
31.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.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
21.9k
        DCHECK(_parsed);
389
21.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
21.9k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
21.9k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
21.9k
        *n = max_fetch;
398
21.9k
        if constexpr (forward_index) {
399
21.9k
            _cur_index += max_fetch;
400
21.9k
        }
401
402
21.9k
        return Status::OK();
403
21.9k
    }
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.16k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.16k
        DCHECK(_parsed);
389
3.16k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.16k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.16k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.16k
        *n = max_fetch;
398
3.16k
        if constexpr (forward_index) {
399
3.16k
            _cur_index += max_fetch;
400
3.16k
        }
401
402
3.16k
        return Status::OK();
403
3.16k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
655
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
655
        DCHECK(_parsed);
389
656
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
655
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
655
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
655
        *n = max_fetch;
398
655
        if constexpr (forward_index) {
399
655
            _cur_index += max_fetch;
400
655
        }
401
402
655
        return Status::OK();
403
655
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
679
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
679
        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
679
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
679
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
679
        *n = max_fetch;
398
679
        if constexpr (forward_index) {
399
679
            _cur_index += max_fetch;
400
679
        }
401
402
679
        return Status::OK();
403
679
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
404
405
1.25M
    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
292k
    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
179k
    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
12.8k
    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
92.0k
    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
15.8k
    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
143k
    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
6.78k
    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
10.3k
    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
2.88k
    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
358k
    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.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
1.43k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
8.67k
    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.25k
    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.07k
    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
31.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.9k
    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.16k
    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
656
    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
680
    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
348k
                          MutableColumnPtr& dst) override {
409
348k
        DCHECK(_parsed);
410
348k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
348k
        auto total = *n;
416
348k
        auto read_count = 0;
417
348k
        _buffer.resize(total);
418
124M
        for (size_t i = 0; i < total; ++i) {
419
124M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
124M
            if (UNLIKELY(ord >= _num_elements)) {
421
13.8k
                break;
422
13.8k
            }
423
424
124M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
124M
        }
426
427
348k
        if (LIKELY(read_count > 0)) {
428
348k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
348k
        }
430
431
348k
        *n = read_count;
432
348k
        return Status::OK();
433
348k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
70.4k
                          MutableColumnPtr& dst) override {
409
70.4k
        DCHECK(_parsed);
410
70.4k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
70.4k
        auto total = *n;
416
70.4k
        auto read_count = 0;
417
70.4k
        _buffer.resize(total);
418
37.1M
        for (size_t i = 0; i < total; ++i) {
419
37.1M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
37.1M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.02k
                break;
422
1.02k
            }
423
424
37.1M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
37.1M
        }
426
427
70.4k
        if (LIKELY(read_count > 0)) {
428
70.4k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
70.4k
        }
430
431
70.4k
        *n = read_count;
432
70.4k
        return Status::OK();
433
70.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
25.3k
                          MutableColumnPtr& dst) override {
409
25.3k
        DCHECK(_parsed);
410
25.3k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
25.3k
        auto total = *n;
416
25.3k
        auto read_count = 0;
417
25.3k
        _buffer.resize(total);
418
1.80M
        for (size_t i = 0; i < total; ++i) {
419
1.78M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.78M
            if (UNLIKELY(ord >= _num_elements)) {
421
25
                break;
422
25
            }
423
424
1.78M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.78M
        }
426
427
25.4k
        if (LIKELY(read_count > 0)) {
428
25.4k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
25.4k
        }
430
431
25.3k
        *n = read_count;
432
25.3k
        return Status::OK();
433
25.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
5.20k
                          MutableColumnPtr& dst) override {
409
5.20k
        DCHECK(_parsed);
410
5.20k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
5.20k
        auto total = *n;
416
5.20k
        auto read_count = 0;
417
5.20k
        _buffer.resize(total);
418
635k
        for (size_t i = 0; i < total; ++i) {
419
629k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
629k
            if (UNLIKELY(ord >= _num_elements)) {
421
14
                break;
422
14
            }
423
424
629k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
629k
        }
426
427
5.21k
        if (LIKELY(read_count > 0)) {
428
5.21k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
5.21k
        }
430
431
5.20k
        *n = read_count;
432
5.20k
        return Status::OK();
433
5.20k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
71.4k
                          MutableColumnPtr& dst) override {
409
71.4k
        DCHECK(_parsed);
410
71.4k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
71.4k
        auto total = *n;
416
71.4k
        auto read_count = 0;
417
71.4k
        _buffer.resize(total);
418
28.1M
        for (size_t i = 0; i < total; ++i) {
419
28.0M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
28.0M
            if (UNLIKELY(ord >= _num_elements)) {
421
2.04k
                break;
422
2.04k
            }
423
424
28.0M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
28.0M
        }
426
427
71.4k
        if (LIKELY(read_count > 0)) {
428
71.4k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
71.4k
        }
430
431
71.4k
        *n = read_count;
432
71.4k
        return Status::OK();
433
71.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
9.04k
                          MutableColumnPtr& dst) override {
409
9.04k
        DCHECK(_parsed);
410
9.04k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
9.04k
        auto total = *n;
416
9.04k
        auto read_count = 0;
417
9.04k
        _buffer.resize(total);
418
1.32M
        for (size_t i = 0; i < total; ++i) {
419
1.31M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.31M
            if (UNLIKELY(ord >= _num_elements)) {
421
554
                break;
422
554
            }
423
424
1.31M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.31M
        }
426
427
9.04k
        if (LIKELY(read_count > 0)) {
428
9.04k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
9.04k
        }
430
431
9.04k
        *n = read_count;
432
9.04k
        return Status::OK();
433
9.04k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
31.4k
                          MutableColumnPtr& dst) override {
409
31.4k
        DCHECK(_parsed);
410
31.4k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
31.4k
        auto total = *n;
416
31.4k
        auto read_count = 0;
417
31.4k
        _buffer.resize(total);
418
4.43M
        for (size_t i = 0; i < total; ++i) {
419
4.40M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
4.40M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.49k
                break;
422
1.49k
            }
423
424
4.40M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
4.40M
        }
426
427
31.4k
        if (LIKELY(read_count > 0)) {
428
31.4k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
31.4k
        }
430
431
31.4k
        *n = read_count;
432
31.4k
        return Status::OK();
433
31.4k
    }
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.08k
                          MutableColumnPtr& dst) override {
409
4.08k
        DCHECK(_parsed);
410
4.08k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4.08k
        auto total = *n;
416
4.08k
        auto read_count = 0;
417
4.08k
        _buffer.resize(total);
418
1.19M
        for (size_t i = 0; i < total; ++i) {
419
1.18M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.18M
            if (UNLIKELY(ord >= _num_elements)) {
421
31
                break;
422
31
            }
423
424
1.18M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.18M
        }
426
427
4.08k
        if (LIKELY(read_count > 0)) {
428
4.08k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.08k
        }
430
431
4.08k
        *n = read_count;
432
4.08k
        return Status::OK();
433
4.08k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
6.69k
                          MutableColumnPtr& dst) override {
409
6.69k
        DCHECK(_parsed);
410
6.69k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
6.69k
        auto total = *n;
416
6.69k
        auto read_count = 0;
417
6.69k
        _buffer.resize(total);
418
1.98M
        for (size_t i = 0; i < total; ++i) {
419
1.97M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.97M
            if (UNLIKELY(ord >= _num_elements)) {
421
341
                break;
422
341
            }
423
424
1.97M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.97M
        }
426
427
6.69k
        if (LIKELY(read_count > 0)) {
428
6.69k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
6.69k
        }
430
431
6.69k
        *n = read_count;
432
6.69k
        return Status::OK();
433
6.69k
    }
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.43k
                          MutableColumnPtr& dst) override {
409
1.43k
        DCHECK(_parsed);
410
1.43k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.43k
        auto total = *n;
416
1.43k
        auto read_count = 0;
417
1.43k
        _buffer.resize(total);
418
499k
        for (size_t i = 0; i < total; ++i) {
419
498k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
498k
            if (UNLIKELY(ord >= _num_elements)) {
421
13
                break;
422
13
            }
423
424
498k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
498k
        }
426
427
1.43k
        if (LIKELY(read_count > 0)) {
428
1.43k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.43k
        }
430
431
1.43k
        *n = read_count;
432
1.43k
        return Status::OK();
433
1.43k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
29.1k
                          MutableColumnPtr& dst) override {
409
29.1k
        DCHECK(_parsed);
410
29.1k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
29.1k
        auto total = *n;
416
29.1k
        auto read_count = 0;
417
29.1k
        _buffer.resize(total);
418
6.76M
        for (size_t i = 0; i < total; ++i) {
419
6.73M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
6.73M
            if (UNLIKELY(ord >= _num_elements)) {
421
860
                break;
422
860
            }
423
424
6.73M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
6.73M
        }
426
427
29.1k
        if (LIKELY(read_count > 0)) {
428
29.1k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
29.1k
        }
430
431
29.1k
        *n = read_count;
432
29.1k
        return Status::OK();
433
29.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
31.0k
                          MutableColumnPtr& dst) override {
409
31.0k
        DCHECK(_parsed);
410
31.0k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
31.0k
        auto total = *n;
416
31.0k
        auto read_count = 0;
417
31.0k
        _buffer.resize(total);
418
10.0M
        for (size_t i = 0; i < total; ++i) {
419
10.0M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
10.0M
            if (UNLIKELY(ord >= _num_elements)) {
421
191
                break;
422
191
            }
423
424
10.0M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
10.0M
        }
426
427
31.0k
        if (LIKELY(read_count > 0)) {
428
31.0k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
31.0k
        }
430
431
31.0k
        *n = read_count;
432
31.0k
        return Status::OK();
433
31.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1.80k
                          MutableColumnPtr& dst) override {
409
1.80k
        DCHECK(_parsed);
410
1.80k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.80k
        auto total = *n;
416
1.80k
        auto read_count = 0;
417
1.80k
        _buffer.resize(total);
418
503k
        for (size_t i = 0; i < total; ++i) {
419
502k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
502k
            if (UNLIKELY(ord >= _num_elements)) {
421
240
                break;
422
240
            }
423
424
502k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
502k
        }
426
427
1.80k
        if (LIKELY(read_count > 0)) {
428
1.80k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.80k
        }
430
431
1.80k
        *n = read_count;
432
1.80k
        return Status::OK();
433
1.80k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.1k
                          MutableColumnPtr& dst) override {
409
13.1k
        DCHECK(_parsed);
410
13.1k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.1k
        auto total = *n;
416
13.1k
        auto read_count = 0;
417
13.1k
        _buffer.resize(total);
418
27.7k
        for (size_t i = 0; i < total; ++i) {
419
14.6k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.6k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
14.6k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.6k
        }
426
427
13.1k
        if (LIKELY(read_count > 0)) {
428
13.1k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.1k
        }
430
431
13.1k
        *n = read_count;
432
13.1k
        return Status::OK();
433
13.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
132
                          MutableColumnPtr& dst) override {
409
132
        DCHECK(_parsed);
410
132
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
132
        auto total = *n;
416
132
        auto read_count = 0;
417
132
        _buffer.resize(total);
418
269
        for (size_t i = 0; i < total; ++i) {
419
137
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
137
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
137
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
137
        }
426
427
132
        if (LIKELY(read_count > 0)) {
428
132
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
132
        }
430
431
132
        *n = read_count;
432
132
        return Status::OK();
433
132
    }
_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
19.0k
        for (size_t i = 0; i < total; ++i) {
419
14.4k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.4k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
14.4k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.4k
        }
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
28.2k
                          MutableColumnPtr& dst) override {
409
28.2k
        DCHECK(_parsed);
410
28.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
28.2k
        auto total = *n;
416
28.2k
        auto read_count = 0;
417
28.2k
        _buffer.resize(total);
418
21.2M
        for (size_t i = 0; i < total; ++i) {
419
21.1M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
21.1M
            if (UNLIKELY(ord >= _num_elements)) {
421
6.28k
                break;
422
6.28k
            }
423
424
21.1M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
21.1M
        }
426
427
28.2k
        if (LIKELY(read_count > 0)) {
428
28.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
28.2k
        }
430
431
28.2k
        *n = read_count;
432
28.2k
        return Status::OK();
433
28.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.4k
                          MutableColumnPtr& dst) override {
409
13.4k
        DCHECK(_parsed);
410
13.4k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.4k
        auto total = *n;
416
13.4k
        auto read_count = 0;
417
13.4k
        _buffer.resize(total);
418
9.01M
        for (size_t i = 0; i < total; ++i) {
419
9.00M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.00M
            if (UNLIKELY(ord >= _num_elements)) {
421
712
                break;
422
712
            }
423
424
9.00M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.00M
        }
426
427
13.4k
        if (LIKELY(read_count > 0)) {
428
13.4k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.4k
        }
430
431
13.4k
        *n = read_count;
432
13.4k
        return Status::OK();
433
13.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
964
                          MutableColumnPtr& dst) override {
409
964
        DCHECK(_parsed);
410
964
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
964
        auto total = *n;
416
964
        auto read_count = 0;
417
964
        _buffer.resize(total);
418
2.78k
        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
964
        if (LIKELY(read_count > 0)) {
428
964
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
964
        }
430
431
964
        *n = read_count;
432
964
        return Status::OK();
433
964
    }
_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
323
                          MutableColumnPtr& dst) override {
409
323
        DCHECK(_parsed);
410
323
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
323
        auto total = *n;
416
323
        auto read_count = 0;
417
323
        _buffer.resize(total);
418
1.16k
        for (size_t i = 0; i < total; ++i) {
419
838
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
838
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
838
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
838
        }
426
427
323
        if (LIKELY(read_count > 0)) {
428
323
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
323
        }
430
431
323
        *n = read_count;
432
323
        return Status::OK();
433
323
    }
434
435
187k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
187k
        return next_batch<false>(n, dst);
437
187k
    }
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
187k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
187k
        return next_batch<false>(n, dst);
437
187k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
438
439
4
    size_t count() const override { return _num_elements; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
439
4
    size_t count() const override { return _num_elements; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE5countEv
440
441
2.79M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
916k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
441
213k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
441
211k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
141k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
441
113k
    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
218k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
193k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
441
202k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
441
220k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
441
47.1k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
441
193k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Line
Count
Source
441
1.10k
    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.38k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
441
697
    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
41
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
Line
Count
Source
441
47
    size_t current_index() const override { return _cur_index; }
442
443
126M
    char* get_data(size_t index) const {
444
126M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
126M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
38.1M
    char* get_data(size_t index) const {
444
38.1M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
38.1M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
1.96M
    char* get_data(size_t index) const {
444
1.96M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.96M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
443
642k
    char* get_data(size_t index) const {
444
642k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
642k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
443
28.1M
    char* get_data(size_t index) const {
444
28.1M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
28.1M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
1.33M
    char* get_data(size_t index) const {
444
1.33M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.33M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
4.73M
    char* get_data(size_t index) const {
444
4.73M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
4.73M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
1.19M
    char* get_data(size_t index) const {
444
1.19M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.19M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
1.98M
    char* get_data(size_t index) const {
444
1.98M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.98M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
501k
    char* get_data(size_t index) const {
444
501k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
501k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
7.08M
    char* get_data(size_t index) const {
444
7.08M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
7.08M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
443
10.0M
    char* get_data(size_t index) const {
444
10.0M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
10.0M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
443
503k
    char* get_data(size_t index) const {
444
503k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
503k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
443
23.3k
    char* get_data(size_t index) const {
444
23.3k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
23.3k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
443
1.39k
    char* get_data(size_t index) const {
444
1.39k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.39k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
443
23.5k
    char* get_data(size_t index) const {
444
23.5k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
23.5k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
443
21.2M
    char* get_data(size_t index) const {
444
21.2M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
21.2M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
9.02M
    char* get_data(size_t index) const {
444
9.02M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.02M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
443
4.98k
    char* get_data(size_t index) const {
444
4.98k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
4.98k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Line
Count
Source
443
1.18k
    char* get_data(size_t index) const {
444
1.18k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.18k
    }
_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