Coverage Report

Created: 2026-08-21 13:39

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
661k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
340k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
40.7k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
9.90k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
37.6k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
13.2k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
95
62.7k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
95
12.4k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
95
14.9k
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
350
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
37.5k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
95
42.3k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
448
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
95
7.52k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
345
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
95
9.64k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
95
11.9k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
95
16.8k
    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
724
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
95
723
    Status init() override { return reset(); }
96
97
152M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
151M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
52.1k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
10.0k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
333k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
13.4k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
63.3k
    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
12.1k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
97
17.0k
    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
370
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
45.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
42.0k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
97
514
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
Line
Count
Source
97
7.57k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
97
255
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
97
5.11k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
25.4k
    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
630
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
97
643
    bool is_page_full() override { return _remain_element_capacity == 0; }
98
99
1.32M
    Status add(const uint8_t* vals, size_t* count) override {
100
1.32M
        return add_internal<false>(vals, count);
101
1.32M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
99
677k
    Status add(const uint8_t* vals, size_t* count) override {
100
677k
        return add_internal<false>(vals, count);
101
677k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
52.1k
    Status add(const uint8_t* vals, size_t* count) override {
100
52.1k
        return add_internal<false>(vals, count);
101
52.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
10.0k
    Status add(const uint8_t* vals, size_t* count) override {
100
10.0k
        return add_internal<false>(vals, count);
101
10.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
333k
    Status add(const uint8_t* vals, size_t* count) override {
100
333k
        return add_internal<false>(vals, count);
101
333k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
13.4k
    Status add(const uint8_t* vals, size_t* count) override {
100
13.4k
        return add_internal<false>(vals, count);
101
13.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
63.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
63.3k
        return add_internal<false>(vals, count);
101
63.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
99
12.1k
    Status add(const uint8_t* vals, size_t* count) override {
100
12.1k
        return add_internal<false>(vals, count);
101
12.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
99
17.0k
    Status add(const uint8_t* vals, size_t* count) override {
100
17.0k
        return add_internal<false>(vals, count);
101
17.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
370
    Status add(const uint8_t* vals, size_t* count) override {
100
370
        return add_internal<false>(vals, count);
101
370
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
45.3k
    Status add(const uint8_t* vals, size_t* count) override {
100
45.3k
        return add_internal<false>(vals, count);
101
45.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
42.0k
    Status add(const uint8_t* vals, size_t* count) override {
100
42.0k
        return add_internal<false>(vals, count);
101
42.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
99
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.57k
    Status add(const uint8_t* vals, size_t* count) override {
100
7.57k
        return add_internal<false>(vals, count);
101
7.57k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
255
    Status add(const uint8_t* vals, size_t* count) override {
100
255
        return add_internal<false>(vals, count);
101
255
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
99
5.11k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.11k
        return add_internal<false>(vals, count);
101
5.11k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
25.4k
    Status add(const uint8_t* vals, size_t* count) override {
100
25.4k
        return add_internal<false>(vals, count);
101
25.4k
    }
_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
630
    Status add(const uint8_t* vals, size_t* count) override {
100
630
        return add_internal<false>(vals, count);
101
630
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
99
643
    Status add(const uint8_t* vals, size_t* count) override {
100
643
        return add_internal<false>(vals, count);
101
643
    }
102
103
151M
    Status single_add(const uint8_t* vals, size_t* count) {
104
151M
        return add_internal<true>(vals, count);
105
151M
    }
106
107
    template <bool single>
108
148M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
148M
        DCHECK(!_finished);
110
148M
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
148M
        uint32_t to_add = cast_set<UInt32>(
126
148M
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
148M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
148M
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
148M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
153M
        _count += to_add;
134
153M
        _remain_element_capacity -= to_add;
135
153M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
153M
        *num_written = to_add;
138
153M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
152M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
152M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
152M
                        *reinterpret_cast<const uint32_t*>(vals);
149
152M
                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
152M
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
0
        memcpy(&_data[orig_size], vals, to_add_size);
158
153M
        return Status::OK();
159
148M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
677k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
677k
        DCHECK(!_finished);
110
677k
        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
677k
        uint32_t to_add = cast_set<UInt32>(
126
677k
                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
677k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
677k
        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
677k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
677k
        _count += to_add;
134
677k
        _remain_element_capacity -= to_add;
135
677k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
677k
        *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
677k
        memcpy(&_data[orig_size], vals, to_add_size);
158
677k
        return Status::OK();
159
677k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
147M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
147M
        DCHECK(!_finished);
110
147M
        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
147M
        uint32_t to_add = cast_set<UInt32>(
126
147M
                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
147M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
147M
        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
147M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
152M
        _count += to_add;
134
152M
        _remain_element_capacity -= to_add;
135
152M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
152M
        *num_written = to_add;
138
152M
        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
152M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
152M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
152M
                        *reinterpret_cast<const uint32_t*>(vals);
149
152M
                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
152M
        }
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
152M
        return Status::OK();
159
147M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
52.1k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
52.1k
        DCHECK(!_finished);
110
52.1k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
52.1k
        uint32_t to_add = cast_set<UInt32>(
126
52.1k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
52.1k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
52.1k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
52.1k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
52.1k
        _count += to_add;
134
52.1k
        _remain_element_capacity -= to_add;
135
52.1k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
52.1k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
52.1k
        memcpy(&_data[orig_size], vals, to_add_size);
158
52.1k
        return Status::OK();
159
52.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
10.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
10.0k
        DCHECK(!_finished);
110
10.0k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
10.0k
        uint32_t to_add = cast_set<UInt32>(
126
10.0k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
10.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
10.0k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
10.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
10.0k
        _count += to_add;
134
10.0k
        _remain_element_capacity -= to_add;
135
10.0k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
10.0k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
10.0k
        memcpy(&_data[orig_size], vals, to_add_size);
158
10.0k
        return Status::OK();
159
10.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
333k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
333k
        DCHECK(!_finished);
110
333k
        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
333k
        uint32_t to_add = cast_set<UInt32>(
126
333k
                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
333k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
333k
        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
333k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
333k
        _count += to_add;
134
333k
        _remain_element_capacity -= to_add;
135
333k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
333k
        *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
333k
        memcpy(&_data[orig_size], vals, to_add_size);
158
333k
        return Status::OK();
159
333k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
13.4k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
13.4k
        DCHECK(!_finished);
110
13.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
13.4k
        uint32_t to_add = cast_set<UInt32>(
126
13.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
13.4k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
13.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
13.4k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
13.4k
        _count += to_add;
134
13.4k
        _remain_element_capacity -= to_add;
135
13.4k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
13.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
13.4k
        memcpy(&_data[orig_size], vals, to_add_size);
158
13.4k
        return Status::OK();
159
13.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
63.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
63.3k
        DCHECK(!_finished);
110
63.3k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
63.3k
        uint32_t to_add = cast_set<UInt32>(
126
63.3k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
63.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
63.3k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
63.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
63.3k
        _count += to_add;
134
63.3k
        _remain_element_capacity -= to_add;
135
63.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
63.3k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
63.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
63.3k
        return Status::OK();
159
63.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
12.1k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
12.1k
        DCHECK(!_finished);
110
12.1k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
12.1k
        uint32_t to_add = cast_set<UInt32>(
126
12.1k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
12.1k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
12.1k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
12.1k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
12.1k
        _count += to_add;
134
12.1k
        _remain_element_capacity -= to_add;
135
12.1k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
12.1k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
12.1k
        memcpy(&_data[orig_size], vals, to_add_size);
158
12.1k
        return Status::OK();
159
12.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
17.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
17.0k
        DCHECK(!_finished);
110
17.0k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
17.0k
        uint32_t to_add = cast_set<UInt32>(
126
17.0k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
17.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
17.0k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
17.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
17.0k
        _count += to_add;
134
17.0k
        _remain_element_capacity -= to_add;
135
17.0k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
17.0k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
17.0k
        memcpy(&_data[orig_size], vals, to_add_size);
158
17.0k
        return Status::OK();
159
17.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
370
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
370
        DCHECK(!_finished);
110
370
        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
370
        uint32_t to_add = cast_set<UInt32>(
126
370
                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
370
        int to_add_size = to_add * SIZE_OF_TYPE;
129
370
        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
370
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
370
        _count += to_add;
134
370
        _remain_element_capacity -= to_add;
135
370
        _raw_data_size += to_add_size;
136
        // return added number through count
137
370
        *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
370
        memcpy(&_data[orig_size], vals, to_add_size);
158
370
        return Status::OK();
159
370
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
45.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
45.3k
        DCHECK(!_finished);
110
45.3k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
45.3k
        uint32_t to_add = cast_set<UInt32>(
126
45.3k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
45.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
45.3k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
45.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
45.3k
        _count += to_add;
134
45.3k
        _remain_element_capacity -= to_add;
135
45.3k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
45.3k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
45.3k
        memcpy(&_data[orig_size], vals, to_add_size);
158
45.3k
        return Status::OK();
159
45.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
42.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
42.0k
        DCHECK(!_finished);
110
42.0k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
42.0k
        uint32_t to_add = cast_set<UInt32>(
126
42.0k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
42.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
42.0k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
42.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
42.0k
        _count += to_add;
134
42.0k
        _remain_element_capacity -= to_add;
135
42.0k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
42.0k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
42.0k
        memcpy(&_data[orig_size], vals, to_add_size);
158
42.0k
        return Status::OK();
159
42.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
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.57k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
7.57k
        DCHECK(!_finished);
110
7.57k
        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.57k
        uint32_t to_add = cast_set<UInt32>(
126
7.57k
                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.57k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
7.57k
        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.57k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
7.57k
        _count += to_add;
134
7.57k
        _remain_element_capacity -= to_add;
135
7.57k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
7.57k
        *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.57k
        memcpy(&_data[orig_size], vals, to_add_size);
158
7.57k
        return Status::OK();
159
7.57k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
255
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
255
        DCHECK(!_finished);
110
255
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
255
        uint32_t to_add = cast_set<UInt32>(
126
255
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
255
        int to_add_size = to_add * SIZE_OF_TYPE;
129
255
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
255
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
255
        _count += to_add;
134
255
        _remain_element_capacity -= to_add;
135
255
        _raw_data_size += to_add_size;
136
        // return added number through count
137
255
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
255
        memcpy(&_data[orig_size], vals, to_add_size);
158
255
        return Status::OK();
159
255
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
5.11k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.11k
        DCHECK(!_finished);
110
5.11k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
5.11k
        uint32_t to_add = cast_set<UInt32>(
126
5.11k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
5.11k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.11k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
5.11k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.11k
        _count += to_add;
134
5.11k
        _remain_element_capacity -= to_add;
135
5.11k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.11k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
5.11k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.11k
        return Status::OK();
159
5.11k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
25.4k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
25.4k
        DCHECK(!_finished);
110
25.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
25.4k
        uint32_t to_add = cast_set<UInt32>(
126
25.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
25.4k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
25.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
25.4k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
25.4k
        _count += to_add;
134
25.4k
        _remain_element_capacity -= to_add;
135
25.4k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
25.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
25.4k
        memcpy(&_data[orig_size], vals, to_add_size);
158
25.4k
        return Status::OK();
159
25.4k
    }
_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
630
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
630
        DCHECK(!_finished);
110
630
        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
630
        uint32_t to_add = cast_set<UInt32>(
126
630
                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
630
        int to_add_size = to_add * SIZE_OF_TYPE;
129
630
        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
630
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
630
        _count += to_add;
134
630
        _remain_element_capacity -= to_add;
135
630
        _raw_data_size += to_add_size;
136
        // return added number through count
137
630
        *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
630
        memcpy(&_data[orig_size], vals, to_add_size);
158
630
        return Status::OK();
159
630
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
643
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
643
        DCHECK(!_finished);
110
643
        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
643
        uint32_t to_add = cast_set<UInt32>(
126
643
                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
643
        int to_add_size = to_add * SIZE_OF_TYPE;
129
643
        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
643
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
643
        _count += to_add;
134
643
        _remain_element_capacity -= to_add;
135
643
        _raw_data_size += to_add_size;
136
        // return added number through count
137
643
        *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
643
        memcpy(&_data[orig_size], vals, to_add_size);
158
643
        return Status::OK();
159
643
    }
160
161
663k
    Status finish(OwnedSlice* slice) override {
162
663k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
663k
        return Status::OK();
164
663k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
334k
    Status finish(OwnedSlice* slice) override {
162
334k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
334k
        return Status::OK();
164
334k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
39.5k
    Status finish(OwnedSlice* slice) override {
162
39.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
39.5k
        return Status::OK();
164
39.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
9.38k
    Status finish(OwnedSlice* slice) override {
162
9.38k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
9.38k
        return Status::OK();
164
9.38k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
41.0k
    Status finish(OwnedSlice* slice) override {
162
41.0k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
41.0k
        return Status::OK();
164
41.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
13.4k
    Status finish(OwnedSlice* slice) override {
162
13.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
13.4k
        return Status::OK();
164
13.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
62.6k
    Status finish(OwnedSlice* slice) override {
162
62.6k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
62.6k
        return Status::OK();
164
62.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
11.6k
    Status finish(OwnedSlice* slice) override {
162
11.6k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
11.6k
        return Status::OK();
164
11.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
14.9k
    Status finish(OwnedSlice* slice) override {
162
14.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
14.9k
        return Status::OK();
164
14.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
362
    Status finish(OwnedSlice* slice) override {
162
362
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
362
        return Status::OK();
164
362
    }
_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.3k
    Status finish(OwnedSlice* slice) override {
162
41.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
41.3k
        return Status::OK();
164
41.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
602
    Status finish(OwnedSlice* slice) override {
162
602
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
602
        return Status::OK();
164
602
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
7.66k
    Status finish(OwnedSlice* slice) override {
162
7.66k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
7.67k
        return Status::OK();
164
7.66k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
255
    Status finish(OwnedSlice* slice) override {
162
255
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
255
        return Status::OK();
164
255
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
9.64k
    Status finish(OwnedSlice* slice) override {
162
9.64k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
9.64k
        return Status::OK();
164
9.64k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
19.0k
    Status finish(OwnedSlice* slice) override {
162
19.0k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
19.0k
        return Status::OK();
164
19.0k
    }
_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
634
    Status finish(OwnedSlice* slice) override {
162
634
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
634
        return Status::OK();
164
634
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
631
    Status finish(OwnedSlice* slice) override {
162
631
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
631
        return Status::OK();
164
631
    }
165
166
1.60M
    Status reset() override {
167
1.60M
        RETURN_IF_CATCH_EXCEPTION({
168
1.60M
            size_t block_size = _options.data_page_size;
169
1.60M
            _count = 0;
170
1.60M
            _raw_data_size = 0;
171
1.60M
            _data.clear();
172
1.60M
            _data.reserve(block_size);
173
1.60M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.60M
                    << "buffer must be naturally-aligned";
175
1.60M
            _buffer.clear();
176
1.60M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.60M
            _finished = false;
178
1.60M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.60M
        });
180
1.60M
        return Status::OK();
181
1.60M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
166
951k
    Status reset() override {
167
951k
        RETURN_IF_CATCH_EXCEPTION({
168
951k
            size_t block_size = _options.data_page_size;
169
951k
            _count = 0;
170
951k
            _raw_data_size = 0;
171
951k
            _data.clear();
172
951k
            _data.reserve(block_size);
173
951k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
951k
                    << "buffer must be naturally-aligned";
175
951k
            _buffer.clear();
176
951k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
951k
            _finished = false;
178
951k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
951k
        });
180
954k
        return Status::OK();
181
951k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
80.3k
    Status reset() override {
167
80.3k
        RETURN_IF_CATCH_EXCEPTION({
168
80.3k
            size_t block_size = _options.data_page_size;
169
80.3k
            _count = 0;
170
80.3k
            _raw_data_size = 0;
171
80.3k
            _data.clear();
172
80.3k
            _data.reserve(block_size);
173
80.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
80.3k
                    << "buffer must be naturally-aligned";
175
80.3k
            _buffer.clear();
176
80.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
80.3k
            _finished = false;
178
80.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
80.3k
        });
180
80.4k
        return Status::OK();
181
80.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
166
19.2k
    Status reset() override {
167
19.2k
        RETURN_IF_CATCH_EXCEPTION({
168
19.2k
            size_t block_size = _options.data_page_size;
169
19.2k
            _count = 0;
170
19.2k
            _raw_data_size = 0;
171
19.2k
            _data.clear();
172
19.2k
            _data.reserve(block_size);
173
19.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
19.2k
                    << "buffer must be naturally-aligned";
175
19.2k
            _buffer.clear();
176
19.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
19.2k
            _finished = false;
178
19.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
19.2k
        });
180
19.3k
        return Status::OK();
181
19.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
78.6k
    Status reset() override {
167
78.6k
        RETURN_IF_CATCH_EXCEPTION({
168
78.6k
            size_t block_size = _options.data_page_size;
169
78.6k
            _count = 0;
170
78.6k
            _raw_data_size = 0;
171
78.6k
            _data.clear();
172
78.6k
            _data.reserve(block_size);
173
78.6k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
78.6k
                    << "buffer must be naturally-aligned";
175
78.6k
            _buffer.clear();
176
78.6k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
78.6k
            _finished = false;
178
78.6k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
78.6k
        });
180
78.7k
        return Status::OK();
181
78.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
166
26.7k
    Status reset() override {
167
26.7k
        RETURN_IF_CATCH_EXCEPTION({
168
26.7k
            size_t block_size = _options.data_page_size;
169
26.7k
            _count = 0;
170
26.7k
            _raw_data_size = 0;
171
26.7k
            _data.clear();
172
26.7k
            _data.reserve(block_size);
173
26.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
26.7k
                    << "buffer must be naturally-aligned";
175
26.7k
            _buffer.clear();
176
26.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
26.7k
            _finished = false;
178
26.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
26.7k
        });
180
26.7k
        return Status::OK();
181
26.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
166
125k
    Status reset() override {
167
125k
        RETURN_IF_CATCH_EXCEPTION({
168
125k
            size_t block_size = _options.data_page_size;
169
125k
            _count = 0;
170
125k
            _raw_data_size = 0;
171
125k
            _data.clear();
172
125k
            _data.reserve(block_size);
173
125k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
125k
                    << "buffer must be naturally-aligned";
175
125k
            _buffer.clear();
176
125k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
125k
            _finished = false;
178
125k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
125k
        });
180
125k
        return Status::OK();
181
125k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
166
24.0k
    Status reset() override {
167
24.0k
        RETURN_IF_CATCH_EXCEPTION({
168
24.0k
            size_t block_size = _options.data_page_size;
169
24.0k
            _count = 0;
170
24.0k
            _raw_data_size = 0;
171
24.0k
            _data.clear();
172
24.0k
            _data.reserve(block_size);
173
24.0k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
24.0k
                    << "buffer must be naturally-aligned";
175
24.0k
            _buffer.clear();
176
24.0k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
24.0k
            _finished = false;
178
24.0k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
24.0k
        });
180
24.0k
        return Status::OK();
181
24.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
166
29.8k
    Status reset() override {
167
29.8k
        RETURN_IF_CATCH_EXCEPTION({
168
29.8k
            size_t block_size = _options.data_page_size;
169
29.8k
            _count = 0;
170
29.8k
            _raw_data_size = 0;
171
29.8k
            _data.clear();
172
29.8k
            _data.reserve(block_size);
173
29.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
29.8k
                    << "buffer must be naturally-aligned";
175
29.8k
            _buffer.clear();
176
29.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
29.8k
            _finished = false;
178
29.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
29.8k
        });
180
29.8k
        return Status::OK();
181
29.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
166
712
    Status reset() override {
167
712
        RETURN_IF_CATCH_EXCEPTION({
168
712
            size_t block_size = _options.data_page_size;
169
712
            _count = 0;
170
712
            _raw_data_size = 0;
171
712
            _data.clear();
172
712
            _data.reserve(block_size);
173
712
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
712
                    << "buffer must be naturally-aligned";
175
712
            _buffer.clear();
176
712
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
712
            _finished = false;
178
712
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
712
        });
180
712
        return Status::OK();
181
712
    }
_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.7k
    Status reset() override {
167
83.7k
        RETURN_IF_CATCH_EXCEPTION({
168
83.7k
            size_t block_size = _options.data_page_size;
169
83.7k
            _count = 0;
170
83.7k
            _raw_data_size = 0;
171
83.7k
            _data.clear();
172
83.7k
            _data.reserve(block_size);
173
83.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
83.7k
                    << "buffer must be naturally-aligned";
175
83.7k
            _buffer.clear();
176
83.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
83.7k
            _finished = false;
178
83.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
83.7k
        });
180
83.8k
        return Status::OK();
181
83.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
166
1.05k
    Status reset() override {
167
1.05k
        RETURN_IF_CATCH_EXCEPTION({
168
1.05k
            size_t block_size = _options.data_page_size;
169
1.05k
            _count = 0;
170
1.05k
            _raw_data_size = 0;
171
1.05k
            _data.clear();
172
1.05k
            _data.reserve(block_size);
173
1.05k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.05k
                    << "buffer must be naturally-aligned";
175
1.05k
            _buffer.clear();
176
1.05k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.05k
            _finished = false;
178
1.05k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.05k
        });
180
1.05k
        return Status::OK();
181
1.05k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
Line
Count
Source
166
15.1k
    Status reset() override {
167
15.1k
        RETURN_IF_CATCH_EXCEPTION({
168
15.1k
            size_t block_size = _options.data_page_size;
169
15.1k
            _count = 0;
170
15.1k
            _raw_data_size = 0;
171
15.1k
            _data.clear();
172
15.1k
            _data.reserve(block_size);
173
15.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
15.1k
                    << "buffer must be naturally-aligned";
175
15.1k
            _buffer.clear();
176
15.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
15.1k
            _finished = false;
178
15.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
15.1k
        });
180
15.3k
        return Status::OK();
181
15.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
166
600
    Status reset() override {
167
600
        RETURN_IF_CATCH_EXCEPTION({
168
600
            size_t block_size = _options.data_page_size;
169
600
            _count = 0;
170
600
            _raw_data_size = 0;
171
600
            _data.clear();
172
600
            _data.reserve(block_size);
173
600
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
600
                    << "buffer must be naturally-aligned";
175
600
            _buffer.clear();
176
600
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
600
            _finished = false;
178
600
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
600
        });
180
600
        return Status::OK();
181
600
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
166
19.2k
    Status reset() override {
167
19.2k
        RETURN_IF_CATCH_EXCEPTION({
168
19.2k
            size_t block_size = _options.data_page_size;
169
19.2k
            _count = 0;
170
19.2k
            _raw_data_size = 0;
171
19.2k
            _data.clear();
172
19.2k
            _data.reserve(block_size);
173
19.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
19.2k
                    << "buffer must be naturally-aligned";
175
19.2k
            _buffer.clear();
176
19.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
19.2k
            _finished = false;
178
19.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
19.2k
        });
180
19.2k
        return Status::OK();
181
19.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
31.0k
    Status reset() override {
167
31.0k
        RETURN_IF_CATCH_EXCEPTION({
168
31.0k
            size_t block_size = _options.data_page_size;
169
31.0k
            _count = 0;
170
31.0k
            _raw_data_size = 0;
171
31.0k
            _data.clear();
172
31.0k
            _data.reserve(block_size);
173
31.0k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
31.0k
                    << "buffer must be naturally-aligned";
175
31.0k
            _buffer.clear();
176
31.0k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
31.0k
            _finished = false;
178
31.0k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
31.0k
        });
180
31.0k
        return Status::OK();
181
31.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
166
33.8k
    Status reset() override {
167
33.8k
        RETURN_IF_CATCH_EXCEPTION({
168
33.8k
            size_t block_size = _options.data_page_size;
169
33.8k
            _count = 0;
170
33.8k
            _raw_data_size = 0;
171
33.8k
            _data.clear();
172
33.8k
            _data.reserve(block_size);
173
33.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
33.8k
                    << "buffer must be naturally-aligned";
175
33.8k
            _buffer.clear();
176
33.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
33.8k
            _finished = false;
178
33.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
33.8k
        });
180
33.8k
        return Status::OK();
181
33.8k
    }
_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.36k
        return Status::OK();
181
1.35k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
166
1.35k
    Status reset() override {
167
1.35k
        RETURN_IF_CATCH_EXCEPTION({
168
1.35k
            size_t block_size = _options.data_page_size;
169
1.35k
            _count = 0;
170
1.35k
            _raw_data_size = 0;
171
1.35k
            _data.clear();
172
1.35k
            _data.reserve(block_size);
173
1.35k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.35k
                    << "buffer must be naturally-aligned";
175
1.35k
            _buffer.clear();
176
1.35k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.35k
            _finished = false;
178
1.35k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.35k
        });
180
1.35k
        return Status::OK();
181
1.35k
    }
182
183
4
    size_t count() const override { return _count; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
183
4
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5countEv
184
185
36.6k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
18.8k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
185
3.67k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
185
1.08k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
3.30k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
1.56k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
734
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
736
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
185
791
    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.62k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
2.20k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4sizeEv
Line
Count
Source
185
63
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4sizeEv
Line
Count
Source
185
56
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4sizeEv
Line
Count
Source
185
52
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4sizeEv
Line
Count
Source
185
204
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
185
341
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
185
1.14k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4sizeEv
Line
Count
Source
185
54
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4sizeEv
Line
Count
Source
185
76
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4sizeEv
Line
Count
Source
185
60
    uint64_t size() const override { return _buffer.size(); }
186
187
392k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
63.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
39.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
9.38k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
41.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
187
13.4k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
62.6k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
187
11.6k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
14.9k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE17get_raw_data_sizeEv
Line
Count
Source
187
362
    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.3k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
187
602
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
Line
Count
Source
187
7.66k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
187
255
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
187
9.64k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
19.0k
    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
634
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
187
631
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
659k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
338k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
40.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.89k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
37.5k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
13.2k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
62.6k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
12.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
14.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
350
            : _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.3k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
448
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
7.48k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
345
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
9.63k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
11.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
16.8k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1.22k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
726
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
723
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
192
193
663k
    OwnedSlice _finish(int final_size_of_type) {
194
663k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
663k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
663k
        int padding_elems = num_elems_after_padding - _count;
199
663k
        int padding_bytes = padding_elems * final_size_of_type;
200
17.9M
        for (int i = 0; i < padding_bytes; i++) {
201
17.2M
            _data.push_back(0);
202
17.2M
        }
203
204
        // reserve enough place for compression
205
663k
        _buffer.resize(
206
663k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
663k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
663k
        int64_t bytes =
210
663k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
663k
                                         num_elems_after_padding, final_size_of_type, 0);
212
663k
        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
663k
        encode_fixed32_le(&_buffer[0], _count);
222
663k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
663k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
663k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
663k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
663k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
663k
        return _buffer.build();
229
663k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
334k
    OwnedSlice _finish(int final_size_of_type) {
194
334k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
334k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
334k
        int padding_elems = num_elems_after_padding - _count;
199
334k
        int padding_bytes = padding_elems * final_size_of_type;
200
6.37M
        for (int i = 0; i < padding_bytes; i++) {
201
6.04M
            _data.push_back(0);
202
6.04M
        }
203
204
        // reserve enough place for compression
205
334k
        _buffer.resize(
206
334k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
334k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
334k
        int64_t bytes =
210
334k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
334k
                                         num_elems_after_padding, final_size_of_type, 0);
212
334k
        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
334k
        encode_fixed32_le(&_buffer[0], _count);
222
334k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
334k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
334k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
334k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
334k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
334k
        return _buffer.build();
229
334k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
39.5k
    OwnedSlice _finish(int final_size_of_type) {
194
39.5k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
39.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
39.5k
        int padding_elems = num_elems_after_padding - _count;
199
39.5k
        int padding_bytes = padding_elems * final_size_of_type;
200
250k
        for (int i = 0; i < padding_bytes; i++) {
201
211k
            _data.push_back(0);
202
211k
        }
203
204
        // reserve enough place for compression
205
39.5k
        _buffer.resize(
206
39.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
39.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
39.5k
        int64_t bytes =
210
39.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
39.5k
                                         num_elems_after_padding, final_size_of_type, 0);
212
39.5k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
39.5k
        encode_fixed32_le(&_buffer[0], _count);
222
39.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
39.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
39.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
39.5k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
39.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
39.5k
        return _buffer.build();
229
39.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
9.38k
    OwnedSlice _finish(int final_size_of_type) {
194
9.38k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
9.38k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
9.38k
        int padding_elems = num_elems_after_padding - _count;
199
9.38k
        int padding_bytes = padding_elems * final_size_of_type;
200
99.7k
        for (int i = 0; i < padding_bytes; i++) {
201
90.3k
            _data.push_back(0);
202
90.3k
        }
203
204
        // reserve enough place for compression
205
9.38k
        _buffer.resize(
206
9.38k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
9.38k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
9.38k
        int64_t bytes =
210
9.38k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
9.38k
                                         num_elems_after_padding, final_size_of_type, 0);
212
9.38k
        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.38k
        encode_fixed32_le(&_buffer[0], _count);
222
9.38k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
9.38k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
9.38k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
9.38k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
9.38k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
9.38k
        return _buffer.build();
229
9.38k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
41.0k
    OwnedSlice _finish(int final_size_of_type) {
194
41.0k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
41.0k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
41.0k
        int padding_elems = num_elems_after_padding - _count;
199
41.0k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.46M
        for (int i = 0; i < padding_bytes; i++) {
201
1.42M
            _data.push_back(0);
202
1.42M
        }
203
204
        // reserve enough place for compression
205
41.0k
        _buffer.resize(
206
41.0k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
41.0k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
41.0k
        int64_t bytes =
210
41.0k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
41.0k
                                         num_elems_after_padding, final_size_of_type, 0);
212
41.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
41.0k
        encode_fixed32_le(&_buffer[0], _count);
222
41.0k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
41.0k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
41.0k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
41.0k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
41.0k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
41.0k
        return _buffer.build();
229
41.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
13.4k
    OwnedSlice _finish(int final_size_of_type) {
194
13.4k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
13.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
13.4k
        int padding_elems = num_elems_after_padding - _count;
199
13.4k
        int padding_bytes = padding_elems * final_size_of_type;
200
917k
        for (int i = 0; i < padding_bytes; i++) {
201
903k
            _data.push_back(0);
202
903k
        }
203
204
        // reserve enough place for compression
205
13.4k
        _buffer.resize(
206
13.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
13.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
13.4k
        int64_t bytes =
210
13.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
13.4k
                                         num_elems_after_padding, final_size_of_type, 0);
212
13.4k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
13.4k
        encode_fixed32_le(&_buffer[0], _count);
222
13.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
13.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
13.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
13.4k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
13.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
13.4k
        return _buffer.build();
229
13.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
62.6k
    OwnedSlice _finish(int final_size_of_type) {
194
62.6k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
62.6k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
62.6k
        int padding_elems = num_elems_after_padding - _count;
199
62.6k
        int padding_bytes = padding_elems * final_size_of_type;
200
3.01M
        for (int i = 0; i < padding_bytes; i++) {
201
2.95M
            _data.push_back(0);
202
2.95M
        }
203
204
        // reserve enough place for compression
205
62.6k
        _buffer.resize(
206
62.6k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
62.6k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
62.6k
        int64_t bytes =
210
62.6k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
62.6k
                                         num_elems_after_padding, final_size_of_type, 0);
212
62.6k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
62.6k
        encode_fixed32_le(&_buffer[0], _count);
222
62.6k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
62.6k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
62.6k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
62.6k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
62.6k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
62.6k
        return _buffer.build();
229
62.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
11.6k
    OwnedSlice _finish(int final_size_of_type) {
194
11.6k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
11.6k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
11.6k
        int padding_elems = num_elems_after_padding - _count;
199
11.6k
        int padding_bytes = padding_elems * final_size_of_type;
200
249k
        for (int i = 0; i < padding_bytes; i++) {
201
237k
            _data.push_back(0);
202
237k
        }
203
204
        // reserve enough place for compression
205
11.6k
        _buffer.resize(
206
11.6k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
11.6k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
11.6k
        int64_t bytes =
210
11.6k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
11.6k
                                         num_elems_after_padding, final_size_of_type, 0);
212
11.6k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
11.6k
        encode_fixed32_le(&_buffer[0], _count);
222
11.6k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
11.6k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
11.6k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
11.6k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
11.6k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
11.6k
        return _buffer.build();
229
11.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
14.9k
    OwnedSlice _finish(int final_size_of_type) {
194
14.9k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
14.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
14.9k
        int padding_elems = num_elems_after_padding - _count;
199
14.9k
        int padding_bytes = padding_elems * final_size_of_type;
200
607k
        for (int i = 0; i < padding_bytes; i++) {
201
592k
            _data.push_back(0);
202
592k
        }
203
204
        // reserve enough place for compression
205
14.9k
        _buffer.resize(
206
14.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
14.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
14.9k
        int64_t bytes =
210
14.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
14.9k
                                         num_elems_after_padding, final_size_of_type, 0);
212
14.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
14.9k
        encode_fixed32_le(&_buffer[0], _count);
222
14.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
14.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
14.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
14.9k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
14.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
14.9k
        return _buffer.build();
229
14.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
362
    OwnedSlice _finish(int final_size_of_type) {
194
362
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
362
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
362
        int padding_elems = num_elems_after_padding - _count;
199
362
        int padding_bytes = padding_elems * final_size_of_type;
200
5.45k
        for (int i = 0; i < padding_bytes; i++) {
201
5.09k
            _data.push_back(0);
202
5.09k
        }
203
204
        // reserve enough place for compression
205
362
        _buffer.resize(
206
362
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
362
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
362
        int64_t bytes =
210
362
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
362
                                         num_elems_after_padding, final_size_of_type, 0);
212
362
        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
362
        encode_fixed32_le(&_buffer[0], _count);
222
362
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
362
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
362
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
362
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
362
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
362
        return _buffer.build();
229
362
    }
_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
810k
        for (int i = 0; i < padding_bytes; i++) {
201
772k
            _data.push_back(0);
202
772k
        }
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.3k
    OwnedSlice _finish(int final_size_of_type) {
194
41.3k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
41.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
41.3k
        int padding_elems = num_elems_after_padding - _count;
199
41.3k
        int padding_bytes = padding_elems * final_size_of_type;
200
1.73M
        for (int i = 0; i < padding_bytes; i++) {
201
1.69M
            _data.push_back(0);
202
1.69M
        }
203
204
        // reserve enough place for compression
205
41.3k
        _buffer.resize(
206
41.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
41.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
41.3k
        int64_t bytes =
210
41.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
41.3k
                                         num_elems_after_padding, final_size_of_type, 0);
212
41.3k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
41.3k
        encode_fixed32_le(&_buffer[0], _count);
222
41.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
41.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
41.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
41.3k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
41.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
41.3k
        return _buffer.build();
229
41.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
193
602
    OwnedSlice _finish(int final_size_of_type) {
194
602
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
602
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
602
        int padding_elems = num_elems_after_padding - _count;
199
602
        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
602
        _buffer.resize(
206
602
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
602
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
602
        int64_t bytes =
210
602
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
602
                                         num_elems_after_padding, final_size_of_type, 0);
212
602
        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
602
        encode_fixed32_le(&_buffer[0], _count);
222
602
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
602
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
602
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
602
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
602
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
602
        return _buffer.build();
229
602
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
Line
Count
Source
193
7.66k
    OwnedSlice _finish(int final_size_of_type) {
194
7.66k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
7.66k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
7.66k
        int padding_elems = num_elems_after_padding - _count;
199
7.66k
        int padding_bytes = padding_elems * final_size_of_type;
200
399k
        for (int i = 0; i < padding_bytes; i++) {
201
391k
            _data.push_back(0);
202
391k
        }
203
204
        // reserve enough place for compression
205
7.66k
        _buffer.resize(
206
7.66k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
7.66k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
7.66k
        int64_t bytes =
210
7.66k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
7.66k
                                         num_elems_after_padding, final_size_of_type, 0);
212
7.66k
        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.66k
        encode_fixed32_le(&_buffer[0], _count);
222
7.66k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
7.66k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
7.66k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
7.66k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
7.66k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
7.66k
        return _buffer.build();
229
7.66k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
193
255
    OwnedSlice _finish(int final_size_of_type) {
194
255
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
255
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
255
        int padding_elems = num_elems_after_padding - _count;
199
255
        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
255
        _buffer.resize(
206
255
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
255
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
255
        int64_t bytes =
210
255
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
255
                                         num_elems_after_padding, final_size_of_type, 0);
212
255
        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
255
        encode_fixed32_le(&_buffer[0], _count);
222
255
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
255
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
255
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
255
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
255
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
255
        return _buffer.build();
229
255
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
193
9.64k
    OwnedSlice _finish(int final_size_of_type) {
194
9.64k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
9.64k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
9.64k
        int padding_elems = num_elems_after_padding - _count;
199
9.64k
        int padding_bytes = padding_elems * final_size_of_type;
200
116k
        for (int i = 0; i < padding_bytes; i++) {
201
107k
            _data.push_back(0);
202
107k
        }
203
204
        // reserve enough place for compression
205
9.64k
        _buffer.resize(
206
9.64k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
9.64k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
9.64k
        int64_t bytes =
210
9.64k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
9.64k
                                         num_elems_after_padding, final_size_of_type, 0);
212
9.64k
        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.64k
        encode_fixed32_le(&_buffer[0], _count);
222
9.64k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
9.64k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
9.64k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
9.64k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
9.64k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
9.64k
        return _buffer.build();
229
9.64k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
19.0k
    OwnedSlice _finish(int final_size_of_type) {
194
19.0k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
19.0k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
19.0k
        int padding_elems = num_elems_after_padding - _count;
199
19.0k
        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.0k
        _buffer.resize(
206
19.0k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
19.0k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
19.0k
        int64_t bytes =
210
19.0k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
19.0k
                                         num_elems_after_padding, final_size_of_type, 0);
212
19.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
19.0k
        encode_fixed32_le(&_buffer[0], _count);
222
19.0k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
19.0k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
19.0k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
19.0k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
19.0k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
19.0k
        return _buffer.build();
229
19.0k
    }
_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
634
    OwnedSlice _finish(int final_size_of_type) {
194
634
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
634
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
634
        int padding_elems = num_elems_after_padding - _count;
199
634
        int padding_bytes = padding_elems * final_size_of_type;
200
13.0k
        for (int i = 0; i < padding_bytes; i++) {
201
12.3k
            _data.push_back(0);
202
12.3k
        }
203
204
        // reserve enough place for compression
205
634
        _buffer.resize(
206
634
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
634
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
634
        int64_t bytes =
210
634
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
634
                                         num_elems_after_padding, final_size_of_type, 0);
212
634
        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
634
        encode_fixed32_le(&_buffer[0], _count);
222
634
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
634
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
634
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
634
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
634
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
634
        return _buffer.build();
229
634
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
193
631
    OwnedSlice _finish(int final_size_of_type) {
194
631
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
631
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
631
        int padding_elems = num_elems_after_padding - _count;
199
631
        int padding_bytes = padding_elems * final_size_of_type;
200
51.5k
        for (int i = 0; i < padding_bytes; i++) {
201
50.9k
            _data.push_back(0);
202
50.9k
        }
203
204
        // reserve enough place for compression
205
631
        _buffer.resize(
206
631
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
631
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
631
        int64_t bytes =
210
631
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
631
                                         num_elems_after_padding, final_size_of_type, 0);
212
631
        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
631
        encode_fixed32_le(&_buffer[0], _count);
222
631
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
631
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
631
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
631
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
631
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
631
        return _buffer.build();
229
631
    }
230
231
    using CppType = typename TypeTraits<Type>::CppType;
232
233
    CppType cell(int idx) const {
234
        DCHECK_GE(idx, 0);
235
        CppType ret;
236
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
237
        return ret;
238
    }
239
240
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
241
    PageBuilderOptions _options;
242
    uint32_t _count;
243
    uint32_t _remain_element_capacity;
244
    bool _finished;
245
    faststring _data;
246
    faststring _buffer;
247
    uint64_t _raw_data_size = 0;
248
};
249
250
inline Status parse_bit_shuffle_header(const Slice& data, size_t& num_elements,
251
                                       size_t& compressed_size, size_t& num_element_after_padding,
252
2.14M
                                       int& size_of_element) {
253
2.14M
    if (data.size < BITSHUFFLE_PAGE_HEADER_SIZE) {
254
0
        return Status::InternalError("file corruption: invalid data size:{}, header size:{}",
255
0
                                     data.size, BITSHUFFLE_PAGE_HEADER_SIZE);
256
0
    }
257
258
2.14M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
2.14M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
2.14M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
2.14M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
2.14M
    if (num_element_after_padding != ALIGN_UP(num_elements, 8)) {
263
0
        return Status::InternalError(
264
0
                "num of element information corrupted,"
265
0
                " _num_element_after_padding:{}, _num_elements:{}, expected_padding:{},"
266
0
                " compressed_size:{}, size_of_element:{}, data_size:{}",
267
0
                num_element_after_padding, num_elements, ALIGN_UP(num_elements, 8), compressed_size,
268
0
                size_of_element, data.size);
269
0
    }
270
2.14M
    switch (size_of_element) {
271
151k
    case 1:
272
182k
    case 2:
273
185k
    case 3:
274
1.45M
    case 4:
275
2.03M
    case 8:
276
2.03M
    case 12:
277
2.14M
    case 16:
278
2.14M
    case 32:
279
2.14M
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
2.14M
    }
283
2.14M
    return Status::OK();
284
2.14M
}
285
286
template <FieldType Type>
287
class BitShufflePageDecoder : public PageDecoder {
288
public:
289
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
290
1.07M
            : _data(data),
291
1.07M
              _options(options),
292
1.07M
              _parsed(false),
293
1.07M
              _num_elements(0),
294
1.07M
              _num_element_after_padding(0),
295
1.07M
              _size_of_element(0),
296
1.07M
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
538k
            : _data(data),
291
538k
              _options(options),
292
538k
              _parsed(false),
293
538k
              _num_elements(0),
294
538k
              _num_element_after_padding(0),
295
538k
              _size_of_element(0),
296
538k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
75.7k
            : _data(data),
291
75.7k
              _options(options),
292
75.7k
              _parsed(false),
293
75.7k
              _num_elements(0),
294
75.7k
              _num_element_after_padding(0),
295
75.7k
              _size_of_element(0),
296
75.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
15.5k
            : _data(data),
291
15.5k
              _options(options),
292
15.5k
              _parsed(false),
293
15.5k
              _num_elements(0),
294
15.5k
              _num_element_after_padding(0),
295
15.5k
              _size_of_element(0),
296
15.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
52.9k
            : _data(data),
291
52.9k
              _options(options),
292
52.9k
              _parsed(false),
293
52.9k
              _num_elements(0),
294
52.9k
              _num_element_after_padding(0),
295
52.9k
              _size_of_element(0),
296
52.9k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
21.2k
            : _data(data),
291
21.2k
              _options(options),
292
21.2k
              _parsed(false),
293
21.2k
              _num_elements(0),
294
21.2k
              _num_element_after_padding(0),
295
21.2k
              _size_of_element(0),
296
21.2k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
84.9k
            : _data(data),
291
84.9k
              _options(options),
292
84.9k
              _parsed(false),
293
84.9k
              _num_elements(0),
294
84.9k
              _num_element_after_padding(0),
295
84.9k
              _size_of_element(0),
296
84.9k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
19.6k
            : _data(data),
291
19.6k
              _options(options),
292
19.6k
              _parsed(false),
293
19.6k
              _num_elements(0),
294
19.6k
              _num_element_after_padding(0),
295
19.6k
              _size_of_element(0),
296
19.6k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
29.2k
            : _data(data),
291
29.2k
              _options(options),
292
29.2k
              _parsed(false),
293
29.2k
              _num_elements(0),
294
29.2k
              _num_element_after_padding(0),
295
29.2k
              _size_of_element(0),
296
29.2k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.51k
            : _data(data),
291
1.51k
              _options(options),
292
1.51k
              _parsed(false),
293
1.51k
              _num_elements(0),
294
1.51k
              _num_element_after_padding(0),
295
1.51k
              _size_of_element(0),
296
1.51k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
58.8k
            : _data(data),
291
58.8k
              _options(options),
292
58.8k
              _parsed(false),
293
58.8k
              _num_elements(0),
294
58.8k
              _num_element_after_padding(0),
295
58.8k
              _size_of_element(0),
296
58.8k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
65.1k
            : _data(data),
291
65.1k
              _options(options),
292
65.1k
              _parsed(false),
293
65.1k
              _num_elements(0),
294
65.1k
              _num_element_after_padding(0),
295
65.1k
              _size_of_element(0),
296
65.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
2.16k
            : _data(data),
291
2.16k
              _options(options),
292
2.16k
              _parsed(false),
293
2.16k
              _num_elements(0),
294
2.16k
              _num_element_after_padding(0),
295
2.16k
              _size_of_element(0),
296
2.16k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
16.3k
            : _data(data),
291
16.3k
              _options(options),
292
16.3k
              _parsed(false),
293
16.3k
              _num_elements(0),
294
16.3k
              _num_element_after_padding(0),
295
16.3k
              _size_of_element(0),
296
16.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.37k
            : _data(data),
291
1.37k
              _options(options),
292
1.37k
              _parsed(false),
293
1.37k
              _num_elements(0),
294
1.37k
              _num_element_after_padding(0),
295
1.37k
              _size_of_element(0),
296
1.37k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
15.4k
            : _data(data),
291
15.4k
              _options(options),
292
15.4k
              _parsed(false),
293
15.4k
              _num_elements(0),
294
15.4k
              _num_element_after_padding(0),
295
15.4k
              _size_of_element(0),
296
15.4k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
40.0k
            : _data(data),
291
40.0k
              _options(options),
292
40.0k
              _parsed(false),
293
40.0k
              _num_elements(0),
294
40.0k
              _num_element_after_padding(0),
295
40.0k
              _size_of_element(0),
296
40.0k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
29.4k
            : _data(data),
291
29.4k
              _options(options),
292
29.4k
              _parsed(false),
293
29.4k
              _num_elements(0),
294
29.4k
              _num_element_after_padding(0),
295
29.4k
              _size_of_element(0),
296
29.4k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.75k
            : _data(data),
291
1.75k
              _options(options),
292
1.75k
              _parsed(false),
293
1.75k
              _num_elements(0),
294
1.75k
              _num_element_after_padding(0),
295
1.75k
              _size_of_element(0),
296
1.75k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
946
            : _data(data),
291
946
              _options(options),
292
946
              _parsed(false),
293
946
              _num_elements(0),
294
946
              _num_element_after_padding(0),
295
946
              _size_of_element(0),
296
946
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
985
            : _data(data),
291
985
              _options(options),
292
985
              _parsed(false),
293
985
              _num_elements(0),
294
985
              _num_element_after_padding(0),
295
985
              _size_of_element(0),
296
985
              _cur_index(0) {}
297
298
1.07M
    Status init() override {
299
1.07M
        CHECK(!_parsed);
300
1.07M
        size_t unused;
301
1.07M
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.07M
                                                 _num_element_after_padding, _size_of_element));
303
304
1.07M
        if (_data.size !=
305
1.07M
            _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.07M
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.07M
                     _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.07M
        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.07M
        _parsed = true;
325
1.07M
        return Status::OK();
326
1.07M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
298
538k
    Status init() override {
299
538k
        CHECK(!_parsed);
300
538k
        size_t unused;
301
538k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
538k
                                                 _num_element_after_padding, _size_of_element));
303
304
538k
        if (_data.size !=
305
538k
            _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
538k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
538k
                     _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
538k
        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
538k
        _parsed = true;
325
538k
        return Status::OK();
326
538k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
75.7k
    Status init() override {
299
75.7k
        CHECK(!_parsed);
300
75.7k
        size_t unused;
301
75.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
75.7k
                                                 _num_element_after_padding, _size_of_element));
303
304
75.7k
        if (_data.size !=
305
75.7k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
75.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
75.7k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
75.7k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
75.7k
        _parsed = true;
325
75.7k
        return Status::OK();
326
75.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
15.4k
    Status init() override {
299
15.4k
        CHECK(!_parsed);
300
15.4k
        size_t unused;
301
15.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
15.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
15.4k
        if (_data.size !=
305
15.4k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
15.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
15.4k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
15.4k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
15.4k
        _parsed = true;
325
15.4k
        return Status::OK();
326
15.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
52.8k
    Status init() override {
299
52.8k
        CHECK(!_parsed);
300
52.8k
        size_t unused;
301
52.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
52.8k
                                                 _num_element_after_padding, _size_of_element));
303
304
52.8k
        if (_data.size !=
305
52.8k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
52.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
52.8k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
52.8k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
52.8k
        _parsed = true;
325
52.8k
        return Status::OK();
326
52.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
298
21.2k
    Status init() override {
299
21.2k
        CHECK(!_parsed);
300
21.2k
        size_t unused;
301
21.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
21.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
21.2k
        if (_data.size !=
305
21.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
21.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
21.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
21.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
21.2k
        _parsed = true;
325
21.2k
        return Status::OK();
326
21.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
298
84.9k
    Status init() override {
299
84.9k
        CHECK(!_parsed);
300
84.9k
        size_t unused;
301
84.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
84.9k
                                                 _num_element_after_padding, _size_of_element));
303
304
84.9k
        if (_data.size !=
305
84.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
84.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
84.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
84.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
84.9k
        _parsed = true;
325
84.9k
        return Status::OK();
326
84.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
298
19.6k
    Status init() override {
299
19.6k
        CHECK(!_parsed);
300
19.6k
        size_t unused;
301
19.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
19.6k
                                                 _num_element_after_padding, _size_of_element));
303
304
19.6k
        if (_data.size !=
305
19.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
19.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
19.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
19.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
19.6k
        _parsed = true;
325
19.6k
        return Status::OK();
326
19.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
298
29.2k
    Status init() override {
299
29.2k
        CHECK(!_parsed);
300
29.2k
        size_t unused;
301
29.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
29.2k
                                                 _num_element_after_padding, _size_of_element));
303
304
29.2k
        if (_data.size !=
305
29.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
29.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
29.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
29.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
29.2k
        _parsed = true;
325
29.2k
        return Status::OK();
326
29.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
1.51k
    Status init() override {
299
1.51k
        CHECK(!_parsed);
300
1.51k
        size_t unused;
301
1.51k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.51k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.51k
        if (_data.size !=
305
1.51k
            _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.51k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.51k
                     _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.51k
        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.51k
        _parsed = true;
325
1.51k
        return Status::OK();
326
1.51k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
58.8k
    Status init() override {
299
58.8k
        CHECK(!_parsed);
300
58.8k
        size_t unused;
301
58.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
58.8k
                                                 _num_element_after_padding, _size_of_element));
303
304
58.8k
        if (_data.size !=
305
58.8k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
58.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
58.8k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
58.8k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
58.8k
        _parsed = true;
325
58.8k
        return Status::OK();
326
58.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
298
65.1k
    Status init() override {
299
65.1k
        CHECK(!_parsed);
300
65.1k
        size_t unused;
301
65.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
65.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
65.1k
        if (_data.size !=
305
65.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
65.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
65.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
65.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
65.1k
        _parsed = true;
325
65.1k
        return Status::OK();
326
65.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
298
2.16k
    Status init() override {
299
2.16k
        CHECK(!_parsed);
300
2.16k
        size_t unused;
301
2.16k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
2.16k
                                                 _num_element_after_padding, _size_of_element));
303
304
2.16k
        if (_data.size !=
305
2.16k
            _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.16k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
2.16k
                     _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.16k
        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.16k
        _parsed = true;
325
2.16k
        return Status::OK();
326
2.16k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
298
16.3k
    Status init() override {
299
16.3k
        CHECK(!_parsed);
300
16.3k
        size_t unused;
301
16.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
16.3k
                                                 _num_element_after_padding, _size_of_element));
303
304
16.3k
        if (_data.size !=
305
16.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
16.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
16.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
16.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
16.3k
        _parsed = true;
325
16.3k
        return Status::OK();
326
16.3k
    }
_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.4k
    Status init() override {
299
15.4k
        CHECK(!_parsed);
300
15.4k
        size_t unused;
301
15.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
15.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
15.4k
        if (_data.size !=
305
15.4k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
15.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
15.4k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
15.4k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
15.4k
        _parsed = true;
325
15.4k
        return Status::OK();
326
15.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
298
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
29.4k
    Status init() override {
299
29.4k
        CHECK(!_parsed);
300
29.4k
        size_t unused;
301
29.4k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
29.4k
                                                 _num_element_after_padding, _size_of_element));
303
304
29.4k
        if (_data.size !=
305
29.4k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
29.4k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
29.4k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
29.4k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
29.4k
        _parsed = true;
325
29.4k
        return Status::OK();
326
29.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
298
1.75k
    Status init() override {
299
1.75k
        CHECK(!_parsed);
300
1.75k
        size_t unused;
301
1.75k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.75k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.75k
        if (_data.size !=
305
1.75k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.75k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.75k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.75k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.75k
        _parsed = true;
325
1.75k
        return Status::OK();
326
1.75k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
298
945
    Status init() override {
299
945
        CHECK(!_parsed);
300
945
        size_t unused;
301
945
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
945
                                                 _num_element_after_padding, _size_of_element));
303
304
945
        if (_data.size !=
305
945
            _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
945
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
945
                     _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
945
        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
945
        _parsed = true;
325
945
        return Status::OK();
326
945
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
298
983
    Status init() override {
299
983
        CHECK(!_parsed);
300
983
        size_t unused;
301
983
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
983
                                                 _num_element_after_padding, _size_of_element));
303
304
983
        if (_data.size !=
305
983
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
983
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
983
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
983
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
983
        _parsed = true;
325
983
        return Status::OK();
326
983
    }
327
328
    // If the page only contains null, then _num_elements == 0, and the nullmap has
329
    // some value. But in _seek_columns --> seek_to_ordinal --> _seek_to_pos_in_page
330
    // in this call stack it will pass pos == 0 to this method. Although we can add some
331
    // code such as check if the count == 0, then skip seek, but there are other method such
332
    // as init will also call seek with pos == 0. And the seek is useless when _num_elements
333
    // == 0, because next batch will return empty in this method.
334
4.46M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
4.46M
        if (_num_elements == 0) [[unlikely]] {
337
3.96k
            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.96k
        }
342
343
4.46M
        DCHECK_LE(pos, _num_elements);
344
4.46M
        _cur_index = pos;
345
4.46M
        return Status::OK();
346
4.46M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
2.13M
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
2.13M
        if (_num_elements == 0) [[unlikely]] {
337
2.00k
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
2.00k
        }
342
343
2.13M
        DCHECK_LE(pos, _num_elements);
344
2.13M
        _cur_index = pos;
345
2.13M
        return Status::OK();
346
2.13M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
306k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
306k
        if (_num_elements == 0) [[unlikely]] {
337
528
            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
528
        }
342
343
306k
        DCHECK_LE(pos, _num_elements);
344
306k
        _cur_index = pos;
345
306k
        return Status::OK();
346
306k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
219k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
219k
        if (_num_elements == 0) [[unlikely]] {
337
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_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
154k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
154k
        if (_num_elements == 0) [[unlikely]] {
337
803
            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
803
        }
342
343
154k
        DCHECK_LE(pos, _num_elements);
344
154k
        _cur_index = pos;
345
154k
        return Status::OK();
346
154k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
334
119k
    Status seek_to_position_in_page(size_t pos) override {
335
119k
        DCHECK(_parsed) << "Must call init()";
336
119k
        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
119k
        DCHECK_LE(pos, _num_elements);
344
119k
        _cur_index = pos;
345
119k
        return Status::OK();
346
119k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
334
12.3k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
12.3k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
12.3k
        DCHECK_LE(pos, _num_elements);
344
12.3k
        _cur_index = pos;
345
12.3k
        return Status::OK();
346
12.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
223k
    Status seek_to_position_in_page(size_t pos) override {
335
223k
        DCHECK(_parsed) << "Must call init()";
336
223k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
223k
        DCHECK_LE(pos, _num_elements);
344
223k
        _cur_index = pos;
345
223k
        return Status::OK();
346
223k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
334
201k
    Status seek_to_position_in_page(size_t pos) override {
335
201k
        DCHECK(_parsed) << "Must call init()";
336
201k
        if (_num_elements == 0) [[unlikely]] {
337
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
201k
        DCHECK_LE(pos, _num_elements);
344
201k
        _cur_index = pos;
345
201k
        return Status::OK();
346
201k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
334
209k
    Status seek_to_position_in_page(size_t pos) override {
335
209k
        DCHECK(_parsed) << "Must call init()";
336
209k
        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
209k
        DCHECK_LE(pos, _num_elements);
344
209k
        _cur_index = pos;
345
209k
        return Status::OK();
346
209k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
334
465k
    Status seek_to_position_in_page(size_t pos) override {
335
18.4E
        DCHECK(_parsed) << "Must call init()";
336
465k
        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
465k
        DCHECK_LE(pos, _num_elements);
344
465k
        _cur_index = pos;
345
465k
        return Status::OK();
346
465k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
334
76.8k
    Status seek_to_position_in_page(size_t pos) override {
335
76.8k
        DCHECK(_parsed) << "Must call init()";
336
76.8k
        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
76.8k
        DCHECK_LE(pos, _num_elements);
344
76.8k
        _cur_index = pos;
345
76.8k
        return Status::OK();
346
76.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
196k
    Status seek_to_position_in_page(size_t pos) override {
335
196k
        DCHECK(_parsed) << "Must call init()";
336
196k
        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
196k
        DCHECK_LE(pos, _num_elements);
344
196k
        _cur_index = pos;
345
196k
        return Status::OK();
346
196k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
334
7.27k
    Status seek_to_position_in_page(size_t pos) override {
335
7.27k
        DCHECK(_parsed) << "Must call init()";
336
7.27k
        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.27k
        DCHECK_LE(pos, _num_elements);
344
7.27k
        _cur_index = pos;
345
7.27k
        return Status::OK();
346
7.27k
    }
_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
867
    Status seek_to_position_in_page(size_t pos) override {
335
867
        DCHECK(_parsed) << "Must call init()";
336
867
        if (_num_elements == 0) [[unlikely]] {
337
27
            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
27
        }
342
343
867
        DCHECK_LE(pos, _num_elements);
344
867
        _cur_index = pos;
345
867
        return Status::OK();
346
867
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
334
17.6k
    Status seek_to_position_in_page(size_t pos) override {
335
17.6k
        DCHECK(_parsed) << "Must call init()";
336
17.6k
        if (_num_elements == 0) [[unlikely]] {
337
12
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
12
        }
342
343
17.6k
        DCHECK_LE(pos, _num_elements);
344
17.6k
        _cur_index = pos;
345
17.6k
        return Status::OK();
346
17.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Line
Count
Source
334
119k
    Status seek_to_position_in_page(size_t pos) override {
335
119k
        DCHECK(_parsed) << "Must call init()";
336
119k
        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
119k
        DCHECK_LE(pos, _num_elements);
344
119k
        _cur_index = pos;
345
119k
        return Status::OK();
346
119k
    }
_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
2.01M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
2.01M
        DCHECK(_parsed);
389
2.01M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
2.01M
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
2.01M
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
2.01M
        *n = max_fetch;
398
2.01M
        if constexpr (forward_index) {
399
1.82M
            _cur_index += max_fetch;
400
1.82M
        }
401
402
2.01M
        return Status::OK();
403
2.01M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
849k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
849k
        DCHECK(_parsed);
389
849k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
849k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
849k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
849k
        *n = max_fetch;
398
849k
        if constexpr (forward_index) {
399
849k
            _cur_index += max_fetch;
400
849k
        }
401
402
849k
        return Status::OK();
403
849k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
202k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
202k
        DCHECK(_parsed);
389
202k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
202k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
202k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
202k
        *n = max_fetch;
398
202k
        if constexpr (forward_index) {
399
202k
            _cur_index += max_fetch;
400
202k
        }
401
402
202k
        return Status::OK();
403
202k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
15.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
15.9k
        DCHECK(_parsed);
389
15.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
15.9k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
15.9k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
15.9k
        *n = max_fetch;
398
15.9k
        if constexpr (forward_index) {
399
15.9k
            _cur_index += max_fetch;
400
15.9k
        }
401
402
15.9k
        return Status::OK();
403
15.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
72.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
72.9k
        DCHECK(_parsed);
389
72.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
72.9k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
72.9k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
72.9k
        *n = max_fetch;
398
72.9k
        if constexpr (forward_index) {
399
72.9k
            _cur_index += max_fetch;
400
72.9k
        }
401
402
72.9k
        return Status::OK();
403
72.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
17.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
17.4k
        DCHECK(_parsed);
389
17.4k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
17.4k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
17.4k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
17.4k
        *n = max_fetch;
398
17.4k
        if constexpr (forward_index) {
399
17.4k
            _cur_index += max_fetch;
400
17.4k
        }
401
402
17.4k
        return Status::OK();
403
17.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
139k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
139k
        DCHECK(_parsed);
389
139k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
139k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
139k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
139k
        *n = max_fetch;
398
139k
        if constexpr (forward_index) {
399
139k
            _cur_index += max_fetch;
400
139k
        }
401
402
139k
        return Status::OK();
403
139k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
184k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
184k
        DCHECK(_parsed);
389
184k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
184k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
184k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
184k
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
184k
        return Status::OK();
403
184k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
14.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
14.6k
        DCHECK(_parsed);
389
14.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
14.6k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
14.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
14.6k
        *n = max_fetch;
398
14.6k
        if constexpr (forward_index) {
399
14.6k
            _cur_index += max_fetch;
400
14.6k
        }
401
402
14.6k
        return Status::OK();
403
14.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
23.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
23.0k
        DCHECK(_parsed);
389
23.0k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
23.0k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
23.0k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
23.0k
        *n = max_fetch;
398
23.0k
        if constexpr (forward_index) {
399
23.0k
            _cur_index += max_fetch;
400
23.0k
        }
401
402
23.0k
        return Status::OK();
403
23.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.58k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.58k
        DCHECK(_parsed);
389
3.58k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.58k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.58k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.58k
        *n = max_fetch;
398
3.58k
        if constexpr (forward_index) {
399
3.58k
            _cur_index += max_fetch;
400
3.58k
        }
401
402
3.58k
        return Status::OK();
403
3.58k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
342k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
342k
        DCHECK(_parsed);
389
342k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
342k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
342k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
342k
        *n = max_fetch;
398
342k
        if constexpr (forward_index) {
399
342k
            _cur_index += max_fetch;
400
342k
        }
401
402
342k
        return Status::OK();
403
342k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
67.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
67.6k
        DCHECK(_parsed);
389
67.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
67.6k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
67.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
67.6k
        *n = max_fetch;
398
67.6k
        if constexpr (forward_index) {
399
67.6k
            _cur_index += max_fetch;
400
67.6k
        }
401
402
67.6k
        return Status::OK();
403
67.6k
    }
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.13k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.13k
        DCHECK(_parsed);
389
1.13k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.13k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.13k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.13k
        *n = max_fetch;
398
1.13k
        if constexpr (forward_index) {
399
1.13k
            _cur_index += max_fetch;
400
1.13k
        }
401
402
1.13k
        return Status::OK();
403
1.13k
    }
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.36k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
8.36k
        DCHECK(_parsed);
389
8.36k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
8.36k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
8.36k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
8.36k
        *n = max_fetch;
398
8.36k
        if constexpr (forward_index) {
399
8.36k
            _cur_index += max_fetch;
400
8.36k
        }
401
402
8.36k
        return Status::OK();
403
8.36k
    }
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.24k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
1.24k
        DCHECK(_parsed);
389
1.24k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
1.24k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
1.24k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
1.24k
        *n = max_fetch;
398
1.24k
        if constexpr (forward_index) {
399
1.24k
            _cur_index += max_fetch;
400
1.24k
        }
401
402
1.24k
        return Status::OK();
403
1.24k
    }
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.12k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
9.12k
        DCHECK(_parsed);
389
9.12k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
9.12k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
9.12k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
9.12k
        *n = max_fetch;
398
9.12k
        if constexpr (forward_index) {
399
9.12k
            _cur_index += max_fetch;
400
9.12k
        }
401
402
9.12k
        return Status::OK();
403
9.12k
    }
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.3k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
31.3k
        DCHECK(_parsed);
389
31.3k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
31.3k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
31.3k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
31.3k
        *n = max_fetch;
398
31.3k
        if constexpr (forward_index) {
399
31.3k
            _cur_index += max_fetch;
400
31.3k
        }
401
402
31.3k
        return Status::OK();
403
31.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
21.3k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
21.3k
        DCHECK(_parsed);
389
21.3k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
21.3k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
21.3k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
21.3k
        *n = max_fetch;
398
21.3k
        if constexpr (forward_index) {
399
21.3k
            _cur_index += max_fetch;
400
21.3k
        }
401
402
21.3k
        return Status::OK();
403
21.3k
    }
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
659
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
659
        DCHECK(_parsed);
389
660
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
659
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
659
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
659
        *n = max_fetch;
398
659
        if constexpr (forward_index) {
399
659
            _cur_index += max_fetch;
400
659
        }
401
402
659
        return Status::OK();
403
659
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
684
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
684
        DCHECK(_parsed);
389
684
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
684
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
684
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
684
        *n = max_fetch;
398
684
        if constexpr (forward_index) {
399
684
            _cur_index += max_fetch;
400
684
        }
401
402
684
        return Status::OK();
403
684
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
404
405
1.82M
    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
848k
    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
202k
    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
15.9k
    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
72.9k
    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
17.4k
    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
139k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
14.6k
    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
23.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
3.58k
    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
342k
    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
67.6k
    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.13k
    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.36k
    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.12k
    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.3k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
21.3k
    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
661
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
684
    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
316k
                          MutableColumnPtr& dst) override {
409
316k
        DCHECK(_parsed);
410
316k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
316k
        auto total = *n;
416
316k
        auto read_count = 0;
417
316k
        _buffer.resize(total);
418
85.3M
        for (size_t i = 0; i < total; ++i) {
419
85.0M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
85.0M
            if (UNLIKELY(ord >= _num_elements)) {
421
13.1k
                break;
422
13.1k
            }
423
424
85.0M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
85.0M
        }
426
427
316k
        if (LIKELY(read_count > 0)) {
428
316k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
316k
        }
430
431
316k
        *n = read_count;
432
316k
        return Status::OK();
433
316k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
75.2k
                          MutableColumnPtr& dst) override {
409
75.2k
        DCHECK(_parsed);
410
75.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
75.2k
        auto total = *n;
416
75.2k
        auto read_count = 0;
417
75.2k
        _buffer.resize(total);
418
14.6M
        for (size_t i = 0; i < total; ++i) {
419
14.5M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.5M
            if (UNLIKELY(ord >= _num_elements)) {
421
2.00k
                break;
422
2.00k
            }
423
424
14.5M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.5M
        }
426
427
75.3k
        if (LIKELY(read_count > 0)) {
428
75.3k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
75.3k
        }
430
431
75.2k
        *n = read_count;
432
75.2k
        return Status::OK();
433
75.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
19.5k
                          MutableColumnPtr& dst) override {
409
19.5k
        DCHECK(_parsed);
410
19.5k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
19.5k
        auto total = *n;
416
19.5k
        auto read_count = 0;
417
19.5k
        _buffer.resize(total);
418
1.62M
        for (size_t i = 0; i < total; ++i) {
419
1.60M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.60M
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
1.60M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.60M
        }
426
427
19.5k
        if (LIKELY(read_count > 0)) {
428
19.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
19.5k
        }
430
431
19.5k
        *n = read_count;
432
19.5k
        return Status::OK();
433
19.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
6.99k
                          MutableColumnPtr& dst) override {
409
6.99k
        DCHECK(_parsed);
410
6.99k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
6.99k
        auto total = *n;
416
6.99k
        auto read_count = 0;
417
6.99k
        _buffer.resize(total);
418
652k
        for (size_t i = 0; i < total; ++i) {
419
645k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
645k
            if (UNLIKELY(ord >= _num_elements)) {
421
14
                break;
422
14
            }
423
424
645k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
645k
        }
426
427
6.99k
        if (LIKELY(read_count > 0)) {
428
6.99k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
6.99k
        }
430
431
6.99k
        *n = read_count;
432
6.99k
        return Status::OK();
433
6.99k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
31.6k
                          MutableColumnPtr& dst) override {
409
31.6k
        DCHECK(_parsed);
410
31.6k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
31.6k
        auto total = *n;
416
31.6k
        auto read_count = 0;
417
31.6k
        _buffer.resize(total);
418
15.5M
        for (size_t i = 0; i < total; ++i) {
419
15.5M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
15.5M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.46k
                break;
422
1.46k
            }
423
424
15.5M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
15.5M
        }
426
427
31.6k
        if (LIKELY(read_count > 0)) {
428
31.6k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
31.6k
        }
430
431
31.6k
        *n = read_count;
432
31.6k
        return Status::OK();
433
31.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
10.0k
                          MutableColumnPtr& dst) override {
409
10.0k
        DCHECK(_parsed);
410
10.0k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
10.0k
        auto total = *n;
416
10.0k
        auto read_count = 0;
417
10.0k
        _buffer.resize(total);
418
1.08M
        for (size_t i = 0; i < total; ++i) {
419
1.07M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.07M
            if (UNLIKELY(ord >= _num_elements)) {
421
578
                break;
422
578
            }
423
424
1.07M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.07M
        }
426
427
10.0k
        if (LIKELY(read_count > 0)) {
428
10.0k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
10.0k
        }
430
431
10.0k
        *n = read_count;
432
10.0k
        return Status::OK();
433
10.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
25.2k
                          MutableColumnPtr& dst) override {
409
25.2k
        DCHECK(_parsed);
410
25.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
25.2k
        auto total = *n;
416
25.2k
        auto read_count = 0;
417
25.2k
        _buffer.resize(total);
418
540k
        for (size_t i = 0; i < total; ++i) {
419
515k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
515k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
515k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
515k
        }
426
427
25.2k
        if (LIKELY(read_count > 0)) {
428
25.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
25.2k
        }
430
431
25.2k
        *n = read_count;
432
25.2k
        return Status::OK();
433
25.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
9.66k
                          MutableColumnPtr& dst) override {
409
9.66k
        DCHECK(_parsed);
410
9.66k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
9.66k
        auto total = *n;
416
9.66k
        auto read_count = 0;
417
9.66k
        _buffer.resize(total);
418
1.20M
        for (size_t i = 0; i < total; ++i) {
419
1.19M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.19M
            if (UNLIKELY(ord >= _num_elements)) {
421
31
                break;
422
31
            }
423
424
1.19M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.19M
        }
426
427
9.66k
        if (LIKELY(read_count > 0)) {
428
9.66k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
9.66k
        }
430
431
9.66k
        *n = read_count;
432
9.66k
        return Status::OK();
433
9.66k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
15.2k
                          MutableColumnPtr& dst) override {
409
15.2k
        DCHECK(_parsed);
410
15.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
15.2k
        auto total = *n;
416
15.2k
        auto read_count = 0;
417
15.2k
        _buffer.resize(total);
418
4.17M
        for (size_t i = 0; i < total; ++i) {
419
4.16M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
4.16M
            if (UNLIKELY(ord >= _num_elements)) {
421
1.51k
                break;
422
1.51k
            }
423
424
4.16M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
4.16M
        }
426
427
15.2k
        if (LIKELY(read_count > 0)) {
428
15.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
15.2k
        }
430
431
15.2k
        *n = read_count;
432
15.2k
        return Status::OK();
433
15.2k
    }
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.34k
                          MutableColumnPtr& dst) override {
409
1.34k
        DCHECK(_parsed);
410
1.34k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.34k
        auto total = *n;
416
1.34k
        auto read_count = 0;
417
1.34k
        _buffer.resize(total);
418
480k
        for (size_t i = 0; i < total; ++i) {
419
479k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
479k
            if (UNLIKELY(ord >= _num_elements)) {
421
11
                break;
422
11
            }
423
424
479k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
479k
        }
426
427
1.34k
        if (LIKELY(read_count > 0)) {
428
1.34k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.34k
        }
430
431
1.34k
        *n = read_count;
432
1.34k
        return Status::OK();
433
1.34k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
28.7k
                          MutableColumnPtr& dst) override {
409
28.7k
        DCHECK(_parsed);
410
28.7k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
28.7k
        auto total = *n;
416
28.7k
        auto read_count = 0;
417
28.7k
        _buffer.resize(total);
418
6.70M
        for (size_t i = 0; i < total; ++i) {
419
6.67M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
6.67M
            if (UNLIKELY(ord >= _num_elements)) {
421
807
                break;
422
807
            }
423
424
6.67M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
6.67M
        }
426
427
28.7k
        if (LIKELY(read_count > 0)) {
428
28.7k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
28.7k
        }
430
431
28.7k
        *n = read_count;
432
28.7k
        return Status::OK();
433
28.7k
    }
_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
9.37M
        for (size_t i = 0; i < total; ++i) {
419
9.34M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.34M
            if (UNLIKELY(ord >= _num_elements)) {
421
201
                break;
422
201
            }
423
424
9.34M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.34M
        }
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.68k
                          MutableColumnPtr& dst) override {
409
1.68k
        DCHECK(_parsed);
410
1.68k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1.68k
        auto total = *n;
416
1.68k
        auto read_count = 0;
417
1.68k
        _buffer.resize(total);
418
468k
        for (size_t i = 0; i < total; ++i) {
419
466k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
466k
            if (UNLIKELY(ord >= _num_elements)) {
421
250
                break;
422
250
            }
423
424
466k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
466k
        }
426
427
1.68k
        if (LIKELY(read_count > 0)) {
428
1.68k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1.68k
        }
430
431
1.68k
        *n = read_count;
432
1.68k
        return Status::OK();
433
1.68k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
12.7k
                          MutableColumnPtr& dst) override {
409
12.7k
        DCHECK(_parsed);
410
12.7k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
12.7k
        auto total = *n;
416
12.7k
        auto read_count = 0;
417
12.7k
        _buffer.resize(total);
418
27.0k
        for (size_t i = 0; i < total; ++i) {
419
14.3k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
14.3k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
14.3k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
14.3k
        }
426
427
12.7k
        if (LIKELY(read_count > 0)) {
428
12.7k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
12.7k
        }
430
431
12.7k
        *n = read_count;
432
12.7k
        return Status::OK();
433
12.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
134
                          MutableColumnPtr& dst) override {
409
134
        DCHECK(_parsed);
410
134
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
134
        auto total = *n;
416
134
        auto read_count = 0;
417
134
        _buffer.resize(total);
418
273
        for (size_t i = 0; i < total; ++i) {
419
139
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
139
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
139
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
139
        }
426
427
134
        if (LIKELY(read_count > 0)) {
428
134
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
134
        }
430
431
134
        *n = read_count;
432
134
        return Status::OK();
433
134
    }
_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.58k
        if (LIKELY(read_count > 0)) {
428
4.58k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4.58k
        }
430
431
4.57k
        *n = read_count;
432
4.57k
        return Status::OK();
433
4.57k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
27.6k
                          MutableColumnPtr& dst) override {
409
27.6k
        DCHECK(_parsed);
410
27.6k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
27.6k
        auto total = *n;
416
27.6k
        auto read_count = 0;
417
27.6k
        _buffer.resize(total);
418
20.0M
        for (size_t i = 0; i < total; ++i) {
419
20.0M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
20.0M
            if (UNLIKELY(ord >= _num_elements)) {
421
5.54k
                break;
422
5.54k
            }
423
424
19.9M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
19.9M
        }
426
427
27.6k
        if (LIKELY(read_count > 0)) {
428
27.6k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
27.6k
        }
430
431
27.6k
        *n = read_count;
432
27.6k
        return Status::OK();
433
27.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
13.2k
                          MutableColumnPtr& dst) override {
409
13.2k
        DCHECK(_parsed);
410
13.2k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
13.2k
        auto total = *n;
416
13.2k
        auto read_count = 0;
417
13.2k
        _buffer.resize(total);
418
8.83M
        for (size_t i = 0; i < total; ++i) {
419
8.81M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
8.81M
            if (UNLIKELY(ord >= _num_elements)) {
421
737
                break;
422
737
            }
423
424
8.81M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
8.81M
        }
426
427
13.2k
        if (LIKELY(read_count > 0)) {
428
13.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
13.2k
        }
430
431
13.2k
        *n = read_count;
432
13.2k
        return Status::OK();
433
13.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
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
184k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
184k
        return next_batch<false>(n, dst);
437
184k
    }
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
184k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
184k
        return next_batch<false>(n, dst);
437
184k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
438
439
4
    size_t count() const override { return _num_elements; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
439
4
    size_t count() const override { return _num_elements; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE5countEv
440
441
3.75M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
1.87M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
441
216k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
441
215k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
124k
    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
221k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
197k
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
441
205k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
441
223k
    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
195k
    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.61k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
441
632
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
441
114k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE13current_indexEv
Line
Count
Source
441
308
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE13current_indexEv
Line
Count
Source
441
40
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
Line
Count
Source
441
46
    size_t current_index() const override { return _cur_index; }
442
443
87.9M
    char* get_data(size_t index) const {
444
87.9M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
87.9M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
16.3M
    char* get_data(size_t index) const {
444
16.3M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
16.3M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
1.80M
    char* get_data(size_t index) const {
444
1.80M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.80M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
443
660k
    char* get_data(size_t index) const {
444
660k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
660k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
443
15.5M
    char* get_data(size_t index) const {
444
15.5M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
15.5M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
1.08M
    char* get_data(size_t index) const {
444
1.08M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.08M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
839k
    char* get_data(size_t index) const {
444
839k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
839k
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
1.20M
    char* get_data(size_t index) const {
444
1.20M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.20M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
4.18M
    char* get_data(size_t index) const {
444
4.18M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
4.18M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
482k
    char* get_data(size_t index) const {
444
482k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
482k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
7.01M
    char* get_data(size_t index) const {
444
7.01M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
7.01M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
443
9.41M
    char* get_data(size_t index) const {
444
9.41M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
9.41M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
443
467k
    char* get_data(size_t index) const {
444
467k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
467k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
443
22.6k
    char* get_data(size_t index) const {
444
22.6k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
22.6k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
443
1.38k
    char* get_data(size_t index) const {
444
1.38k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.38k
    }
_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
20.0M
    char* get_data(size_t index) const {
444
20.0M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20.0M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
8.83M
    char* get_data(size_t index) const {
444
8.83M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
8.83M
    }
_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.19k
    char* get_data(size_t index) const {
444
1.19k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.19k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
Line
Count
Source
443
1.52k
    char* get_data(size_t index) const {
444
1.52k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
1.52k
    }
446
447
private:
448
    void _copy_next_values(size_t n, void* data) {
449
        memcpy(data, get_data(_cur_index), n * SIZE_OF_TYPE);
450
    }
451
452
    using CppType = typename TypeTraits<Type>::CppType;
453
454
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
455
456
    Slice _data;
457
    PageDecoderOptions _options;
458
    bool _parsed;
459
    size_t _num_elements;
460
    size_t _num_element_after_padding;
461
462
    int _size_of_element;
463
    size_t _cur_index;
464
465
    std::vector<std::conditional_t<std::is_same_v<CppType, bool>, uint8_t, CppType>> _buffer;
466
467
    friend class BinaryDictPageDecoder;
468
};
469
470
} // namespace segment_v2
471
} // namespace doris