Coverage Report

Created: 2026-10-28 16:54

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/storage_layout.h"
42
#include "storage/types.h"
43
#include "util/alignment.h"
44
#include "util/coding.h"
45
#include "util/faststring.h"
46
#include "util/slice.h"
47
48
namespace doris {
49
namespace segment_v2 {
50
51
static constexpr size_t BITSHUFFLE_PAGE_HEADER_SIZE = 16;
52
53
void warn_with_bitshuffle_error(int64_t val);
54
55
// BitshufflePageBuilder bitshuffles and compresses the bits of fixed
56
// size type blocks with lz4.
57
//
58
// The page format is as follows:
59
//
60
// 1. Header: (16 bytes total)
61
//
62
//    <num_elements> [32-bit]
63
//      The number of elements encoded in the page.
64
//
65
//    <compressed_size> [32-bit]
66
//      The post-compression size of the page, including this header.
67
//
68
//    <padded_num_elements> [32-bit]
69
//      Padding is needed to meet the requirements of the bitshuffle
70
//      library such that the input/output is a multiple of 8. Some
71
//      ignored elements are appended to the end of the page if necessary
72
//      to meet this requirement.
73
//
74
//      This header field is the post-padding element count.
75
//
76
//    <elem_size_bytes> [32-bit]
77
//      The size of the elements, in bytes, as actually encoded. In the
78
//      case that all of the data in a page can fit into a smaller
79
//      integer type, then we may choose to encode that smaller type
80
//      to save CPU costs.
81
//
82
//      This is currently only implemented in the UINT32 page type.
83
//
84
//   NOTE: all on-disk ints are encoded little-endian
85
//
86
// 2. Element data
87
//
88
//    The header is followed by the bitshuffle-compressed element data.
89
//
90
template <FieldType Type>
91
class BitshufflePageBuilder : public PageBuilderHelper<BitshufflePageBuilder<Type>> {
92
public:
93
    using Self = BitshufflePageBuilder<Type>;
94
    friend class PageBuilderHelper<Self>;
95
96
760k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
96
44.6k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
96
8.20k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
96
344k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
96
142k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
96
10.2k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
96
63.8k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
Line
Count
Source
96
1
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
96
5.78k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
96
7.53k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
Line
Count
Source
96
2
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
96
680
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
96
37.0k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
96
44.2k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE4initEv
Line
Count
Source
96
337
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
96
438
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
96
7.64k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
96
336
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
96
9.65k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
96
12.0k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
96
16.9k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
96
1.21k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
96
669
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
96
667
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE4initEv
Line
Count
Source
96
583
    Status init() override { return reset(); }
97
98
151M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
98
48.2k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
98
11.5k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
98
150M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
98
376k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
98
11.0k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
98
63.8k
    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
98
6.34k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
98
21.0k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12is_page_fullEv
Line
Count
Source
98
194
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12is_page_fullEv
Line
Count
Source
98
767
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
98
44.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
98
44.0k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE12is_page_fullEv
Line
Count
Source
98
335
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
98
568
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
Line
Count
Source
98
7.71k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
98
312
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
98
5.17k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
98
27.3k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
98
17.9k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Line
Count
Source
98
1.46k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Line
Count
Source
98
628
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
98
651
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE12is_page_fullEv
Line
Count
Source
98
26.5k
    bool is_page_full() override { return _remain_element_capacity == 0; }
99
100
1.45M
    Status add(const uint8_t* vals, size_t* count) override {
101
1.45M
        return add_internal<false>(vals, count);
102
1.45M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
100
48.2k
    Status add(const uint8_t* vals, size_t* count) override {
101
48.2k
        return add_internal<false>(vals, count);
102
48.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
100
11.5k
    Status add(const uint8_t* vals, size_t* count) override {
101
11.5k
        return add_internal<false>(vals, count);
102
11.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
100
739k
    Status add(const uint8_t* vals, size_t* count) override {
101
739k
        return add_internal<false>(vals, count);
102
739k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
100
376k
    Status add(const uint8_t* vals, size_t* count) override {
101
376k
        return add_internal<false>(vals, count);
102
376k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
100
11.0k
    Status add(const uint8_t* vals, size_t* count) override {
101
11.0k
        return add_internal<false>(vals, count);
102
11.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
100
63.8k
    Status add(const uint8_t* vals, size_t* count) override {
101
63.8k
        return add_internal<false>(vals, count);
102
63.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
100
6.35k
    Status add(const uint8_t* vals, size_t* count) override {
101
6.35k
        return add_internal<false>(vals, count);
102
6.35k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
100
20.9k
    Status add(const uint8_t* vals, size_t* count) override {
101
20.9k
        return add_internal<false>(vals, count);
102
20.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
Line
Count
Source
100
194
    Status add(const uint8_t* vals, size_t* count) override {
101
194
        return add_internal<false>(vals, count);
102
194
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
100
769
    Status add(const uint8_t* vals, size_t* count) override {
101
769
        return add_internal<false>(vals, count);
102
769
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
100
44.3k
    Status add(const uint8_t* vals, size_t* count) override {
101
44.3k
        return add_internal<false>(vals, count);
102
44.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
100
44.0k
    Status add(const uint8_t* vals, size_t* count) override {
101
44.0k
        return add_internal<false>(vals, count);
102
44.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE3addEPKhPm
Line
Count
Source
100
335
    Status add(const uint8_t* vals, size_t* count) override {
101
335
        return add_internal<false>(vals, count);
102
335
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
100
568
    Status add(const uint8_t* vals, size_t* count) override {
101
568
        return add_internal<false>(vals, count);
102
568
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
Line
Count
Source
100
7.71k
    Status add(const uint8_t* vals, size_t* count) override {
101
7.71k
        return add_internal<false>(vals, count);
102
7.71k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
100
313
    Status add(const uint8_t* vals, size_t* count) override {
101
313
        return add_internal<false>(vals, count);
102
313
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
100
5.17k
    Status add(const uint8_t* vals, size_t* count) override {
101
5.17k
        return add_internal<false>(vals, count);
102
5.17k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
100
27.3k
    Status add(const uint8_t* vals, size_t* count) override {
101
27.3k
        return add_internal<false>(vals, count);
102
27.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
100
17.9k
    Status add(const uint8_t* vals, size_t* count) override {
101
17.9k
        return add_internal<false>(vals, count);
102
17.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Line
Count
Source
100
1.46k
    Status add(const uint8_t* vals, size_t* count) override {
101
1.46k
        return add_internal<false>(vals, count);
102
1.46k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Line
Count
Source
100
628
    Status add(const uint8_t* vals, size_t* count) override {
101
628
        return add_internal<false>(vals, count);
102
628
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
100
651
    Status add(const uint8_t* vals, size_t* count) override {
101
651
        return add_internal<false>(vals, count);
102
651
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE3addEPKhPm
Line
Count
Source
100
26.5k
    Status add(const uint8_t* vals, size_t* count) override {
101
26.5k
        return add_internal<false>(vals, count);
102
26.5k
    }
103
104
150M
    Status single_add(const uint8_t* vals, size_t* count) {
105
150M
        return add_internal<true>(vals, count);
106
150M
    }
107
108
    template <bool single>
109
150M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
150M
        DCHECK(!_finished);
111
150M
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
150M
        uint32_t to_add = cast_set<UInt32>(
127
150M
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
150M
        int to_add_size = to_add * SIZE_OF_TYPE;
130
150M
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
150M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
152M
        _count += to_add;
135
152M
        _remain_element_capacity -= to_add;
136
152M
        _raw_data_size += to_add_size;
137
        // return added number through count
138
152M
        *num_written = to_add;
139
152M
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
151M
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
151M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
151M
                        *reinterpret_cast<const uint32_t*>(vals);
150
151M
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
151M
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
0
        memcpy(&_data[orig_size], vals, to_add_size);
159
152M
        return Status::OK();
160
150M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
48.2k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
48.2k
        DCHECK(!_finished);
111
48.2k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
48.2k
        uint32_t to_add = cast_set<UInt32>(
127
48.2k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
48.2k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
48.2k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
48.2k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
48.2k
        _count += to_add;
135
48.2k
        _remain_element_capacity -= to_add;
136
48.2k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
48.2k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
48.2k
        memcpy(&_data[orig_size], vals, to_add_size);
159
48.2k
        return Status::OK();
160
48.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
11.5k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
11.5k
        DCHECK(!_finished);
111
11.5k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
11.5k
        uint32_t to_add = cast_set<UInt32>(
127
11.5k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
11.5k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
11.5k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
11.5k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
11.5k
        _count += to_add;
135
11.5k
        _remain_element_capacity -= to_add;
136
11.5k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
11.5k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
11.5k
        memcpy(&_data[orig_size], vals, to_add_size);
159
11.5k
        return Status::OK();
160
11.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
739k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
739k
        DCHECK(!_finished);
111
739k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
739k
        uint32_t to_add = cast_set<UInt32>(
127
739k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
739k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
739k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
739k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
739k
        _count += to_add;
135
739k
        _remain_element_capacity -= to_add;
136
739k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
739k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
739k
        memcpy(&_data[orig_size], vals, to_add_size);
159
739k
        return Status::OK();
160
739k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
376k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
376k
        DCHECK(!_finished);
111
376k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
376k
        uint32_t to_add = cast_set<UInt32>(
127
376k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
376k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
376k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
376k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
377k
        _count += to_add;
135
377k
        _remain_element_capacity -= to_add;
136
377k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
377k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
377k
        memcpy(&_data[orig_size], vals, to_add_size);
159
377k
        return Status::OK();
160
376k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
11.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
11.0k
        DCHECK(!_finished);
111
11.0k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
11.0k
        uint32_t to_add = cast_set<UInt32>(
127
11.0k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
11.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
11.0k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
11.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
11.0k
        _count += to_add;
135
11.0k
        _remain_element_capacity -= to_add;
136
11.0k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
11.0k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
11.0k
        memcpy(&_data[orig_size], vals, to_add_size);
159
11.0k
        return Status::OK();
160
11.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
63.8k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
63.8k
        DCHECK(!_finished);
111
63.8k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
63.8k
        uint32_t to_add = cast_set<UInt32>(
127
63.8k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
63.8k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
63.8k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
63.8k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
63.8k
        _count += to_add;
135
63.8k
        _remain_element_capacity -= to_add;
136
63.8k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
63.8k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
63.8k
        memcpy(&_data[orig_size], vals, to_add_size);
159
63.8k
        return Status::OK();
160
63.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
6.35k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
6.35k
        DCHECK(!_finished);
111
6.35k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
6.35k
        uint32_t to_add = cast_set<UInt32>(
127
6.35k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
6.35k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
6.35k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
6.35k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
6.35k
        _count += to_add;
135
6.35k
        _remain_element_capacity -= to_add;
136
6.35k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
6.35k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
6.35k
        memcpy(&_data[orig_size], vals, to_add_size);
159
6.35k
        return Status::OK();
160
6.35k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
21.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
21.0k
        DCHECK(!_finished);
111
21.0k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
21.0k
        uint32_t to_add = cast_set<UInt32>(
127
21.0k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
21.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
21.0k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
21.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
21.0k
        _count += to_add;
135
21.0k
        _remain_element_capacity -= to_add;
136
21.0k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
21.0k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
21.0k
        memcpy(&_data[orig_size], vals, to_add_size);
159
21.0k
        return Status::OK();
160
21.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
194
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
194
        DCHECK(!_finished);
111
194
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
194
        uint32_t to_add = cast_set<UInt32>(
127
194
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
194
        int to_add_size = to_add * SIZE_OF_TYPE;
130
194
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
194
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
194
        _count += to_add;
135
194
        _remain_element_capacity -= to_add;
136
194
        _raw_data_size += to_add_size;
137
        // return added number through count
138
194
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
194
        memcpy(&_data[orig_size], vals, to_add_size);
159
194
        return Status::OK();
160
194
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
769
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
769
        DCHECK(!_finished);
111
769
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
769
        uint32_t to_add = cast_set<UInt32>(
127
769
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
769
        int to_add_size = to_add * SIZE_OF_TYPE;
130
769
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
769
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
769
        _count += to_add;
135
769
        _remain_element_capacity -= to_add;
136
769
        _raw_data_size += to_add_size;
137
        // return added number through count
138
769
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
769
        memcpy(&_data[orig_size], vals, to_add_size);
159
769
        return Status::OK();
160
769
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
44.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
44.3k
        DCHECK(!_finished);
111
44.3k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
44.3k
        uint32_t to_add = cast_set<UInt32>(
127
44.3k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
44.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
44.3k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
44.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
44.3k
        _count += to_add;
135
44.3k
        _remain_element_capacity -= to_add;
136
44.3k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
44.3k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
44.3k
        memcpy(&_data[orig_size], vals, to_add_size);
159
44.3k
        return Status::OK();
160
44.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
44.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
44.0k
        DCHECK(!_finished);
111
44.0k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
44.0k
        uint32_t to_add = cast_set<UInt32>(
127
44.0k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
44.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
44.0k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
44.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
44.0k
        _count += to_add;
135
44.0k
        _remain_element_capacity -= to_add;
136
44.0k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
44.0k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
44.0k
        memcpy(&_data[orig_size], vals, to_add_size);
159
44.0k
        return Status::OK();
160
44.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
335
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
335
        DCHECK(!_finished);
111
335
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
335
        uint32_t to_add = cast_set<UInt32>(
127
335
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
335
        int to_add_size = to_add * SIZE_OF_TYPE;
130
335
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
335
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
335
        _count += to_add;
135
335
        _remain_element_capacity -= to_add;
136
335
        _raw_data_size += to_add_size;
137
        // return added number through count
138
335
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
335
        memcpy(&_data[orig_size], vals, to_add_size);
159
335
        return Status::OK();
160
335
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
568
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
568
        DCHECK(!_finished);
111
568
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
568
        uint32_t to_add = cast_set<UInt32>(
127
568
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
568
        int to_add_size = to_add * SIZE_OF_TYPE;
130
568
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
568
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
568
        _count += to_add;
135
568
        _remain_element_capacity -= to_add;
136
568
        _raw_data_size += to_add_size;
137
        // return added number through count
138
568
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
568
        memcpy(&_data[orig_size], vals, to_add_size);
159
568
        return Status::OK();
160
568
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
7.71k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
7.71k
        DCHECK(!_finished);
111
7.71k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
7.71k
        uint32_t to_add = cast_set<UInt32>(
127
7.71k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
7.71k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
7.71k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
7.71k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
7.71k
        _count += to_add;
135
7.71k
        _remain_element_capacity -= to_add;
136
7.71k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
7.71k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
7.71k
        memcpy(&_data[orig_size], vals, to_add_size);
159
7.71k
        return Status::OK();
160
7.71k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
313
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
313
        DCHECK(!_finished);
111
313
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
313
        uint32_t to_add = cast_set<UInt32>(
127
313
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
313
        int to_add_size = to_add * SIZE_OF_TYPE;
130
313
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
313
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
313
        _count += to_add;
135
313
        _remain_element_capacity -= to_add;
136
313
        _raw_data_size += to_add_size;
137
        // return added number through count
138
313
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
313
        memcpy(&_data[orig_size], vals, to_add_size);
159
313
        return Status::OK();
160
313
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
5.17k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
5.17k
        DCHECK(!_finished);
111
5.17k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
5.17k
        uint32_t to_add = cast_set<UInt32>(
127
5.17k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
5.17k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
5.17k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
5.17k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
5.17k
        _count += to_add;
135
5.17k
        _remain_element_capacity -= to_add;
136
5.17k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
5.17k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
5.17k
        memcpy(&_data[orig_size], vals, to_add_size);
159
5.17k
        return Status::OK();
160
5.17k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
27.3k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
27.3k
        DCHECK(!_finished);
111
27.3k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
27.3k
        uint32_t to_add = cast_set<UInt32>(
127
27.3k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
27.3k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
27.3k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
27.3k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
27.3k
        _count += to_add;
135
27.3k
        _remain_element_capacity -= to_add;
136
27.3k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
27.3k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
27.3k
        memcpy(&_data[orig_size], vals, to_add_size);
159
27.3k
        return Status::OK();
160
27.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
17.9k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
17.9k
        DCHECK(!_finished);
111
17.9k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
17.9k
        uint32_t to_add = cast_set<UInt32>(
127
17.9k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
17.9k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
17.9k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
17.9k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
17.9k
        _count += to_add;
135
17.9k
        _remain_element_capacity -= to_add;
136
17.9k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
17.9k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
17.9k
        memcpy(&_data[orig_size], vals, to_add_size);
159
17.9k
        return Status::OK();
160
17.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
1.46k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
1.46k
        DCHECK(!_finished);
111
1.46k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
1.46k
        uint32_t to_add = cast_set<UInt32>(
127
1.46k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
1.46k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
1.46k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
1.46k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
1.46k
        _count += to_add;
135
1.46k
        _remain_element_capacity -= to_add;
136
1.46k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
1.46k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
1.46k
        memcpy(&_data[orig_size], vals, to_add_size);
159
1.46k
        return Status::OK();
160
1.46k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
628
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
628
        DCHECK(!_finished);
111
628
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
628
        uint32_t to_add = cast_set<UInt32>(
127
628
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
628
        int to_add_size = to_add * SIZE_OF_TYPE;
130
628
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
628
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
628
        _count += to_add;
135
628
        _remain_element_capacity -= to_add;
136
628
        _raw_data_size += to_add_size;
137
        // return added number through count
138
628
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
628
        memcpy(&_data[orig_size], vals, to_add_size);
159
628
        return Status::OK();
160
628
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
651
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
651
        DCHECK(!_finished);
111
651
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
651
        uint32_t to_add = cast_set<UInt32>(
127
651
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
651
        int to_add_size = to_add * SIZE_OF_TYPE;
130
651
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
651
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
651
        _count += to_add;
135
651
        _remain_element_capacity -= to_add;
136
651
        _raw_data_size += to_add_size;
137
        // return added number through count
138
651
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
651
        memcpy(&_data[orig_size], vals, to_add_size);
159
651
        return Status::OK();
160
651
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
26.5k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
26.5k
        DCHECK(!_finished);
111
26.5k
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
26.5k
        uint32_t to_add = cast_set<UInt32>(
127
26.5k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
26.5k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
26.5k
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
26.5k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
26.5k
        _count += to_add;
135
26.5k
        _remain_element_capacity -= to_add;
136
26.5k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
26.5k
        *num_written = to_add;
139
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
                        *reinterpret_cast<const uint32_t*>(vals);
150
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
26.5k
        memcpy(&_data[orig_size], vals, to_add_size);
159
26.5k
        return Status::OK();
160
26.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
109
148M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
148M
        DCHECK(!_finished);
111
148M
        if (_remain_element_capacity == 0) {
112
0
            *num_written = 0;
113
0
            return Status::OK();
114
0
        }
115
116
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
117
        // the row count of a single men tbl could be very large.
118
        // a real log:
119
        /*
120
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
121
        */
122
        // This is not a very wide table, actually it just has two columns, int and array<float>
123
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
124
        // 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).
125
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
126
148M
        uint32_t to_add = cast_set<UInt32>(
127
148M
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
128
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
129
148M
        int to_add_size = to_add * SIZE_OF_TYPE;
130
148M
        size_t orig_size = _data.size();
131
        // This may need a large memory, should return error if could not allocated
132
        // successfully, to avoid BE OOM.
133
148M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
151M
        _count += to_add;
135
151M
        _remain_element_capacity -= to_add;
136
151M
        _raw_data_size += to_add_size;
137
        // return added number through count
138
151M
        *num_written = to_add;
139
151M
        if constexpr (single) {
140
            if constexpr (SIZE_OF_TYPE == 1) {
141
                _data[orig_size] = *vals;
142
                return Status::OK();
143
            } else if constexpr (SIZE_OF_TYPE == 2) {
144
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
145
                        *reinterpret_cast<const uint16_t*>(vals);
146
                return Status::OK();
147
151M
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
151M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
151M
                        *reinterpret_cast<const uint32_t*>(vals);
150
151M
                return Status::OK();
151
            } else if constexpr (SIZE_OF_TYPE == 8) {
152
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
153
                        *reinterpret_cast<const uint64_t*>(vals);
154
                return Status::OK();
155
            }
156
151M
        }
157
        // when single is true and SIZE_OF_TYPE > 8 or single is false
158
0
        memcpy(&_data[orig_size], vals, to_add_size);
159
151M
        return Status::OK();
160
148M
    }
161
162
767k
    Status finish(OwnedSlice* slice) override {
163
767k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
767k
        return Status::OK();
165
767k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
44.6k
    Status finish(OwnedSlice* slice) override {
163
44.6k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
44.6k
        return Status::OK();
165
44.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
8.23k
    Status finish(OwnedSlice* slice) override {
163
8.23k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
8.23k
        return Status::OK();
165
8.23k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
337k
    Status finish(OwnedSlice* slice) override {
163
337k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
337k
        return Status::OK();
165
337k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
147k
    Status finish(OwnedSlice* slice) override {
163
147k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
147k
        return Status::OK();
165
147k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
10.9k
    Status finish(OwnedSlice* slice) override {
163
10.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
10.9k
        return Status::OK();
165
10.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
63.4k
    Status finish(OwnedSlice* slice) override {
163
63.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
63.5k
        return Status::OK();
165
63.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
5.91k
    Status finish(OwnedSlice* slice) override {
163
5.91k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
5.91k
        return Status::OK();
165
5.91k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
9.68k
    Status finish(OwnedSlice* slice) override {
163
9.68k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
9.68k
        return Status::OK();
165
9.68k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
6
    Status finish(OwnedSlice* slice) override {
163
6
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
6
        return Status::OK();
165
6
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
711
    Status finish(OwnedSlice* slice) override {
163
711
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
711
        return Status::OK();
165
711
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
37.7k
    Status finish(OwnedSlice* slice) override {
163
37.7k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
37.7k
        return Status::OK();
165
37.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
43.2k
    Status finish(OwnedSlice* slice) override {
163
43.2k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
43.2k
        return Status::OK();
165
43.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
277
    Status finish(OwnedSlice* slice) override {
163
277
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
277
        return Status::OK();
165
277
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
605
    Status finish(OwnedSlice* slice) override {
163
605
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
605
        return Status::OK();
165
605
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
7.75k
    Status finish(OwnedSlice* slice) override {
163
7.75k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
7.76k
        return Status::OK();
165
7.75k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
262
    Status finish(OwnedSlice* slice) override {
163
262
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
262
        return Status::OK();
165
262
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
9.65k
    Status finish(OwnedSlice* slice) override {
163
9.65k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
9.65k
        return Status::OK();
165
9.65k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
18.7k
    Status finish(OwnedSlice* slice) override {
163
18.7k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
18.7k
        return Status::OK();
165
18.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
17.1k
    Status finish(OwnedSlice* slice) override {
163
17.1k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
17.1k
        return Status::OK();
165
17.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
1.14k
    Status finish(OwnedSlice* slice) override {
163
1.14k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
1.14k
        return Status::OK();
165
1.14k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
582
    Status finish(OwnedSlice* slice) override {
163
582
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
582
        return Status::OK();
165
582
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
588
    Status finish(OwnedSlice* slice) override {
163
588
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
589
        return Status::OK();
165
588
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
691
    Status finish(OwnedSlice* slice) override {
163
691
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
691
        return Status::OK();
165
691
    }
166
167
1.80M
    Status reset() override {
168
1.80M
        RETURN_IF_CATCH_EXCEPTION({
169
1.80M
            size_t block_size = _options.data_page_size;
170
1.80M
            _count = 0;
171
1.80M
            _raw_data_size = 0;
172
1.80M
            _data.clear();
173
1.80M
            _data.reserve(block_size);
174
1.80M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
1.80M
                    << "buffer must be naturally-aligned";
176
1.80M
            _buffer.clear();
177
1.80M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
1.80M
            _finished = false;
179
1.80M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
1.80M
        });
181
1.80M
        return Status::OK();
182
1.80M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
167
89.2k
    Status reset() override {
168
89.2k
        RETURN_IF_CATCH_EXCEPTION({
169
89.2k
            size_t block_size = _options.data_page_size;
170
89.2k
            _count = 0;
171
89.2k
            _raw_data_size = 0;
172
89.2k
            _data.clear();
173
89.2k
            _data.reserve(block_size);
174
89.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
89.2k
                    << "buffer must be naturally-aligned";
176
89.2k
            _buffer.clear();
177
89.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
89.2k
            _finished = false;
179
89.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
89.2k
        });
181
89.3k
        return Status::OK();
182
89.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
167
16.4k
    Status reset() override {
168
16.4k
        RETURN_IF_CATCH_EXCEPTION({
169
16.4k
            size_t block_size = _options.data_page_size;
170
16.4k
            _count = 0;
171
16.4k
            _raw_data_size = 0;
172
16.4k
            _data.clear();
173
16.4k
            _data.reserve(block_size);
174
16.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
16.4k
                    << "buffer must be naturally-aligned";
176
16.4k
            _buffer.clear();
177
16.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
16.4k
            _finished = false;
179
16.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
16.4k
        });
181
16.4k
        return Status::OK();
182
16.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
167
961k
    Status reset() override {
168
961k
        RETURN_IF_CATCH_EXCEPTION({
169
961k
            size_t block_size = _options.data_page_size;
170
961k
            _count = 0;
171
961k
            _raw_data_size = 0;
172
961k
            _data.clear();
173
961k
            _data.reserve(block_size);
174
961k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
961k
                    << "buffer must be naturally-aligned";
176
961k
            _buffer.clear();
177
961k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
961k
            _finished = false;
179
961k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
961k
        });
181
963k
        return Status::OK();
182
961k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
167
290k
    Status reset() override {
168
290k
        RETURN_IF_CATCH_EXCEPTION({
169
290k
            size_t block_size = _options.data_page_size;
170
290k
            _count = 0;
171
290k
            _raw_data_size = 0;
172
290k
            _data.clear();
173
290k
            _data.reserve(block_size);
174
290k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
290k
                    << "buffer must be naturally-aligned";
176
290k
            _buffer.clear();
177
290k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
290k
            _finished = false;
179
290k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
290k
        });
181
290k
        return Status::OK();
182
290k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
167
21.1k
    Status reset() override {
168
21.1k
        RETURN_IF_CATCH_EXCEPTION({
169
21.1k
            size_t block_size = _options.data_page_size;
170
21.1k
            _count = 0;
171
21.1k
            _raw_data_size = 0;
172
21.1k
            _data.clear();
173
21.1k
            _data.reserve(block_size);
174
21.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
21.1k
                    << "buffer must be naturally-aligned";
176
21.1k
            _buffer.clear();
177
21.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
21.1k
            _finished = false;
179
21.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
21.1k
        });
181
21.2k
        return Status::OK();
182
21.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
167
127k
    Status reset() override {
168
127k
        RETURN_IF_CATCH_EXCEPTION({
169
127k
            size_t block_size = _options.data_page_size;
170
127k
            _count = 0;
171
127k
            _raw_data_size = 0;
172
127k
            _data.clear();
173
127k
            _data.reserve(block_size);
174
127k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
127k
                    << "buffer must be naturally-aligned";
176
127k
            _buffer.clear();
177
127k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
127k
            _finished = false;
179
127k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
127k
        });
181
127k
        return Status::OK();
182
127k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
Line
Count
Source
167
1
    Status reset() override {
168
1
        RETURN_IF_CATCH_EXCEPTION({
169
1
            size_t block_size = _options.data_page_size;
170
1
            _count = 0;
171
1
            _raw_data_size = 0;
172
1
            _data.clear();
173
1
            _data.reserve(block_size);
174
1
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
1
                    << "buffer must be naturally-aligned";
176
1
            _buffer.clear();
177
1
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
1
            _finished = false;
179
1
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
1
        });
181
1
        return Status::OK();
182
1
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
167
11.6k
    Status reset() override {
168
11.6k
        RETURN_IF_CATCH_EXCEPTION({
169
11.6k
            size_t block_size = _options.data_page_size;
170
11.6k
            _count = 0;
171
11.6k
            _raw_data_size = 0;
172
11.6k
            _data.clear();
173
11.6k
            _data.reserve(block_size);
174
11.6k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
11.6k
                    << "buffer must be naturally-aligned";
176
11.6k
            _buffer.clear();
177
11.6k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
11.6k
            _finished = false;
179
11.6k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
11.6k
        });
181
11.7k
        return Status::OK();
182
11.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
167
17.2k
    Status reset() override {
168
17.2k
        RETURN_IF_CATCH_EXCEPTION({
169
17.2k
            size_t block_size = _options.data_page_size;
170
17.2k
            _count = 0;
171
17.2k
            _raw_data_size = 0;
172
17.2k
            _data.clear();
173
17.2k
            _data.reserve(block_size);
174
17.2k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
17.2k
                    << "buffer must be naturally-aligned";
176
17.2k
            _buffer.clear();
177
17.2k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
17.2k
            _finished = false;
179
17.2k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
17.2k
        });
181
17.2k
        return Status::OK();
182
17.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
Line
Count
Source
167
8
    Status reset() override {
168
8
        RETURN_IF_CATCH_EXCEPTION({
169
8
            size_t block_size = _options.data_page_size;
170
8
            _count = 0;
171
8
            _raw_data_size = 0;
172
8
            _data.clear();
173
8
            _data.reserve(block_size);
174
8
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
8
                    << "buffer must be naturally-aligned";
176
8
            _buffer.clear();
177
8
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
8
            _finished = false;
179
8
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
8
        });
181
8
        return Status::OK();
182
8
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
167
1.38k
    Status reset() override {
168
1.38k
        RETURN_IF_CATCH_EXCEPTION({
169
1.38k
            size_t block_size = _options.data_page_size;
170
1.38k
            _count = 0;
171
1.38k
            _raw_data_size = 0;
172
1.38k
            _data.clear();
173
1.38k
            _data.reserve(block_size);
174
1.38k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
1.38k
                    << "buffer must be naturally-aligned";
176
1.38k
            _buffer.clear();
177
1.38k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
1.38k
            _finished = false;
179
1.38k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
1.38k
        });
181
1.38k
        return Status::OK();
182
1.38k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
167
74.7k
    Status reset() override {
168
74.7k
        RETURN_IF_CATCH_EXCEPTION({
169
74.7k
            size_t block_size = _options.data_page_size;
170
74.7k
            _count = 0;
171
74.7k
            _raw_data_size = 0;
172
74.7k
            _data.clear();
173
74.7k
            _data.reserve(block_size);
174
74.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
74.7k
                    << "buffer must be naturally-aligned";
176
74.7k
            _buffer.clear();
177
74.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
74.7k
            _finished = false;
179
74.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
74.7k
        });
181
74.8k
        return Status::OK();
182
74.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
167
87.4k
    Status reset() override {
168
87.4k
        RETURN_IF_CATCH_EXCEPTION({
169
87.4k
            size_t block_size = _options.data_page_size;
170
87.4k
            _count = 0;
171
87.4k
            _raw_data_size = 0;
172
87.4k
            _data.clear();
173
87.4k
            _data.reserve(block_size);
174
87.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
87.4k
                    << "buffer must be naturally-aligned";
176
87.4k
            _buffer.clear();
177
87.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
87.4k
            _finished = false;
179
87.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
87.4k
        });
181
87.5k
        return Status::OK();
182
87.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE5resetEv
Line
Count
Source
167
613
    Status reset() override {
168
613
        RETURN_IF_CATCH_EXCEPTION({
169
613
            size_t block_size = _options.data_page_size;
170
613
            _count = 0;
171
613
            _raw_data_size = 0;
172
613
            _data.clear();
173
613
            _data.reserve(block_size);
174
613
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
613
                    << "buffer must be naturally-aligned";
176
613
            _buffer.clear();
177
613
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
613
            _finished = false;
179
613
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
613
        });
181
614
        return Status::OK();
182
613
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
167
1.04k
    Status reset() override {
168
1.04k
        RETURN_IF_CATCH_EXCEPTION({
169
1.04k
            size_t block_size = _options.data_page_size;
170
1.04k
            _count = 0;
171
1.04k
            _raw_data_size = 0;
172
1.04k
            _data.clear();
173
1.04k
            _data.reserve(block_size);
174
1.04k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
1.04k
                    << "buffer must be naturally-aligned";
176
1.04k
            _buffer.clear();
177
1.04k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
1.04k
            _finished = false;
179
1.04k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
1.04k
        });
181
1.04k
        return Status::OK();
182
1.04k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
Line
Count
Source
167
15.3k
    Status reset() override {
168
15.3k
        RETURN_IF_CATCH_EXCEPTION({
169
15.3k
            size_t block_size = _options.data_page_size;
170
15.3k
            _count = 0;
171
15.3k
            _raw_data_size = 0;
172
15.3k
            _data.clear();
173
15.3k
            _data.reserve(block_size);
174
15.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
15.3k
                    << "buffer must be naturally-aligned";
176
15.3k
            _buffer.clear();
177
15.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
15.3k
            _finished = false;
179
15.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
15.3k
        });
181
15.5k
        return Status::OK();
182
15.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
167
597
    Status reset() override {
168
597
        RETURN_IF_CATCH_EXCEPTION({
169
597
            size_t block_size = _options.data_page_size;
170
597
            _count = 0;
171
597
            _raw_data_size = 0;
172
597
            _data.clear();
173
597
            _data.reserve(block_size);
174
597
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
597
                    << "buffer must be naturally-aligned";
176
597
            _buffer.clear();
177
597
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
597
            _finished = false;
179
597
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
597
        });
181
597
        return Status::OK();
182
597
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
167
19.3k
    Status reset() override {
168
19.3k
        RETURN_IF_CATCH_EXCEPTION({
169
19.3k
            size_t block_size = _options.data_page_size;
170
19.3k
            _count = 0;
171
19.3k
            _raw_data_size = 0;
172
19.3k
            _data.clear();
173
19.3k
            _data.reserve(block_size);
174
19.3k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
19.3k
                    << "buffer must be naturally-aligned";
176
19.3k
            _buffer.clear();
177
19.3k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
19.3k
            _finished = false;
179
19.3k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
19.3k
        });
181
19.3k
        return Status::OK();
182
19.3k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
167
30.8k
    Status reset() override {
168
30.8k
        RETURN_IF_CATCH_EXCEPTION({
169
30.8k
            size_t block_size = _options.data_page_size;
170
30.8k
            _count = 0;
171
30.8k
            _raw_data_size = 0;
172
30.8k
            _data.clear();
173
30.8k
            _data.reserve(block_size);
174
30.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
30.8k
                    << "buffer must be naturally-aligned";
176
30.8k
            _buffer.clear();
177
30.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
30.8k
            _finished = false;
179
30.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
30.8k
        });
181
30.8k
        return Status::OK();
182
30.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
167
34.1k
    Status reset() override {
168
34.1k
        RETURN_IF_CATCH_EXCEPTION({
169
34.1k
            size_t block_size = _options.data_page_size;
170
34.1k
            _count = 0;
171
34.1k
            _raw_data_size = 0;
172
34.1k
            _data.clear();
173
34.1k
            _data.reserve(block_size);
174
34.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
34.1k
                    << "buffer must be naturally-aligned";
176
34.1k
            _buffer.clear();
177
34.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
34.1k
            _finished = false;
179
34.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
34.1k
        });
181
34.1k
        return Status::OK();
182
34.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Line
Count
Source
167
2.35k
    Status reset() override {
168
2.35k
        RETURN_IF_CATCH_EXCEPTION({
169
2.35k
            size_t block_size = _options.data_page_size;
170
2.35k
            _count = 0;
171
2.35k
            _raw_data_size = 0;
172
2.35k
            _data.clear();
173
2.35k
            _data.reserve(block_size);
174
2.35k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
2.35k
                    << "buffer must be naturally-aligned";
176
2.35k
            _buffer.clear();
177
2.35k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
2.35k
            _finished = false;
179
2.35k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
2.35k
        });
181
2.35k
        return Status::OK();
182
2.35k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Line
Count
Source
167
1.25k
    Status reset() override {
168
1.25k
        RETURN_IF_CATCH_EXCEPTION({
169
1.25k
            size_t block_size = _options.data_page_size;
170
1.25k
            _count = 0;
171
1.25k
            _raw_data_size = 0;
172
1.25k
            _data.clear();
173
1.25k
            _data.reserve(block_size);
174
1.25k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
1.25k
                    << "buffer must be naturally-aligned";
176
1.25k
            _buffer.clear();
177
1.25k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
1.25k
            _finished = false;
179
1.25k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
1.25k
        });
181
1.25k
        return Status::OK();
182
1.25k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
167
1.25k
    Status reset() override {
168
1.25k
        RETURN_IF_CATCH_EXCEPTION({
169
1.25k
            size_t block_size = _options.data_page_size;
170
1.25k
            _count = 0;
171
1.25k
            _raw_data_size = 0;
172
1.25k
            _data.clear();
173
1.25k
            _data.reserve(block_size);
174
1.25k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
1.25k
                    << "buffer must be naturally-aligned";
176
1.25k
            _buffer.clear();
177
1.25k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
1.25k
            _finished = false;
179
1.25k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
1.25k
        });
181
1.25k
        return Status::OK();
182
1.25k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE5resetEv
Line
Count
Source
167
1.27k
    Status reset() override {
168
1.27k
        RETURN_IF_CATCH_EXCEPTION({
169
1.27k
            size_t block_size = _options.data_page_size;
170
1.27k
            _count = 0;
171
1.27k
            _raw_data_size = 0;
172
1.27k
            _data.clear();
173
1.27k
            _data.reserve(block_size);
174
1.27k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
1.27k
                    << "buffer must be naturally-aligned";
176
1.27k
            _buffer.clear();
177
1.27k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
1.27k
            _finished = false;
179
1.27k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
1.27k
        });
181
1.27k
        return Status::OK();
182
1.27k
    }
183
184
667
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5countEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
184
8
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5countEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5countEv
Line
Count
Source
184
10
    size_t count() const override { return _count; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5countEv
Line
Count
Source
184
628
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5countEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5countEv
Line
Count
Source
184
10
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE5countEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5countEv
Line
Count
Source
184
6
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5countEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5countEv
Line
Count
Source
184
5
    size_t count() const override { return _count; }
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
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE5countEv
185
186
40.1k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
186
3.60k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
186
945
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
186
21.7k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
186
3.73k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
186
1.35k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
186
903
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
186
573
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
186
634
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4sizeEv
Line
Count
Source
186
112
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4sizeEv
Line
Count
Source
186
1.65k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
186
2.33k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE4sizeEv
Line
Count
Source
186
10
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4sizeEv
Line
Count
Source
186
119
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4sizeEv
Line
Count
Source
186
126
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4sizeEv
Line
Count
Source
186
104
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4sizeEv
Line
Count
Source
186
239
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
186
393
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
186
1.21k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4sizeEv
Line
Count
Source
186
106
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4sizeEv
Line
Count
Source
186
128
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4sizeEv
Line
Count
Source
186
112
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE4sizeEv
Line
Count
Source
186
12
    uint64_t size() const override { return _buffer.size(); }
187
188
495k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
188
44.6k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
188
8.23k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
188
66.0k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
188
147k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
188
10.9k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
188
63.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
188
5.90k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
188
9.05k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE17get_raw_data_sizeEv
Line
Count
Source
188
6
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE17get_raw_data_sizeEv
Line
Count
Source
188
700
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
188
37.7k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
188
43.2k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE17get_raw_data_sizeEv
Line
Count
Source
188
277
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
188
600
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
Line
Count
Source
188
7.76k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
188
257
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
188
9.65k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
188
18.7k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
188
17.1k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE17get_raw_data_sizeEv
Line
Count
Source
188
1.14k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Line
Count
Source
188
582
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
188
589
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE17get_raw_data_sizeEv
Line
Count
Source
188
691
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
189
190
private:
191
    BitshufflePageBuilder(const PageBuilderOptions& options)
192
758k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
44.6k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
8.20k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
343k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
142k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
10.2k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
63.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
1
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
5.78k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
7.52k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
2
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
680
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
37.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
44.2k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
334
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
438
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
7.58k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
336
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
9.65k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
12.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
16.9k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
1.21k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
669
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
666
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
583
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
193
194
767k
    OwnedSlice _finish(int final_size_of_type) {
195
767k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
767k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
767k
        int padding_elems = num_elems_after_padding - _count;
200
767k
        int padding_bytes = padding_elems * final_size_of_type;
201
23.2M
        for (int i = 0; i < padding_bytes; i++) {
202
22.5M
            _data.push_back(0);
203
22.5M
        }
204
205
        // reserve enough place for compression
206
767k
        _buffer.resize(
207
767k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
767k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
767k
        int64_t bytes =
211
767k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
767k
                                         num_elems_after_padding, final_size_of_type, 0);
213
767k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
767k
        encode_fixed32_le(&_buffer[0], _count);
223
767k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
767k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
767k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
767k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
767k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
767k
        return _buffer.build();
230
767k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
194
44.6k
    OwnedSlice _finish(int final_size_of_type) {
195
44.6k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
44.6k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
44.6k
        int padding_elems = num_elems_after_padding - _count;
200
44.6k
        int padding_bytes = padding_elems * final_size_of_type;
201
281k
        for (int i = 0; i < padding_bytes; i++) {
202
236k
            _data.push_back(0);
203
236k
        }
204
205
        // reserve enough place for compression
206
44.6k
        _buffer.resize(
207
44.6k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
44.6k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
44.6k
        int64_t bytes =
211
44.6k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
44.6k
                                         num_elems_after_padding, final_size_of_type, 0);
213
44.6k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
44.6k
        encode_fixed32_le(&_buffer[0], _count);
223
44.6k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
44.6k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
44.6k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
44.6k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
44.6k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
44.6k
        return _buffer.build();
230
44.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
194
8.23k
    OwnedSlice _finish(int final_size_of_type) {
195
8.23k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
8.23k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
8.23k
        int padding_elems = num_elems_after_padding - _count;
200
8.23k
        int padding_bytes = padding_elems * final_size_of_type;
201
84.4k
        for (int i = 0; i < padding_bytes; i++) {
202
76.1k
            _data.push_back(0);
203
76.1k
        }
204
205
        // reserve enough place for compression
206
8.23k
        _buffer.resize(
207
8.23k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
8.23k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
8.23k
        int64_t bytes =
211
8.23k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
8.23k
                                         num_elems_after_padding, final_size_of_type, 0);
213
8.23k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
8.23k
        encode_fixed32_le(&_buffer[0], _count);
223
8.23k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
8.23k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
8.23k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
8.23k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
8.23k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
8.23k
        return _buffer.build();
230
8.23k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
194
337k
    OwnedSlice _finish(int final_size_of_type) {
195
337k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
337k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
337k
        int padding_elems = num_elems_after_padding - _count;
200
337k
        int padding_bytes = padding_elems * final_size_of_type;
201
6.57M
        for (int i = 0; i < padding_bytes; i++) {
202
6.23M
            _data.push_back(0);
203
6.23M
        }
204
205
        // reserve enough place for compression
206
337k
        _buffer.resize(
207
337k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
337k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
337k
        int64_t bytes =
211
337k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
337k
                                         num_elems_after_padding, final_size_of_type, 0);
213
337k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
337k
        encode_fixed32_le(&_buffer[0], _count);
223
337k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
337k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
337k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
337k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
337k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
337k
        return _buffer.build();
230
337k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
194
147k
    OwnedSlice _finish(int final_size_of_type) {
195
147k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
147k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
147k
        int padding_elems = num_elems_after_padding - _count;
200
147k
        int padding_bytes = padding_elems * final_size_of_type;
201
6.99M
        for (int i = 0; i < padding_bytes; i++) {
202
6.84M
            _data.push_back(0);
203
6.84M
        }
204
205
        // reserve enough place for compression
206
147k
        _buffer.resize(
207
147k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
147k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
147k
        int64_t bytes =
211
147k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
147k
                                         num_elems_after_padding, final_size_of_type, 0);
213
147k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
147k
        encode_fixed32_le(&_buffer[0], _count);
223
147k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
147k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
147k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
147k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
147k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
147k
        return _buffer.build();
230
147k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
194
10.9k
    OwnedSlice _finish(int final_size_of_type) {
195
10.9k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
10.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
10.9k
        int padding_elems = num_elems_after_padding - _count;
200
10.9k
        int padding_bytes = padding_elems * final_size_of_type;
201
736k
        for (int i = 0; i < padding_bytes; i++) {
202
725k
            _data.push_back(0);
203
725k
        }
204
205
        // reserve enough place for compression
206
10.9k
        _buffer.resize(
207
10.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
10.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
10.9k
        int64_t bytes =
211
10.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
10.9k
                                         num_elems_after_padding, final_size_of_type, 0);
213
10.9k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
10.9k
        encode_fixed32_le(&_buffer[0], _count);
223
10.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
10.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
10.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
10.9k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
10.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
10.9k
        return _buffer.build();
230
10.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
194
63.4k
    OwnedSlice _finish(int final_size_of_type) {
195
63.4k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
63.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
63.4k
        int padding_elems = num_elems_after_padding - _count;
200
63.4k
        int padding_bytes = padding_elems * final_size_of_type;
201
3.06M
        for (int i = 0; i < padding_bytes; i++) {
202
3.00M
            _data.push_back(0);
203
3.00M
        }
204
205
        // reserve enough place for compression
206
63.4k
        _buffer.resize(
207
63.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
63.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
63.4k
        int64_t bytes =
211
63.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
63.4k
                                         num_elems_after_padding, final_size_of_type, 0);
213
63.4k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
63.4k
        encode_fixed32_le(&_buffer[0], _count);
223
63.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
63.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
63.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
63.4k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
63.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
63.4k
        return _buffer.build();
230
63.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
194
5.91k
    OwnedSlice _finish(int final_size_of_type) {
195
5.91k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
5.91k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
5.91k
        int padding_elems = num_elems_after_padding - _count;
200
5.91k
        int padding_bytes = padding_elems * final_size_of_type;
201
120k
        for (int i = 0; i < padding_bytes; i++) {
202
114k
            _data.push_back(0);
203
114k
        }
204
205
        // reserve enough place for compression
206
5.91k
        _buffer.resize(
207
5.91k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
5.91k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
5.91k
        int64_t bytes =
211
5.91k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
5.91k
                                         num_elems_after_padding, final_size_of_type, 0);
213
5.91k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
5.91k
        encode_fixed32_le(&_buffer[0], _count);
223
5.91k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
5.91k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
5.91k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
5.91k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
5.91k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
5.91k
        return _buffer.build();
230
5.91k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
194
9.68k
    OwnedSlice _finish(int final_size_of_type) {
195
9.68k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
9.68k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
9.68k
        int padding_elems = num_elems_after_padding - _count;
200
9.68k
        int padding_bytes = padding_elems * final_size_of_type;
201
319k
        for (int i = 0; i < padding_bytes; i++) {
202
310k
            _data.push_back(0);
203
310k
        }
204
205
        // reserve enough place for compression
206
9.68k
        _buffer.resize(
207
9.68k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
9.68k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
9.68k
        int64_t bytes =
211
9.68k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
9.68k
                                         num_elems_after_padding, final_size_of_type, 0);
213
9.68k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
9.68k
        encode_fixed32_le(&_buffer[0], _count);
223
9.68k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
9.68k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
9.68k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
9.68k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
9.68k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
9.68k
        return _buffer.build();
230
9.68k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
Line
Count
Source
194
6
    OwnedSlice _finish(int final_size_of_type) {
195
6
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
6
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
6
        int padding_elems = num_elems_after_padding - _count;
200
6
        int padding_bytes = padding_elems * final_size_of_type;
201
18
        for (int i = 0; i < padding_bytes; i++) {
202
12
            _data.push_back(0);
203
12
        }
204
205
        // reserve enough place for compression
206
6
        _buffer.resize(
207
6
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
6
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
6
        int64_t bytes =
211
6
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
6
                                         num_elems_after_padding, final_size_of_type, 0);
213
6
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
6
        encode_fixed32_le(&_buffer[0], _count);
223
6
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
6
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
6
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
6
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
6
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
6
        return _buffer.build();
230
6
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
194
711
    OwnedSlice _finish(int final_size_of_type) {
195
711
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
711
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
711
        int padding_elems = num_elems_after_padding - _count;
200
711
        int padding_bytes = padding_elems * final_size_of_type;
201
12.3k
        for (int i = 0; i < padding_bytes; i++) {
202
11.6k
            _data.push_back(0);
203
11.6k
        }
204
205
        // reserve enough place for compression
206
711
        _buffer.resize(
207
711
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
711
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
711
        int64_t bytes =
211
711
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
711
                                         num_elems_after_padding, final_size_of_type, 0);
213
711
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
711
        encode_fixed32_le(&_buffer[0], _count);
223
711
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
711
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
711
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
711
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
711
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
711
        return _buffer.build();
230
711
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
194
37.7k
    OwnedSlice _finish(int final_size_of_type) {
195
37.7k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
37.7k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
37.7k
        int padding_elems = num_elems_after_padding - _count;
200
37.7k
        int padding_bytes = padding_elems * final_size_of_type;
201
797k
        for (int i = 0; i < padding_bytes; i++) {
202
759k
            _data.push_back(0);
203
759k
        }
204
205
        // reserve enough place for compression
206
37.7k
        _buffer.resize(
207
37.7k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
37.7k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
37.7k
        int64_t bytes =
211
37.7k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
37.7k
                                         num_elems_after_padding, final_size_of_type, 0);
213
37.7k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
37.7k
        encode_fixed32_le(&_buffer[0], _count);
223
37.7k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
37.7k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
37.7k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
37.7k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
37.7k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
37.7k
        return _buffer.build();
230
37.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
194
43.2k
    OwnedSlice _finish(int final_size_of_type) {
195
43.2k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
43.2k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
43.2k
        int padding_elems = num_elems_after_padding - _count;
200
43.2k
        int padding_bytes = padding_elems * final_size_of_type;
201
1.83M
        for (int i = 0; i < padding_bytes; i++) {
202
1.79M
            _data.push_back(0);
203
1.79M
        }
204
205
        // reserve enough place for compression
206
43.2k
        _buffer.resize(
207
43.2k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
43.2k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
43.2k
        int64_t bytes =
211
43.2k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
43.2k
                                         num_elems_after_padding, final_size_of_type, 0);
213
43.2k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
43.2k
        encode_fixed32_le(&_buffer[0], _count);
223
43.2k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
43.2k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
43.2k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
43.2k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
43.2k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
43.2k
        return _buffer.build();
230
43.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE7_finishEi
Line
Count
Source
194
277
    OwnedSlice _finish(int final_size_of_type) {
195
277
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
277
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
277
        int padding_elems = num_elems_after_padding - _count;
200
277
        int padding_bytes = padding_elems * final_size_of_type;
201
11.6k
        for (int i = 0; i < padding_bytes; i++) {
202
11.3k
            _data.push_back(0);
203
11.3k
        }
204
205
        // reserve enough place for compression
206
277
        _buffer.resize(
207
277
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
277
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
277
        int64_t bytes =
211
277
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
277
                                         num_elems_after_padding, final_size_of_type, 0);
213
277
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
277
        encode_fixed32_le(&_buffer[0], _count);
223
277
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
277
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
277
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
277
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
277
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
277
        return _buffer.build();
230
277
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
194
605
    OwnedSlice _finish(int final_size_of_type) {
195
605
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
605
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
605
        int padding_elems = num_elems_after_padding - _count;
200
605
        int padding_bytes = padding_elems * final_size_of_type;
201
13.5k
        for (int i = 0; i < padding_bytes; i++) {
202
12.9k
            _data.push_back(0);
203
12.9k
        }
204
205
        // reserve enough place for compression
206
605
        _buffer.resize(
207
605
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
605
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
605
        int64_t bytes =
211
605
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
605
                                         num_elems_after_padding, final_size_of_type, 0);
213
605
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
605
        encode_fixed32_le(&_buffer[0], _count);
223
605
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
605
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
605
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
605
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
605
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
605
        return _buffer.build();
230
605
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
Line
Count
Source
194
7.75k
    OwnedSlice _finish(int final_size_of_type) {
195
7.75k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
7.75k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
7.75k
        int padding_elems = num_elems_after_padding - _count;
200
7.75k
        int padding_bytes = padding_elems * final_size_of_type;
201
404k
        for (int i = 0; i < padding_bytes; i++) {
202
396k
            _data.push_back(0);
203
396k
        }
204
205
        // reserve enough place for compression
206
7.75k
        _buffer.resize(
207
7.75k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
7.75k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
7.75k
        int64_t bytes =
211
7.75k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
7.75k
                                         num_elems_after_padding, final_size_of_type, 0);
213
7.75k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
7.75k
        encode_fixed32_le(&_buffer[0], _count);
223
7.75k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
7.75k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
7.75k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
7.75k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
7.75k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
7.75k
        return _buffer.build();
230
7.75k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
194
262
    OwnedSlice _finish(int final_size_of_type) {
195
262
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
262
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
262
        int padding_elems = num_elems_after_padding - _count;
200
262
        int padding_bytes = padding_elems * final_size_of_type;
201
16.3k
        for (int i = 0; i < padding_bytes; i++) {
202
16.1k
            _data.push_back(0);
203
16.1k
        }
204
205
        // reserve enough place for compression
206
262
        _buffer.resize(
207
262
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
262
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
262
        int64_t bytes =
211
262
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
262
                                         num_elems_after_padding, final_size_of_type, 0);
213
262
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
262
        encode_fixed32_le(&_buffer[0], _count);
223
262
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
262
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
262
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
262
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
262
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
262
        return _buffer.build();
230
262
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
194
9.65k
    OwnedSlice _finish(int final_size_of_type) {
195
9.65k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
9.65k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
9.65k
        int padding_elems = num_elems_after_padding - _count;
200
9.65k
        int padding_bytes = padding_elems * final_size_of_type;
201
116k
        for (int i = 0; i < padding_bytes; i++) {
202
106k
            _data.push_back(0);
203
106k
        }
204
205
        // reserve enough place for compression
206
9.65k
        _buffer.resize(
207
9.65k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
9.65k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
9.65k
        int64_t bytes =
211
9.65k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
9.65k
                                         num_elems_after_padding, final_size_of_type, 0);
213
9.65k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
9.65k
        encode_fixed32_le(&_buffer[0], _count);
223
9.65k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
9.65k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
9.65k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
9.65k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
9.65k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
9.65k
        return _buffer.build();
230
9.65k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
194
18.7k
    OwnedSlice _finish(int final_size_of_type) {
195
18.7k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
18.7k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
18.7k
        int padding_elems = num_elems_after_padding - _count;
200
18.7k
        int padding_bytes = padding_elems * final_size_of_type;
201
485k
        for (int i = 0; i < padding_bytes; i++) {
202
467k
            _data.push_back(0);
203
467k
        }
204
205
        // reserve enough place for compression
206
18.7k
        _buffer.resize(
207
18.7k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
18.7k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
18.7k
        int64_t bytes =
211
18.7k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
18.7k
                                         num_elems_after_padding, final_size_of_type, 0);
213
18.7k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
18.7k
        encode_fixed32_le(&_buffer[0], _count);
223
18.7k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
18.7k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
18.7k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
18.7k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
18.7k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
18.7k
        return _buffer.build();
230
18.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
194
17.1k
    OwnedSlice _finish(int final_size_of_type) {
195
17.1k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
17.1k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
17.1k
        int padding_elems = num_elems_after_padding - _count;
200
17.1k
        int padding_bytes = padding_elems * final_size_of_type;
201
1.14M
        for (int i = 0; i < padding_bytes; i++) {
202
1.13M
            _data.push_back(0);
203
1.13M
        }
204
205
        // reserve enough place for compression
206
17.1k
        _buffer.resize(
207
17.1k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
17.1k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
17.1k
        int64_t bytes =
211
17.1k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
17.1k
                                         num_elems_after_padding, final_size_of_type, 0);
213
17.1k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
17.1k
        encode_fixed32_le(&_buffer[0], _count);
223
17.1k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
17.1k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
17.1k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
17.1k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
17.1k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
17.1k
        return _buffer.build();
230
17.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE7_finishEi
Line
Count
Source
194
1.14k
    OwnedSlice _finish(int final_size_of_type) {
195
1.14k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
1.14k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
1.14k
        int padding_elems = num_elems_after_padding - _count;
200
1.14k
        int padding_bytes = padding_elems * final_size_of_type;
201
174k
        for (int i = 0; i < padding_bytes; i++) {
202
172k
            _data.push_back(0);
203
172k
        }
204
205
        // reserve enough place for compression
206
1.14k
        _buffer.resize(
207
1.14k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
1.14k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
1.14k
        int64_t bytes =
211
1.14k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
1.14k
                                         num_elems_after_padding, final_size_of_type, 0);
213
1.14k
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
1.14k
        encode_fixed32_le(&_buffer[0], _count);
223
1.14k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
1.14k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
1.14k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
1.14k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
1.14k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
1.14k
        return _buffer.build();
230
1.14k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Line
Count
Source
194
582
    OwnedSlice _finish(int final_size_of_type) {
195
582
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
582
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
582
        int padding_elems = num_elems_after_padding - _count;
200
582
        int padding_bytes = padding_elems * final_size_of_type;
201
11.8k
        for (int i = 0; i < padding_bytes; i++) {
202
11.2k
            _data.push_back(0);
203
11.2k
        }
204
205
        // reserve enough place for compression
206
582
        _buffer.resize(
207
582
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
582
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
582
        int64_t bytes =
211
582
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
582
                                         num_elems_after_padding, final_size_of_type, 0);
213
582
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
582
        encode_fixed32_le(&_buffer[0], _count);
223
582
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
582
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
582
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
582
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
582
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
582
        return _buffer.build();
230
582
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
194
588
    OwnedSlice _finish(int final_size_of_type) {
195
588
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
588
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
588
        int padding_elems = num_elems_after_padding - _count;
200
588
        int padding_bytes = padding_elems * final_size_of_type;
201
46.8k
        for (int i = 0; i < padding_bytes; i++) {
202
46.3k
            _data.push_back(0);
203
46.3k
        }
204
205
        // reserve enough place for compression
206
588
        _buffer.resize(
207
588
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
588
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
588
        int64_t bytes =
211
588
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
588
                                         num_elems_after_padding, final_size_of_type, 0);
213
588
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
588
        encode_fixed32_le(&_buffer[0], _count);
223
588
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
588
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
588
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
588
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
588
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
588
        return _buffer.build();
230
588
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE7_finishEi
Line
Count
Source
194
691
    OwnedSlice _finish(int final_size_of_type) {
195
691
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
691
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
691
        int padding_elems = num_elems_after_padding - _count;
200
691
        int padding_bytes = padding_elems * final_size_of_type;
201
50.3k
        for (int i = 0; i < padding_bytes; i++) {
202
49.6k
            _data.push_back(0);
203
49.6k
        }
204
205
        // reserve enough place for compression
206
691
        _buffer.resize(
207
691
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
691
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
691
        int64_t bytes =
211
691
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
691
                                         num_elems_after_padding, final_size_of_type, 0);
213
691
        if (bytes < 0) [[unlikely]] {
214
            // This means the bitshuffle function fails.
215
            // Ideally, this should not happen.
216
0
            warn_with_bitshuffle_error(bytes);
217
            // It does not matter what will be returned here,
218
            // since we have logged fatal in warn_with_bitshuffle_error().
219
0
            return OwnedSlice();
220
0
        }
221
        // update header
222
691
        encode_fixed32_le(&_buffer[0], _count);
223
691
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
691
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
691
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
691
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
691
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
691
        return _buffer.build();
230
691
    }
231
232
    using CppType = typename TypeTraits<Type>::CppType;
233
234
    CppType cell(int idx) const {
235
        DCHECK_GE(idx, 0);
236
        CppType ret;
237
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
238
        return ret;
239
    }
240
241
    static constexpr size_t SIZE_OF_TYPE = TypeTraits<Type>::size;
242
    PageBuilderOptions _options;
243
    uint32_t _count;
244
    uint32_t _remain_element_capacity;
245
    bool _finished;
246
    faststring _data;
247
    faststring _buffer;
248
    uint64_t _raw_data_size = 0;
249
};
250
251
inline Status parse_bit_shuffle_header(const Slice& data, size_t& num_elements,
252
                                       size_t& compressed_size, size_t& num_element_after_padding,
253
2.28M
                                       int& size_of_element) {
254
2.28M
    if (data.size < BITSHUFFLE_PAGE_HEADER_SIZE) {
255
0
        return Status::InternalError("file corruption: invalid data size:{}, header size:{}",
256
0
                                     data.size, BITSHUFFLE_PAGE_HEADER_SIZE);
257
0
    }
258
259
2.28M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
260
2.28M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
261
2.28M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
262
2.28M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
263
2.28M
    if (num_element_after_padding != ALIGN_UP(num_elements, 8)) {
264
0
        return Status::InternalError(
265
0
                "num of element information corrupted,"
266
0
                " _num_element_after_padding:{}, _num_elements:{}, expected_padding:{},"
267
0
                " compressed_size:{}, size_of_element:{}, data_size:{}",
268
0
                num_element_after_padding, num_elements, ALIGN_UP(num_elements, 8), compressed_size,
269
0
                size_of_element, data.size);
270
0
    }
271
2.28M
    switch (size_of_element) {
272
180k
    case 1:
273
218k
    case 2:
274
221k
    case 3:
275
1.42M
    case 4:
276
2.16M
    case 8:
277
2.17M
    case 12:
278
2.28M
    case 16:
279
2.28M
    case 32:
280
2.28M
        break;
281
0
    default:
282
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
283
2.28M
    }
284
2.28M
    return Status::OK();
285
2.28M
}
286
287
template <FieldType Type>
288
class BitShufflePageDecoder : public PageDecoder {
289
public:
290
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
291
1.14M
            : _data(data),
292
1.14M
              _options(options),
293
1.14M
              _parsed(false),
294
1.14M
              _num_elements(0),
295
1.14M
              _num_element_after_padding(0),
296
1.14M
              _size_of_element(0),
297
1.14M
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
90.3k
            : _data(data),
292
90.3k
              _options(options),
293
90.3k
              _parsed(false),
294
90.3k
              _num_elements(0),
295
90.3k
              _num_element_after_padding(0),
296
90.3k
              _size_of_element(0),
297
90.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
18.6k
            : _data(data),
292
18.6k
              _options(options),
293
18.6k
              _parsed(false),
294
18.6k
              _num_elements(0),
295
18.6k
              _num_element_after_padding(0),
296
18.6k
              _size_of_element(0),
297
18.6k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
515k
            : _data(data),
292
515k
              _options(options),
293
515k
              _parsed(false),
294
515k
              _num_elements(0),
295
515k
              _num_element_after_padding(0),
296
515k
              _size_of_element(0),
297
515k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
133k
            : _data(data),
292
133k
              _options(options),
293
133k
              _parsed(false),
294
133k
              _num_elements(0),
295
133k
              _num_element_after_padding(0),
296
133k
              _size_of_element(0),
297
133k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
18.6k
            : _data(data),
292
18.6k
              _options(options),
293
18.6k
              _parsed(false),
294
18.6k
              _num_elements(0),
295
18.6k
              _num_element_after_padding(0),
296
18.6k
              _size_of_element(0),
297
18.6k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
89.7k
            : _data(data),
292
89.7k
              _options(options),
293
89.7k
              _parsed(false),
294
89.7k
              _num_elements(0),
295
89.7k
              _num_element_after_padding(0),
296
89.7k
              _size_of_element(0),
297
89.7k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
10.8k
            : _data(data),
292
10.8k
              _options(options),
293
10.8k
              _parsed(false),
294
10.8k
              _num_elements(0),
295
10.8k
              _num_element_after_padding(0),
296
10.8k
              _size_of_element(0),
297
10.8k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
17.9k
            : _data(data),
292
17.9k
              _options(options),
293
17.9k
              _parsed(false),
294
17.9k
              _num_elements(0),
295
17.9k
              _num_element_after_padding(0),
296
17.9k
              _size_of_element(0),
297
17.9k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
6
            : _data(data),
292
6
              _options(options),
293
6
              _parsed(false),
294
6
              _num_elements(0),
295
6
              _num_element_after_padding(0),
296
6
              _size_of_element(0),
297
6
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
1.63k
            : _data(data),
292
1.63k
              _options(options),
293
1.63k
              _parsed(false),
294
1.63k
              _num_elements(0),
295
1.63k
              _num_element_after_padding(0),
296
1.63k
              _size_of_element(0),
297
1.63k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
59.8k
            : _data(data),
292
59.8k
              _options(options),
293
59.8k
              _parsed(false),
294
59.8k
              _num_elements(0),
295
59.8k
              _num_element_after_padding(0),
296
59.8k
              _size_of_element(0),
297
59.8k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
66.6k
            : _data(data),
292
66.6k
              _options(options),
293
66.6k
              _parsed(false),
294
66.6k
              _num_elements(0),
295
66.6k
              _num_element_after_padding(0),
296
66.6k
              _size_of_element(0),
297
66.6k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
3.14k
            : _data(data),
292
3.14k
              _options(options),
293
3.14k
              _parsed(false),
294
3.14k
              _num_elements(0),
295
3.14k
              _num_element_after_padding(0),
296
3.14k
              _size_of_element(0),
297
3.14k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
2.31k
            : _data(data),
292
2.31k
              _options(options),
293
2.31k
              _parsed(false),
294
2.31k
              _num_elements(0),
295
2.31k
              _num_element_after_padding(0),
296
2.31k
              _size_of_element(0),
297
2.31k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
16.1k
            : _data(data),
292
16.1k
              _options(options),
293
16.1k
              _parsed(false),
294
16.1k
              _num_elements(0),
295
16.1k
              _num_element_after_padding(0),
296
16.1k
              _size_of_element(0),
297
16.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
1.38k
            : _data(data),
292
1.38k
              _options(options),
293
1.38k
              _parsed(false),
294
1.38k
              _num_elements(0),
295
1.38k
              _num_element_after_padding(0),
296
1.38k
              _size_of_element(0),
297
1.38k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
15.3k
            : _data(data),
292
15.3k
              _options(options),
293
15.3k
              _parsed(false),
294
15.3k
              _num_elements(0),
295
15.3k
              _num_element_after_padding(0),
296
15.3k
              _size_of_element(0),
297
15.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
41.8k
            : _data(data),
292
41.8k
              _options(options),
293
41.8k
              _parsed(false),
294
41.8k
              _num_elements(0),
295
41.8k
              _num_element_after_padding(0),
296
41.8k
              _size_of_element(0),
297
41.8k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
29.7k
            : _data(data),
292
29.7k
              _options(options),
293
29.7k
              _parsed(false),
294
29.7k
              _num_elements(0),
295
29.7k
              _num_element_after_padding(0),
296
29.7k
              _size_of_element(0),
297
29.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
1.75k
            : _data(data),
292
1.75k
              _options(options),
293
1.75k
              _parsed(false),
294
1.75k
              _num_elements(0),
295
1.75k
              _num_element_after_padding(0),
296
1.75k
              _size_of_element(0),
297
1.75k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
882
            : _data(data),
292
882
              _options(options),
293
882
              _parsed(false),
294
882
              _num_elements(0),
295
882
              _num_element_after_padding(0),
296
882
              _size_of_element(0),
297
882
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
932
            : _data(data),
292
932
              _options(options),
293
932
              _parsed(false),
294
932
              _num_elements(0),
295
932
              _num_element_after_padding(0),
296
932
              _size_of_element(0),
297
932
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
5.14k
            : _data(data),
292
5.14k
              _options(options),
293
5.14k
              _parsed(false),
294
5.14k
              _num_elements(0),
295
5.14k
              _num_element_after_padding(0),
296
5.14k
              _size_of_element(0),
297
5.14k
              _cur_index(0) {}
298
299
1.14M
    Status init() override {
300
1.14M
        CHECK(!_parsed);
301
1.14M
        size_t unused;
302
1.14M
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
1.14M
                                                 _num_element_after_padding, _size_of_element));
304
305
1.14M
        if (_data.size !=
306
1.14M
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
13
            std::stringstream ss;
308
13
            ss << "Size information unmatched, _data.size:" << _data.size
309
13
               << ", _num_elements:" << _num_elements << ", expected size is "
310
13
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
13
            return Status::InternalError(ss.str());
312
13
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
1.14M
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
1.14M
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
1.14M
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
1.14M
        _parsed = true;
326
1.14M
        return Status::OK();
327
1.14M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
299
90.2k
    Status init() override {
300
90.2k
        CHECK(!_parsed);
301
90.2k
        size_t unused;
302
90.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
90.2k
                                                 _num_element_after_padding, _size_of_element));
304
305
90.2k
        if (_data.size !=
306
90.2k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
90.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
90.2k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
90.2k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
90.2k
        _parsed = true;
326
90.2k
        return Status::OK();
327
90.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
299
18.6k
    Status init() override {
300
18.6k
        CHECK(!_parsed);
301
18.6k
        size_t unused;
302
18.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
18.6k
                                                 _num_element_after_padding, _size_of_element));
304
305
18.6k
        if (_data.size !=
306
18.6k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
18.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
18.6k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
18.6k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
18.6k
        _parsed = true;
326
18.6k
        return Status::OK();
327
18.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
299
514k
    Status init() override {
300
514k
        CHECK(!_parsed);
301
514k
        size_t unused;
302
514k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
514k
                                                 _num_element_after_padding, _size_of_element));
304
305
514k
        if (_data.size !=
306
514k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
5
            std::stringstream ss;
308
5
            ss << "Size information unmatched, _data.size:" << _data.size
309
5
               << ", _num_elements:" << _num_elements << ", expected size is "
310
5
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
5
            return Status::InternalError(ss.str());
312
5
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
514k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
514k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
514k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
514k
        _parsed = true;
326
514k
        return Status::OK();
327
514k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
299
133k
    Status init() override {
300
133k
        CHECK(!_parsed);
301
133k
        size_t unused;
302
133k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
133k
                                                 _num_element_after_padding, _size_of_element));
304
305
133k
        if (_data.size !=
306
133k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
1
            std::stringstream ss;
308
1
            ss << "Size information unmatched, _data.size:" << _data.size
309
1
               << ", _num_elements:" << _num_elements << ", expected size is "
310
1
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
1
            return Status::InternalError(ss.str());
312
1
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
133k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
133k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
133k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
133k
        _parsed = true;
326
133k
        return Status::OK();
327
133k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
299
18.6k
    Status init() override {
300
18.6k
        CHECK(!_parsed);
301
18.6k
        size_t unused;
302
18.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
18.6k
                                                 _num_element_after_padding, _size_of_element));
304
305
18.6k
        if (_data.size !=
306
18.6k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
18.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
18.6k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
18.6k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
18.6k
        _parsed = true;
326
18.6k
        return Status::OK();
327
18.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
299
89.7k
    Status init() override {
300
89.7k
        CHECK(!_parsed);
301
89.7k
        size_t unused;
302
89.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
89.7k
                                                 _num_element_after_padding, _size_of_element));
304
305
89.7k
        if (_data.size !=
306
89.7k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
89.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
89.7k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
89.7k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
89.7k
        _parsed = true;
326
89.7k
        return Status::OK();
327
89.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
299
10.8k
    Status init() override {
300
10.8k
        CHECK(!_parsed);
301
10.8k
        size_t unused;
302
10.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
10.8k
                                                 _num_element_after_padding, _size_of_element));
304
305
10.8k
        if (_data.size !=
306
10.8k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
2
            std::stringstream ss;
308
2
            ss << "Size information unmatched, _data.size:" << _data.size
309
2
               << ", _num_elements:" << _num_elements << ", expected size is "
310
2
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
2
            return Status::InternalError(ss.str());
312
2
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
10.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
10.8k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
10.8k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
10.8k
        _parsed = true;
326
10.8k
        return Status::OK();
327
10.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
299
17.9k
    Status init() override {
300
17.9k
        CHECK(!_parsed);
301
17.9k
        size_t unused;
302
17.9k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
17.9k
                                                 _num_element_after_padding, _size_of_element));
304
305
17.9k
        if (_data.size !=
306
17.9k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
4
            std::stringstream ss;
308
4
            ss << "Size information unmatched, _data.size:" << _data.size
309
4
               << ", _num_elements:" << _num_elements << ", expected size is "
310
4
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
4
            return Status::InternalError(ss.str());
312
4
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
17.9k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
17.9k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
17.9k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
17.9k
        _parsed = true;
326
17.9k
        return Status::OK();
327
17.9k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
Line
Count
Source
299
6
    Status init() override {
300
6
        CHECK(!_parsed);
301
6
        size_t unused;
302
6
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
6
                                                 _num_element_after_padding, _size_of_element));
304
305
6
        if (_data.size !=
306
6
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
6
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
6
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
6
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
6
        _parsed = true;
326
6
        return Status::OK();
327
6
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
299
1.63k
    Status init() override {
300
1.63k
        CHECK(!_parsed);
301
1.63k
        size_t unused;
302
1.63k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
1.63k
                                                 _num_element_after_padding, _size_of_element));
304
305
1.63k
        if (_data.size !=
306
1.63k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
1.63k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
1.63k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
1.63k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
1.63k
        _parsed = true;
326
1.63k
        return Status::OK();
327
1.63k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
299
59.8k
    Status init() override {
300
59.8k
        CHECK(!_parsed);
301
59.8k
        size_t unused;
302
59.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
59.8k
                                                 _num_element_after_padding, _size_of_element));
304
305
59.8k
        if (_data.size !=
306
59.8k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
59.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
59.8k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
59.8k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
59.8k
        _parsed = true;
326
59.8k
        return Status::OK();
327
59.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
299
66.6k
    Status init() override {
300
66.6k
        CHECK(!_parsed);
301
66.6k
        size_t unused;
302
66.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
66.6k
                                                 _num_element_after_padding, _size_of_element));
304
305
66.6k
        if (_data.size !=
306
66.6k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
66.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
66.6k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
66.6k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
66.6k
        _parsed = true;
326
66.6k
        return Status::OK();
327
66.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE4initEv
Line
Count
Source
299
3.14k
    Status init() override {
300
3.14k
        CHECK(!_parsed);
301
3.14k
        size_t unused;
302
3.14k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
3.14k
                                                 _num_element_after_padding, _size_of_element));
304
305
3.14k
        if (_data.size !=
306
3.14k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
3.14k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
3.14k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
3.14k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
3.14k
        _parsed = true;
326
3.14k
        return Status::OK();
327
3.14k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
299
2.31k
    Status init() override {
300
2.31k
        CHECK(!_parsed);
301
2.31k
        size_t unused;
302
2.31k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
2.31k
                                                 _num_element_after_padding, _size_of_element));
304
305
2.31k
        if (_data.size !=
306
2.31k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
2.31k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
2.31k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
2.31k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
2.31k
        _parsed = true;
326
2.31k
        return Status::OK();
327
2.31k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
299
16.1k
    Status init() override {
300
16.1k
        CHECK(!_parsed);
301
16.1k
        size_t unused;
302
16.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
16.1k
                                                 _num_element_after_padding, _size_of_element));
304
305
16.1k
        if (_data.size !=
306
16.1k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
16.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
16.1k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
16.1k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
16.1k
        _parsed = true;
326
16.1k
        return Status::OK();
327
16.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
299
1.37k
    Status init() override {
300
1.37k
        CHECK(!_parsed);
301
1.37k
        size_t unused;
302
1.37k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
1.37k
                                                 _num_element_after_padding, _size_of_element));
304
305
1.37k
        if (_data.size !=
306
1.37k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
1
            std::stringstream ss;
308
1
            ss << "Size information unmatched, _data.size:" << _data.size
309
1
               << ", _num_elements:" << _num_elements << ", expected size is "
310
1
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
1
            return Status::InternalError(ss.str());
312
1
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
1.37k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
1.37k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
1.37k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
1.37k
        _parsed = true;
326
1.37k
        return Status::OK();
327
1.37k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
299
15.3k
    Status init() override {
300
15.3k
        CHECK(!_parsed);
301
15.3k
        size_t unused;
302
15.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
15.3k
                                                 _num_element_after_padding, _size_of_element));
304
305
15.3k
        if (_data.size !=
306
15.3k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
15.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
15.3k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
15.3k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
15.3k
        _parsed = true;
326
15.3k
        return Status::OK();
327
15.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
299
41.8k
    Status init() override {
300
41.8k
        CHECK(!_parsed);
301
41.8k
        size_t unused;
302
41.8k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
41.8k
                                                 _num_element_after_padding, _size_of_element));
304
305
41.8k
        if (_data.size !=
306
41.8k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
41.8k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
41.8k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
41.8k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
41.8k
        _parsed = true;
326
41.8k
        return Status::OK();
327
41.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
299
29.6k
    Status init() override {
300
29.6k
        CHECK(!_parsed);
301
29.6k
        size_t unused;
302
29.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
29.6k
                                                 _num_element_after_padding, _size_of_element));
304
305
29.6k
        if (_data.size !=
306
29.6k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
29.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
29.6k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
29.6k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
29.6k
        _parsed = true;
326
29.6k
        return Status::OK();
327
29.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
299
1.75k
    Status init() override {
300
1.75k
        CHECK(!_parsed);
301
1.75k
        size_t unused;
302
1.75k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
1.75k
                                                 _num_element_after_padding, _size_of_element));
304
305
1.75k
        if (_data.size !=
306
1.75k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
1.75k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
1.75k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
1.75k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
1.75k
        _parsed = true;
326
1.75k
        return Status::OK();
327
1.75k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
299
882
    Status init() override {
300
882
        CHECK(!_parsed);
301
882
        size_t unused;
302
882
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
882
                                                 _num_element_after_padding, _size_of_element));
304
305
882
        if (_data.size !=
306
882
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
882
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
882
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
882
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
882
        _parsed = true;
326
882
        return Status::OK();
327
882
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
299
931
    Status init() override {
300
931
        CHECK(!_parsed);
301
931
        size_t unused;
302
931
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
931
                                                 _num_element_after_padding, _size_of_element));
304
305
931
        if (_data.size !=
306
931
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
931
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
931
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
931
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
931
        _parsed = true;
326
931
        return Status::OK();
327
931
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE4initEv
Line
Count
Source
299
5.14k
    Status init() override {
300
5.14k
        CHECK(!_parsed);
301
5.14k
        size_t unused;
302
5.14k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
5.14k
                                                 _num_element_after_padding, _size_of_element));
304
305
5.14k
        if (_data.size !=
306
5.14k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
307
0
            std::stringstream ss;
308
0
            ss << "Size information unmatched, _data.size:" << _data.size
309
0
               << ", _num_elements:" << _num_elements << ", expected size is "
310
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
311
0
            return Status::InternalError(ss.str());
312
0
        }
313
314
        // Currently, only the UINT32 block encoder supports expanding size:
315
5.14k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
5.14k
                     _size_of_element != SIZE_OF_TYPE)) {
317
0
            return Status::InternalError(
318
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
319
0
                    _size_of_element, SIZE_OF_TYPE, Type);
320
0
        }
321
5.14k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
322
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
323
0
                                         _size_of_element, SIZE_OF_TYPE);
324
0
        }
325
5.14k
        _parsed = true;
326
5.14k
        return Status::OK();
327
5.14k
    }
328
329
    // If the page only contains null, then _num_elements == 0, and the nullmap has
330
    // some value. But in _seek_columns --> seek_to_ordinal --> _seek_to_pos_in_page
331
    // in this call stack it will pass pos == 0 to this method. Although we can add some
332
    // code such as check if the count == 0, then skip seek, but there are other method such
333
    // as init will also call seek with pos == 0. And the seek is useless when _num_elements
334
    // == 0, because next batch will return empty in this method.
335
3.73M
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
3.73M
        if (_num_elements == 0) [[unlikely]] {
338
3.62k
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
3.62k
        }
343
344
3.73M
        DCHECK_LE(pos, _num_elements);
345
3.73M
        _cur_index = pos;
346
3.73M
        return Status::OK();
347
3.73M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
335
332k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
332k
        if (_num_elements == 0) [[unlikely]] {
338
446
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
446
        }
343
344
332k
        DCHECK_LE(pos, _num_elements);
345
332k
        _cur_index = pos;
346
332k
        return Status::OK();
347
332k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
335
230k
    Status seek_to_position_in_page(size_t pos) override {
336
230k
        DCHECK(_parsed) << "Must call init()";
337
230k
        if (_num_elements == 0) [[unlikely]] {
338
0
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
0
        }
343
344
230k
        DCHECK_LE(pos, _num_elements);
345
230k
        _cur_index = pos;
346
230k
        return Status::OK();
347
230k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
335
1.31M
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
1.31M
        if (_num_elements == 0) [[unlikely]] {
338
2.03k
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
2.03k
        }
343
344
1.31M
        DCHECK_LE(pos, _num_elements);
345
1.31M
        _cur_index = pos;
346
1.31M
        return Status::OK();
347
1.31M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
335
138k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
138k
        if (_num_elements == 0) [[unlikely]] {
338
474
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
474
        }
343
344
138k
        DCHECK_LE(pos, _num_elements);
345
138k
        _cur_index = pos;
346
138k
        return Status::OK();
347
138k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
335
117k
    Status seek_to_position_in_page(size_t pos) override {
336
117k
        DCHECK(_parsed) << "Must call init()";
337
117k
        if (_num_elements == 0) [[unlikely]] {
338
6
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
6
        }
343
344
117k
        DCHECK_LE(pos, _num_elements);
345
117k
        _cur_index = pos;
346
117k
        return Status::OK();
347
117k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
335
14.9k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
14.9k
        if (_num_elements == 0) [[unlikely]] {
338
0
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
0
        }
343
344
14.9k
        DCHECK_LE(pos, _num_elements);
345
14.9k
        _cur_index = pos;
346
14.9k
        return Status::OK();
347
14.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
335
234k
    Status seek_to_position_in_page(size_t pos) override {
336
234k
        DCHECK(_parsed) << "Must call init()";
337
234k
        if (_num_elements == 0) [[unlikely]] {
338
0
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
0
        }
343
344
234k
        DCHECK_LE(pos, _num_elements);
345
234k
        _cur_index = pos;
346
234k
        return Status::OK();
347
234k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
335
209k
    Status seek_to_position_in_page(size_t pos) override {
336
209k
        DCHECK(_parsed) << "Must call init()";
337
209k
        if (_num_elements == 0) [[unlikely]] {
338
1
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
1
        }
343
344
209k
        DCHECK_LE(pos, _num_elements);
345
209k
        _cur_index = pos;
346
209k
        return Status::OK();
347
209k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
Line
Count
Source
335
94
    Status seek_to_position_in_page(size_t pos) override {
336
94
        DCHECK(_parsed) << "Must call init()";
337
94
        if (_num_elements == 0) [[unlikely]] {
338
0
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
0
        }
343
344
94
        DCHECK_LE(pos, _num_elements);
345
94
        _cur_index = pos;
346
94
        return Status::OK();
347
94
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Line
Count
Source
335
221k
    Status seek_to_position_in_page(size_t pos) override {
336
221k
        DCHECK(_parsed) << "Must call init()";
337
221k
        if (_num_elements == 0) [[unlikely]] {
338
0
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
0
        }
343
344
221k
        DCHECK_LE(pos, _num_elements);
345
221k
        _cur_index = pos;
346
221k
        return Status::OK();
347
221k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
335
510k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
510k
        if (_num_elements == 0) [[unlikely]] {
338
197
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
197
        }
343
344
510k
        DCHECK_LE(pos, _num_elements);
345
510k
        _cur_index = pos;
346
510k
        return Status::OK();
347
510k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
335
56.7k
    Status seek_to_position_in_page(size_t pos) override {
336
56.7k
        DCHECK(_parsed) << "Must call init()";
337
56.7k
        if (_num_elements == 0) [[unlikely]] {
338
14
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
14
        }
343
344
56.7k
        DCHECK_LE(pos, _num_elements);
345
56.7k
        _cur_index = pos;
346
56.7k
        return Status::OK();
347
56.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE24seek_to_position_in_pageEm
Line
Count
Source
335
969
    Status seek_to_position_in_page(size_t pos) override {
336
969
        DCHECK(_parsed) << "Must call init()";
337
969
        if (_num_elements == 0) [[unlikely]] {
338
8
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
8
        }
343
344
969
        DCHECK_LE(pos, _num_elements);
345
969
        _cur_index = pos;
346
969
        return Status::OK();
347
969
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
335
206k
    Status seek_to_position_in_page(size_t pos) override {
336
206k
        DCHECK(_parsed) << "Must call init()";
337
206k
        if (_num_elements == 0) [[unlikely]] {
338
16
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
16
        }
343
344
206k
        DCHECK_LE(pos, _num_elements);
345
206k
        _cur_index = pos;
346
206k
        return Status::OK();
347
206k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
335
7.15k
    Status seek_to_position_in_page(size_t pos) override {
336
7.15k
        DCHECK(_parsed) << "Must call init()";
337
7.15k
        if (_num_elements == 0) [[unlikely]] {
338
357
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
357
        }
343
344
7.15k
        DCHECK_LE(pos, _num_elements);
345
7.15k
        _cur_index = pos;
346
7.15k
        return Status::OK();
347
7.15k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
Line
Count
Source
335
55
    Status seek_to_position_in_page(size_t pos) override {
336
55
        DCHECK(_parsed) << "Must call init()";
337
55
        if (_num_elements == 0) [[unlikely]] {
338
0
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
0
        }
343
344
55
        DCHECK_LE(pos, _num_elements);
345
55
        _cur_index = pos;
346
55
        return Status::OK();
347
55
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Line
Count
Source
335
865
    Status seek_to_position_in_page(size_t pos) override {
336
865
        DCHECK(_parsed) << "Must call init()";
337
865
        if (_num_elements == 0) [[unlikely]] {
338
25
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
25
        }
343
344
865
        DCHECK_LE(pos, _num_elements);
345
865
        _cur_index = pos;
346
865
        return Status::OK();
347
865
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
335
17.8k
    Status seek_to_position_in_page(size_t pos) override {
336
17.8k
        DCHECK(_parsed) << "Must call init()";
337
17.8k
        if (_num_elements == 0) [[unlikely]] {
338
15
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
15
        }
343
344
17.8k
        DCHECK_LE(pos, _num_elements);
345
17.8k
        _cur_index = pos;
346
17.8k
        return Status::OK();
347
17.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Line
Count
Source
335
120k
    Status seek_to_position_in_page(size_t pos) override {
336
120k
        DCHECK(_parsed) << "Must call init()";
337
120k
        if (_num_elements == 0) [[unlikely]] {
338
10
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
10
        }
343
344
120k
        DCHECK_LE(pos, _num_elements);
345
120k
        _cur_index = pos;
346
120k
        return Status::OK();
347
120k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Line
Count
Source
335
1.98k
    Status seek_to_position_in_page(size_t pos) override {
336
1.98k
        DCHECK(_parsed) << "Must call init()";
337
1.98k
        if (_num_elements == 0) [[unlikely]] {
338
0
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
0
        }
343
344
1.98k
        DCHECK_LE(pos, _num_elements);
345
1.98k
        _cur_index = pos;
346
1.98k
        return Status::OK();
347
1.98k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE24seek_to_position_in_pageEm
Line
Count
Source
335
53
    Status seek_to_position_in_page(size_t pos) override {
336
53
        DCHECK(_parsed) << "Must call init()";
337
53
        if (_num_elements == 0) [[unlikely]] {
338
0
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
0
        }
343
344
53
        DCHECK_LE(pos, _num_elements);
345
53
        _cur_index = pos;
346
53
        return Status::OK();
347
53
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE24seek_to_position_in_pageEm
Line
Count
Source
335
62
    Status seek_to_position_in_page(size_t pos) override {
336
62
        DCHECK(_parsed) << "Must call init()";
337
62
        if (_num_elements == 0) [[unlikely]] {
338
1
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
1
        }
343
344
62
        DCHECK_LE(pos, _num_elements);
345
62
        _cur_index = pos;
346
62
        return Status::OK();
347
62
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE24seek_to_position_in_pageEm
Line
Count
Source
335
1.25k
    Status seek_to_position_in_page(size_t pos) override {
336
1.25k
        DCHECK(_parsed) << "Must call init()";
337
1.25k
        if (_num_elements == 0) [[unlikely]] {
338
18
            if (pos != 0) {
339
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
340
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
341
0
            }
342
18
        }
343
344
1.25k
        DCHECK_LE(pos, _num_elements);
345
1.25k
        _cur_index = pos;
346
1.25k
        return Status::OK();
347
1.25k
    }
348
349
15
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
350
15
        DCHECK(_parsed) << "Must call init() firstly";
351
352
15
        if (_num_elements == 0) {
353
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
354
0
        }
355
356
15
        size_t left = 0;
357
15
        size_t right = _num_elements;
358
359
15
        void* mid_value = nullptr;
360
361
        // find the first value >= target. after loop,
362
        // - left == index of first value >= target when found
363
        // - left == _num_elements when not found (all values < target)
364
162
        while (left < right) {
365
147
            size_t mid = left + (right - left) / 2;
366
147
            mid_value = get_data(mid);
367
147
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
368
68
                left = mid + 1;
369
79
            } else {
370
79
                right = mid;
371
79
            }
372
147
        }
373
15
        if (left >= _num_elements) {
374
3
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
375
3
        }
376
12
        void* find_value = get_data(left);
377
12
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
378
9
            *exact_match = true;
379
9
        } else {
380
3
            *exact_match = false;
381
3
        }
382
383
12
        _cur_index = left;
384
12
        return Status::OK();
385
15
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE22seek_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
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE22seek_at_or_after_valueEPKvPb
Line
Count
Source
349
5
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
350
5
        DCHECK(_parsed) << "Must call init() firstly";
351
352
5
        if (_num_elements == 0) {
353
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
354
0
        }
355
356
5
        size_t left = 0;
357
5
        size_t right = _num_elements;
358
359
5
        void* mid_value = nullptr;
360
361
        // find the first value >= target. after loop,
362
        // - left == index of first value >= target when found
363
        // - left == _num_elements when not found (all values < target)
364
54
        while (left < right) {
365
49
            size_t mid = left + (right - left) / 2;
366
49
            mid_value = get_data(mid);
367
49
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
368
21
                left = mid + 1;
369
28
            } else {
370
28
                right = mid;
371
28
            }
372
49
        }
373
5
        if (left >= _num_elements) {
374
1
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
375
1
        }
376
4
        void* find_value = get_data(left);
377
4
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
378
3
            *exact_match = true;
379
3
        } else {
380
1
            *exact_match = false;
381
1
        }
382
383
4
        _cur_index = left;
384
4
        return Status::OK();
385
5
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE22seek_at_or_after_valueEPKvPb
Line
Count
Source
349
5
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
350
5
        DCHECK(_parsed) << "Must call init() firstly";
351
352
5
        if (_num_elements == 0) {
353
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
354
0
        }
355
356
5
        size_t left = 0;
357
5
        size_t right = _num_elements;
358
359
5
        void* mid_value = nullptr;
360
361
        // find the first value >= target. after loop,
362
        // - left == index of first value >= target when found
363
        // - left == _num_elements when not found (all values < target)
364
54
        while (left < right) {
365
49
            size_t mid = left + (right - left) / 2;
366
49
            mid_value = get_data(mid);
367
49
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
368
22
                left = mid + 1;
369
27
            } else {
370
27
                right = mid;
371
27
            }
372
49
        }
373
5
        if (left >= _num_elements) {
374
1
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
375
1
        }
376
4
        void* find_value = get_data(left);
377
4
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
378
3
            *exact_match = true;
379
3
        } else {
380
1
            *exact_match = false;
381
1
        }
382
383
4
        _cur_index = left;
384
4
        return Status::OK();
385
5
    }
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_9FieldTypeE41EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE22seek_at_or_after_valueEPKvPb
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE22seek_at_or_after_valueEPKvPb
Line
Count
Source
349
5
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
350
5
        DCHECK(_parsed) << "Must call init() firstly";
351
352
5
        if (_num_elements == 0) {
353
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
354
0
        }
355
356
5
        size_t left = 0;
357
5
        size_t right = _num_elements;
358
359
5
        void* mid_value = nullptr;
360
361
        // find the first value >= target. after loop,
362
        // - left == index of first value >= target when found
363
        // - left == _num_elements when not found (all values < target)
364
54
        while (left < right) {
365
49
            size_t mid = left + (right - left) / 2;
366
49
            mid_value = get_data(mid);
367
49
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
368
25
                left = mid + 1;
369
25
            } else {
370
24
                right = mid;
371
24
            }
372
49
        }
373
5
        if (left >= _num_elements) {
374
1
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
375
1
        }
376
4
        void* find_value = get_data(left);
377
4
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
378
3
            *exact_match = true;
379
3
        } else {
380
1
            *exact_match = false;
381
1
        }
382
383
4
        _cur_index = left;
384
4
        return Status::OK();
385
5
    }
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
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE22seek_at_or_after_valueEPKvPb
386
387
    template <bool forward_index = true>
388
2.33M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
2.33M
        DCHECK(_parsed);
390
2.34M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
2.33M
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
2.33M
        StorageLayout<Type>::storage_to_column(
398
2.33M
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
2.33M
        *n = max_fetch;
400
2.33M
        if constexpr (forward_index) {
401
2.28M
            _cur_index += max_fetch;
402
2.28M
        }
403
404
2.33M
        return Status::OK();
405
2.33M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
177k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
177k
        DCHECK(_parsed);
390
177k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
177k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
177k
        StorageLayout<Type>::storage_to_column(
398
177k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
177k
        *n = max_fetch;
400
177k
        if constexpr (forward_index) {
401
177k
            _cur_index += max_fetch;
402
177k
        }
403
404
177k
        return Status::OK();
405
177k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
14.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
14.8k
        DCHECK(_parsed);
390
14.8k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
14.8k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
14.8k
        StorageLayout<Type>::storage_to_column(
398
14.8k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
14.8k
        *n = max_fetch;
400
14.8k
        if constexpr (forward_index) {
401
14.8k
            _cur_index += max_fetch;
402
14.8k
        }
403
404
14.8k
        return Status::OK();
405
14.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
524k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
524k
        DCHECK(_parsed);
390
525k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
524k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
524k
        StorageLayout<Type>::storage_to_column(
398
524k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
524k
        *n = max_fetch;
400
524k
        if constexpr (forward_index) {
401
524k
            _cur_index += max_fetch;
402
524k
        }
403
404
524k
        return Status::OK();
405
524k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
787k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
787k
        DCHECK(_parsed);
390
793k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
787k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
787k
        StorageLayout<Type>::storage_to_column(
398
787k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
787k
        *n = max_fetch;
400
787k
        if constexpr (forward_index) {
401
787k
            _cur_index += max_fetch;
402
787k
        }
403
404
787k
        return Status::OK();
405
787k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
14.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
14.2k
        DCHECK(_parsed);
390
14.2k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
14.2k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
14.2k
        StorageLayout<Type>::storage_to_column(
398
14.2k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
14.2k
        *n = max_fetch;
400
14.2k
        if constexpr (forward_index) {
401
14.2k
            _cur_index += max_fetch;
402
14.2k
        }
403
404
14.2k
        return Status::OK();
405
14.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
92.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
92.5k
        DCHECK(_parsed);
390
92.5k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
92.5k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
92.5k
        StorageLayout<Type>::storage_to_column(
398
92.5k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
92.5k
        *n = max_fetch;
400
92.5k
        if constexpr (forward_index) {
401
92.5k
            _cur_index += max_fetch;
402
92.5k
        }
403
404
92.5k
        return Status::OK();
405
92.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
54.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
54.0k
        DCHECK(_parsed);
390
54.0k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
54.0k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
54.0k
        StorageLayout<Type>::storage_to_column(
398
54.0k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
54.0k
        *n = max_fetch;
400
        if constexpr (forward_index) {
401
            _cur_index += max_fetch;
402
        }
403
404
54.0k
        return Status::OK();
405
54.0k
    }
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
388
7.22k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
7.22k
        DCHECK(_parsed);
390
7.22k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
7.22k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
7.22k
        StorageLayout<Type>::storage_to_column(
398
7.22k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
7.22k
        *n = max_fetch;
400
7.22k
        if constexpr (forward_index) {
401
7.22k
            _cur_index += max_fetch;
402
7.22k
        }
403
404
7.22k
        return Status::OK();
405
7.22k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
39.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
39.1k
        DCHECK(_parsed);
390
39.1k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
39.1k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
39.1k
        StorageLayout<Type>::storage_to_column(
398
39.1k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
39.1k
        *n = max_fetch;
400
39.1k
        if constexpr (forward_index) {
401
39.1k
            _cur_index += max_fetch;
402
39.1k
        }
403
404
39.1k
        return Status::OK();
405
39.1k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
93
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
93
        DCHECK(_parsed);
390
93
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
93
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
93
        StorageLayout<Type>::storage_to_column(
398
93
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
93
        *n = max_fetch;
400
93
        if constexpr (forward_index) {
401
93
            _cur_index += max_fetch;
402
93
        }
403
404
93
        return Status::OK();
405
93
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
4.02k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
4.02k
        DCHECK(_parsed);
390
4.02k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
4.02k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
4.02k
        StorageLayout<Type>::storage_to_column(
398
4.02k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
4.02k
        *n = max_fetch;
400
4.02k
        if constexpr (forward_index) {
401
4.02k
            _cur_index += max_fetch;
402
4.02k
        }
403
404
4.02k
        return Status::OK();
405
4.02k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
372k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
372k
        DCHECK(_parsed);
390
372k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
372k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
372k
        StorageLayout<Type>::storage_to_column(
398
372k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
372k
        *n = max_fetch;
400
372k
        if constexpr (forward_index) {
401
372k
            _cur_index += max_fetch;
402
372k
        }
403
404
372k
        return Status::OK();
405
372k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
61.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
61.4k
        DCHECK(_parsed);
390
61.4k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
61.4k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
61.4k
        StorageLayout<Type>::storage_to_column(
398
61.4k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
61.4k
        *n = max_fetch;
400
61.4k
        if constexpr (forward_index) {
401
61.4k
            _cur_index += max_fetch;
402
61.4k
        }
403
404
61.4k
        return Status::OK();
405
61.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
2.14k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
2.14k
        DCHECK(_parsed);
390
2.14k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
2.14k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
2.14k
        StorageLayout<Type>::storage_to_column(
398
2.14k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
2.14k
        *n = max_fetch;
400
2.14k
        if constexpr (forward_index) {
401
2.14k
            _cur_index += max_fetch;
402
2.14k
        }
403
404
2.14k
        return Status::OK();
405
2.14k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
1.25k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
1.25k
        DCHECK(_parsed);
390
1.25k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
1.25k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
1.25k
        StorageLayout<Type>::storage_to_column(
398
1.25k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
1.25k
        *n = max_fetch;
400
1.25k
        if constexpr (forward_index) {
401
1.25k
            _cur_index += max_fetch;
402
1.25k
        }
403
404
1.25k
        return Status::OK();
405
1.25k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
8.32k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
8.32k
        DCHECK(_parsed);
390
8.32k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
8.32k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
8.32k
        StorageLayout<Type>::storage_to_column(
398
8.32k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
8.32k
        *n = max_fetch;
400
8.32k
        if constexpr (forward_index) {
401
8.32k
            _cur_index += max_fetch;
402
8.32k
        }
403
404
8.32k
        return Status::OK();
405
8.32k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
1.26k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
1.26k
        DCHECK(_parsed);
390
1.26k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
1.26k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
1.26k
        StorageLayout<Type>::storage_to_column(
398
1.26k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
1.26k
        *n = max_fetch;
400
1.26k
        if constexpr (forward_index) {
401
1.26k
            _cur_index += max_fetch;
402
1.26k
        }
403
404
1.26k
        return Status::OK();
405
1.26k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
7.84k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
7.84k
        DCHECK(_parsed);
390
7.84k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
7.84k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
7.84k
        StorageLayout<Type>::storage_to_column(
398
7.84k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
7.84k
        *n = max_fetch;
400
7.84k
        if constexpr (forward_index) {
401
7.84k
            _cur_index += max_fetch;
402
7.84k
        }
403
404
7.84k
        return Status::OK();
405
7.84k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
48.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
48.0k
        DCHECK(_parsed);
390
48.0k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
48.0k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
48.0k
        StorageLayout<Type>::storage_to_column(
398
48.0k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
48.0k
        *n = max_fetch;
400
48.0k
        if constexpr (forward_index) {
401
48.0k
            _cur_index += max_fetch;
402
48.0k
        }
403
404
48.0k
        return Status::OK();
405
48.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
20.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
20.2k
        DCHECK(_parsed);
390
20.2k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
20.2k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
20.2k
        StorageLayout<Type>::storage_to_column(
398
20.2k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
20.2k
        *n = max_fetch;
400
20.2k
        if constexpr (forward_index) {
401
20.2k
            _cur_index += max_fetch;
402
20.2k
        }
403
404
20.2k
        return Status::OK();
405
20.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
3.16k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
3.16k
        DCHECK(_parsed);
390
3.16k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
3.16k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
3.16k
        StorageLayout<Type>::storage_to_column(
398
3.16k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
3.16k
        *n = max_fetch;
400
3.16k
        if constexpr (forward_index) {
401
3.16k
            _cur_index += max_fetch;
402
3.16k
        }
403
404
3.16k
        return Status::OK();
405
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
388
631
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
631
        DCHECK(_parsed);
390
631
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
631
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
631
        StorageLayout<Type>::storage_to_column(
398
631
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
631
        *n = max_fetch;
400
631
        if constexpr (forward_index) {
401
631
            _cur_index += max_fetch;
402
631
        }
403
404
631
        return Status::OK();
405
631
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
651
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
651
        DCHECK(_parsed);
390
651
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
651
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
651
        StorageLayout<Type>::storage_to_column(
398
651
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
651
        *n = max_fetch;
400
651
        if constexpr (forward_index) {
401
651
            _cur_index += max_fetch;
402
651
        }
403
404
651
        return Status::OK();
405
651
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
94.3k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
94.3k
        DCHECK(_parsed);
390
94.4k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
94.3k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
94.3k
        StorageLayout<Type>::storage_to_column(
398
94.3k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
94.3k
        *n = max_fetch;
400
94.3k
        if constexpr (forward_index) {
401
94.3k
            _cur_index += max_fetch;
402
94.3k
        }
403
404
94.3k
        return Status::OK();
405
94.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
406
407
2.28M
    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
407
177k
    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
407
14.8k
    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
407
524k
    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
407
790k
    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
407
14.2k
    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
407
92.5k
    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
407
7.22k
    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
407
39.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
407
93
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
407
4.02k
    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
407
372k
    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
407
61.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
407
2.14k
    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
407
1.25k
    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
407
8.32k
    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
407
1.27k
    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
407
7.84k
    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
407
48.0k
    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
407
20.2k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
407
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
407
631
    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
407
652
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
407
94.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
408
409
    Status read_by_rowids(const rowid_t* rowids, ordinal_t page_first_ordinal, size_t* n,
410
414k
                          MutableColumnPtr& dst) override {
411
414k
        DCHECK(_parsed);
412
414k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
414k
        auto total = *n;
418
414k
        auto read_count = 0;
419
414k
        _buffer.resize(total);
420
127M
        for (size_t i = 0; i < total; ++i) {
421
126M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
126M
            if (UNLIKELY(ord >= _num_elements)) {
423
11.8k
                break;
424
11.8k
            }
425
426
126M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
126M
        }
428
429
414k
        if (LIKELY(read_count > 0)) {
430
414k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
414k
                                                   read_count, *dst);
432
414k
        }
433
434
414k
        *n = read_count;
435
414k
        return Status::OK();
436
414k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
43.1k
                          MutableColumnPtr& dst) override {
411
43.1k
        DCHECK(_parsed);
412
43.1k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
43.1k
        auto total = *n;
418
43.1k
        auto read_count = 0;
419
43.1k
        _buffer.resize(total);
420
2.07M
        for (size_t i = 0; i < total; ++i) {
421
2.03M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
2.03M
            if (UNLIKELY(ord >= _num_elements)) {
423
0
                break;
424
0
            }
425
426
2.03M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
2.03M
        }
428
429
43.2k
        if (LIKELY(read_count > 0)) {
430
43.2k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
43.2k
                                                   read_count, *dst);
432
43.2k
        }
433
434
43.1k
        *n = read_count;
435
43.1k
        return Status::OK();
436
43.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
8.34k
                          MutableColumnPtr& dst) override {
411
8.34k
        DCHECK(_parsed);
412
8.34k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
8.34k
        auto total = *n;
418
8.34k
        auto read_count = 0;
419
8.34k
        _buffer.resize(total);
420
638k
        for (size_t i = 0; i < total; ++i) {
421
629k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
629k
            if (UNLIKELY(ord >= _num_elements)) {
423
14
                break;
424
14
            }
425
426
629k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
629k
        }
428
429
8.34k
        if (LIKELY(read_count > 0)) {
430
8.34k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
8.34k
                                                   read_count, *dst);
432
8.34k
        }
433
434
8.34k
        *n = read_count;
435
8.34k
        return Status::OK();
436
8.34k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
77.1k
                          MutableColumnPtr& dst) override {
411
77.1k
        DCHECK(_parsed);
412
77.1k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
77.1k
        auto total = *n;
418
77.1k
        auto read_count = 0;
419
77.1k
        _buffer.resize(total);
420
38.9M
        for (size_t i = 0; i < total; ++i) {
421
38.8M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
38.8M
            if (UNLIKELY(ord >= _num_elements)) {
423
267
                break;
424
267
            }
425
426
38.8M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
38.8M
        }
428
429
77.2k
        if (LIKELY(read_count > 0)) {
430
77.2k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
77.2k
                                                   read_count, *dst);
432
77.2k
        }
433
434
77.1k
        *n = read_count;
435
77.1k
        return Status::OK();
436
77.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
73.2k
                          MutableColumnPtr& dst) override {
411
73.2k
        DCHECK(_parsed);
412
73.2k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
73.2k
        auto total = *n;
418
73.2k
        auto read_count = 0;
419
73.2k
        _buffer.resize(total);
420
28.6M
        for (size_t i = 0; i < total; ++i) {
421
28.5M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
28.5M
            if (UNLIKELY(ord >= _num_elements)) {
423
2.29k
                break;
424
2.29k
            }
425
426
28.5M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
28.5M
        }
428
429
73.2k
        if (LIKELY(read_count > 0)) {
430
73.2k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
73.2k
                                                   read_count, *dst);
432
73.2k
        }
433
434
73.2k
        *n = read_count;
435
73.2k
        return Status::OK();
436
73.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
8.60k
                          MutableColumnPtr& dst) override {
411
8.60k
        DCHECK(_parsed);
412
8.60k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
8.60k
        auto total = *n;
418
8.60k
        auto read_count = 0;
419
8.60k
        _buffer.resize(total);
420
1.49M
        for (size_t i = 0; i < total; ++i) {
421
1.48M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
1.48M
            if (UNLIKELY(ord >= _num_elements)) {
423
526
                break;
424
526
            }
425
426
1.48M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
1.48M
        }
428
429
8.61k
        if (LIKELY(read_count > 0)) {
430
8.61k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
8.61k
                                                   read_count, *dst);
432
8.61k
        }
433
434
8.60k
        *n = read_count;
435
8.60k
        return Status::OK();
436
8.60k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
61.2k
                          MutableColumnPtr& dst) override {
411
61.2k
        DCHECK(_parsed);
412
61.2k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
61.2k
        auto total = *n;
418
61.2k
        auto read_count = 0;
419
61.2k
        _buffer.resize(total);
420
758k
        for (size_t i = 0; i < total; ++i) {
421
697k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
697k
            if (UNLIKELY(ord >= _num_elements)) {
423
12
                break;
424
12
            }
425
426
697k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
697k
        }
428
429
61.2k
        if (LIKELY(read_count > 0)) {
430
61.2k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
61.2k
                                                   read_count, *dst);
432
61.2k
        }
433
434
61.2k
        *n = read_count;
435
61.2k
        return Status::OK();
436
61.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
5.18k
                          MutableColumnPtr& dst) override {
411
5.18k
        DCHECK(_parsed);
412
5.18k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
5.18k
        auto total = *n;
418
5.18k
        auto read_count = 0;
419
5.18k
        _buffer.resize(total);
420
1.17M
        for (size_t i = 0; i < total; ++i) {
421
1.17M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
1.17M
            if (UNLIKELY(ord >= _num_elements)) {
423
31
                break;
424
31
            }
425
426
1.17M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
1.17M
        }
428
429
5.18k
        if (LIKELY(read_count > 0)) {
430
5.18k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
5.18k
                                                   read_count, *dst);
432
5.18k
        }
433
434
5.18k
        *n = read_count;
435
5.18k
        return Status::OK();
436
5.18k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
11.1k
                          MutableColumnPtr& dst) override {
411
11.1k
        DCHECK(_parsed);
412
11.1k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
11.1k
        auto total = *n;
418
11.1k
        auto read_count = 0;
419
11.1k
        _buffer.resize(total);
420
4.44M
        for (size_t i = 0; i < total; ++i) {
421
4.43M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
4.43M
            if (UNLIKELY(ord >= _num_elements)) {
423
1.40k
                break;
424
1.40k
            }
425
426
4.43M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
4.43M
        }
428
429
11.1k
        if (LIKELY(read_count > 0)) {
430
11.1k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
11.1k
                                                   read_count, *dst);
432
11.1k
        }
433
434
11.1k
        *n = read_count;
435
11.1k
        return Status::OK();
436
11.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
93
                          MutableColumnPtr& dst) override {
411
93
        DCHECK(_parsed);
412
93
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
93
        auto total = *n;
418
93
        auto read_count = 0;
419
93
        _buffer.resize(total);
420
803
        for (size_t i = 0; i < total; ++i) {
421
710
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
710
            if (UNLIKELY(ord >= _num_elements)) {
423
0
                break;
424
0
            }
425
426
710
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
710
        }
428
429
93
        if (LIKELY(read_count > 0)) {
430
93
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
93
                                                   read_count, *dst);
432
93
        }
433
434
93
        *n = read_count;
435
93
        return Status::OK();
436
93
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
1.53k
                          MutableColumnPtr& dst) override {
411
1.53k
        DCHECK(_parsed);
412
1.53k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
1.53k
        auto total = *n;
418
1.53k
        auto read_count = 0;
419
1.53k
        _buffer.resize(total);
420
470k
        for (size_t i = 0; i < total; ++i) {
421
469k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
469k
            if (UNLIKELY(ord >= _num_elements)) {
423
12
                break;
424
12
            }
425
426
469k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
469k
        }
428
429
1.53k
        if (LIKELY(read_count > 0)) {
430
1.53k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
1.53k
                                                   read_count, *dst);
432
1.53k
        }
433
434
1.53k
        *n = read_count;
435
1.53k
        return Status::OK();
436
1.53k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
29.0k
                          MutableColumnPtr& dst) override {
411
29.0k
        DCHECK(_parsed);
412
29.0k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
29.0k
        auto total = *n;
418
29.0k
        auto read_count = 0;
419
29.0k
        _buffer.resize(total);
420
7.29M
        for (size_t i = 0; i < total; ++i) {
421
7.26M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
7.26M
            if (UNLIKELY(ord >= _num_elements)) {
423
597
                break;
424
597
            }
425
426
7.26M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
7.26M
        }
428
429
29.1k
        if (LIKELY(read_count > 0)) {
430
29.1k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
29.1k
                                                   read_count, *dst);
432
29.1k
        }
433
434
29.0k
        *n = read_count;
435
29.0k
        return Status::OK();
436
29.0k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
32.7k
                          MutableColumnPtr& dst) override {
411
32.7k
        DCHECK(_parsed);
412
32.7k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
32.7k
        auto total = *n;
418
32.7k
        auto read_count = 0;
419
32.7k
        _buffer.resize(total);
420
10.3M
        for (size_t i = 0; i < total; ++i) {
421
10.3M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
10.3M
            if (UNLIKELY(ord >= _num_elements)) {
423
165
                break;
424
165
            }
425
426
10.3M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
10.3M
        }
428
429
32.7k
        if (LIKELY(read_count > 0)) {
430
32.7k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
32.7k
                                                   read_count, *dst);
432
32.7k
        }
433
434
32.7k
        *n = read_count;
435
32.7k
        return Status::OK();
436
32.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
1.22k
                          MutableColumnPtr& dst) override {
411
1.22k
        DCHECK(_parsed);
412
1.22k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
1.22k
        auto total = *n;
418
1.22k
        auto read_count = 0;
419
1.22k
        _buffer.resize(total);
420
4.26k
        for (size_t i = 0; i < total; ++i) {
421
3.03k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
3.03k
            if (UNLIKELY(ord >= _num_elements)) {
423
1
                break;
424
1
            }
425
426
3.03k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
3.03k
        }
428
429
1.23k
        if (LIKELY(read_count > 0)) {
430
1.23k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
1.23k
                                                   read_count, *dst);
432
1.23k
        }
433
434
1.22k
        *n = read_count;
435
1.22k
        return Status::OK();
436
1.22k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
1.75k
                          MutableColumnPtr& dst) override {
411
1.75k
        DCHECK(_parsed);
412
1.75k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
1.75k
        auto total = *n;
418
1.75k
        auto read_count = 0;
419
1.75k
        _buffer.resize(total);
420
475k
        for (size_t i = 0; i < total; ++i) {
421
473k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
473k
            if (UNLIKELY(ord >= _num_elements)) {
423
245
                break;
424
245
            }
425
426
473k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
473k
        }
428
429
1.75k
        if (LIKELY(read_count > 0)) {
430
1.75k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
1.75k
                                                   read_count, *dst);
432
1.75k
        }
433
434
1.75k
        *n = read_count;
435
1.75k
        return Status::OK();
436
1.75k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
12.5k
                          MutableColumnPtr& dst) override {
411
12.5k
        DCHECK(_parsed);
412
12.5k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
12.5k
        auto total = *n;
418
12.5k
        auto read_count = 0;
419
12.5k
        _buffer.resize(total);
420
26.8k
        for (size_t i = 0; i < total; ++i) {
421
14.2k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
14.2k
            if (UNLIKELY(ord >= _num_elements)) {
423
1
                break;
424
1
            }
425
426
14.2k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
14.2k
        }
428
429
12.6k
        if (LIKELY(read_count > 0)) {
430
12.6k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
12.6k
                                                   read_count, *dst);
432
12.6k
        }
433
434
12.5k
        *n = read_count;
435
12.5k
        return Status::OK();
436
12.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
168
                          MutableColumnPtr& dst) override {
411
168
        DCHECK(_parsed);
412
168
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
168
        auto total = *n;
418
168
        auto read_count = 0;
419
168
        _buffer.resize(total);
420
481
        for (size_t i = 0; i < total; ++i) {
421
315
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
315
            if (UNLIKELY(ord >= _num_elements)) {
423
2
                break;
424
2
            }
425
426
313
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
313
        }
428
429
170
        if (LIKELY(read_count > 0)) {
430
170
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
170
                                                   read_count, *dst);
432
170
        }
433
434
168
        *n = read_count;
435
168
        return Status::OK();
436
168
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
4.58k
                          MutableColumnPtr& dst) override {
411
4.58k
        DCHECK(_parsed);
412
4.58k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
4.58k
        auto total = *n;
418
4.58k
        auto read_count = 0;
419
4.58k
        _buffer.resize(total);
420
19.4k
        for (size_t i = 0; i < total; ++i) {
421
14.8k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
14.8k
            if (UNLIKELY(ord >= _num_elements)) {
423
0
                break;
424
0
            }
425
426
14.8k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
14.8k
        }
428
429
4.58k
        if (LIKELY(read_count > 0)) {
430
4.58k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
4.58k
                                                   read_count, *dst);
432
4.58k
        }
433
434
4.58k
        *n = read_count;
435
4.58k
        return Status::OK();
436
4.58k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
27.3k
                          MutableColumnPtr& dst) override {
411
27.3k
        DCHECK(_parsed);
412
27.3k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
27.3k
        auto total = *n;
418
27.3k
        auto read_count = 0;
419
27.3k
        _buffer.resize(total);
420
21.5M
        for (size_t i = 0; i < total; ++i) {
421
21.5M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
21.5M
            if (UNLIKELY(ord >= _num_elements)) {
423
5.53k
                break;
424
5.53k
            }
425
426
21.5M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
21.5M
        }
428
429
27.4k
        if (LIKELY(read_count > 0)) {
430
27.4k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
27.4k
                                                   read_count, *dst);
432
27.4k
        }
433
434
27.3k
        *n = read_count;
435
27.3k
        return Status::OK();
436
27.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
13.3k
                          MutableColumnPtr& dst) override {
411
13.3k
        DCHECK(_parsed);
412
13.3k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
13.3k
        auto total = *n;
418
13.3k
        auto read_count = 0;
419
13.3k
        _buffer.resize(total);
420
8.93M
        for (size_t i = 0; i < total; ++i) {
421
8.91M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
8.91M
            if (UNLIKELY(ord >= _num_elements)) {
423
709
                break;
424
709
            }
425
426
8.91M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
8.91M
        }
428
429
13.3k
        if (LIKELY(read_count > 0)) {
430
13.3k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
13.3k
                                                   read_count, *dst);
432
13.3k
        }
433
434
13.3k
        *n = read_count;
435
13.3k
        return Status::OK();
436
13.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
1.00k
                          MutableColumnPtr& dst) override {
411
1.00k
        DCHECK(_parsed);
412
1.00k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
1.00k
        auto total = *n;
418
1.00k
        auto read_count = 0;
419
1.00k
        _buffer.resize(total);
420
2.98k
        for (size_t i = 0; i < total; ++i) {
421
1.99k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
1.99k
            if (UNLIKELY(ord >= _num_elements)) {
423
6
                break;
424
6
            }
425
426
1.98k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
1.98k
        }
428
429
1.00k
        if (LIKELY(read_count > 0)) {
430
1.00k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
1.00k
                                                   read_count, *dst);
432
1.00k
        }
433
434
1.00k
        *n = read_count;
435
1.00k
        return Status::OK();
436
1.00k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
296
                          MutableColumnPtr& dst) override {
411
296
        DCHECK(_parsed);
412
296
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
296
        auto total = *n;
418
296
        auto read_count = 0;
419
296
        _buffer.resize(total);
420
988
        for (size_t i = 0; i < total; ++i) {
421
692
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
692
            if (UNLIKELY(ord >= _num_elements)) {
423
0
                break;
424
0
            }
425
426
692
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
692
        }
428
429
297
        if (LIKELY(read_count > 0)) {
430
297
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
297
                                                   read_count, *dst);
432
297
        }
433
434
296
        *n = read_count;
435
296
        return Status::OK();
436
296
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
340
                          MutableColumnPtr& dst) override {
411
340
        DCHECK(_parsed);
412
340
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
340
        auto total = *n;
418
340
        auto read_count = 0;
419
340
        _buffer.resize(total);
420
1.34k
        for (size_t i = 0; i < total; ++i) {
421
1.01k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
1.01k
            if (UNLIKELY(ord >= _num_elements)) {
423
3
                break;
424
3
            }
425
426
1.00k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
1.00k
        }
428
429
340
        if (LIKELY(read_count > 0)) {
430
340
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
340
                                                   read_count, *dst);
432
340
        }
433
434
340
        *n = read_count;
435
340
        return Status::OK();
436
340
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
529
                          MutableColumnPtr& dst) override {
411
529
        DCHECK(_parsed);
412
529
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
529
        auto total = *n;
418
529
        auto read_count = 0;
419
529
        _buffer.resize(total);
420
1.30k
        for (size_t i = 0; i < total; ++i) {
421
779
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
779
            if (UNLIKELY(ord >= _num_elements)) {
423
3
                break;
424
3
            }
425
426
776
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
776
        }
428
429
529
        if (LIKELY(read_count > 0)) {
430
529
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
529
                                                   read_count, *dst);
432
529
        }
433
434
529
        *n = read_count;
435
529
        return Status::OK();
436
529
    }
437
438
54.0k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
439
54.0k
        return next_batch<false>(n, dst);
440
54.0k
    }
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_9FieldTypeE5EE15peek_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
438
54.0k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
439
54.0k
        return next_batch<false>(n, dst);
440
54.0k
    }
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_9FieldTypeE41EE15peek_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
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
441
442
4
    size_t count() const override { return _num_elements; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE5countEv
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
442
4
    size_t count() const override { return _num_elements; }
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_9FieldTypeE41EE5countEv
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
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE5countEv
443
444
2.92M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
444
228k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
444
227k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
444
1.01M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
444
86.8k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
444
111k
    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
444
233k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
444
206k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
Line
Count
Source
444
184
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Line
Count
Source
444
217k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
444
235k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
444
31.3k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE13current_indexEv
Line
Count
Source
444
316
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
444
205k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Line
Count
Source
444
1.15k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE13current_indexEv
Line
Count
Source
444
61
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE13current_indexEv
Line
Count
Source
444
3.62k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
444
1.20k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
444
116k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE13current_indexEv
Line
Count
Source
444
367
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE13current_indexEv
Line
Count
Source
444
89
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
Line
Count
Source
444
97
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE13current_indexEv
Line
Count
Source
444
692
    size_t current_index() const override { return _cur_index; }
445
446
130M
    char* get_data(size_t index) const {
447
130M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
130M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
446
2.21M
    char* get_data(size_t index) const {
447
2.21M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
2.21M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
446
644k
    char* get_data(size_t index) const {
447
644k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
644k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
446
40.2M
    char* get_data(size_t index) const {
447
40.2M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
40.2M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
446
29.3M
    char* get_data(size_t index) const {
447
29.3M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
29.3M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
446
1.49M
    char* get_data(size_t index) const {
447
1.49M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
1.49M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
446
844k
    char* get_data(size_t index) const {
447
844k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
844k
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
446
1.17M
    char* get_data(size_t index) const {
447
1.17M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
1.17M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
446
4.47M
    char* get_data(size_t index) const {
447
4.47M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
4.47M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
Line
Count
Source
446
803
    char* get_data(size_t index) const {
447
803
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
803
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
446
473k
    char* get_data(size_t index) const {
447
473k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
473k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
446
7.63M
    char* get_data(size_t index) const {
447
7.63M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
7.63M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
446
10.4M
    char* get_data(size_t index) const {
447
10.4M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
10.4M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE8get_dataEm
Line
Count
Source
446
5.17k
    char* get_data(size_t index) const {
447
5.17k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
5.17k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
446
474k
    char* get_data(size_t index) const {
447
474k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
474k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
446
22.5k
    char* get_data(size_t index) const {
447
22.5k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
22.5k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
446
1.63k
    char* get_data(size_t index) const {
447
1.63k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
1.63k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
446
22.7k
    char* get_data(size_t index) const {
447
22.7k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
22.7k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
446
21.5M
    char* get_data(size_t index) const {
447
21.5M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
21.5M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
446
8.93M
    char* get_data(size_t index) const {
447
8.93M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
8.93M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
446
5.14k
    char* get_data(size_t index) const {
447
5.14k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
5.14k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Line
Count
Source
446
1.32k
    char* get_data(size_t index) const {
447
1.32k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
1.32k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
Line
Count
Source
446
1.65k
    char* get_data(size_t index) const {
447
1.65k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
1.65k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE8get_dataEm
Line
Count
Source
446
95.2k
    char* get_data(size_t index) const {
447
95.2k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
95.2k
    }
449
450
private:
451
    void _copy_next_values(size_t n, void* data) {
452
        memcpy(data, get_data(_cur_index), n * SIZE_OF_TYPE);
453
    }
454
455
    using CppType = typename TypeTraits<Type>::CppType;
456
457
    static constexpr size_t SIZE_OF_TYPE = TypeTraits<Type>::size;
458
459
    Slice _data;
460
    PageDecoderOptions _options;
461
    bool _parsed;
462
    size_t _num_elements;
463
    size_t _num_element_after_padding;
464
465
    int _size_of_element;
466
    size_t _cur_index;
467
468
    std::vector<std::conditional_t<std::is_same_v<CppType, bool>, uint8_t, CppType>> _buffer;
469
470
    friend class BinaryDictPageDecoder;
471
};
472
473
} // namespace segment_v2
474
} // namespace doris