Coverage Report

Created: 2026-11-02 12:11

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
749k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
96
53.1k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
96
8.10k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
96
359k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
96
108k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
96
11.3k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
96
63.3k
    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.54k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
96
6.40k
    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
347
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
96
37.6k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
96
44.4k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE4initEv
Line
Count
Source
96
340
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
96
437
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
96
7.72k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
96
341
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
96
9.78k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
96
12.1k
    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.22k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
96
673
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
96
670
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE42EE4initEv
Line
Count
Source
96
587
    Status init() override { return reset(); }
97
98
154M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
98
57.7k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
98
10.7k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
98
153M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
98
394k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
98
11.6k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
98
63.6k
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12is_page_fullEv
Line
Count
Source
98
5.56k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
98
8.95k
    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
453
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
98
46.4k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
98
44.2k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE12is_page_fullEv
Line
Count
Source
98
340
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
98
567
    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
316
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
98
5.27k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
98
30.0k
    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.48k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Line
Count
Source
98
632
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
98
655
    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.47M
    Status add(const uint8_t* vals, size_t* count) override {
101
1.47M
        return add_internal<false>(vals, count);
102
1.47M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
100
57.7k
    Status add(const uint8_t* vals, size_t* count) override {
101
57.7k
        return add_internal<false>(vals, count);
102
57.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
100
10.7k
    Status add(const uint8_t* vals, size_t* count) override {
101
10.7k
        return add_internal<false>(vals, count);
102
10.7k
    }
_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
393k
    Status add(const uint8_t* vals, size_t* count) override {
101
393k
        return add_internal<false>(vals, count);
102
393k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
100
11.6k
    Status add(const uint8_t* vals, size_t* count) override {
101
11.6k
        return add_internal<false>(vals, count);
102
11.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
100
63.6k
    Status add(const uint8_t* vals, size_t* count) override {
101
63.6k
        return add_internal<false>(vals, count);
102
63.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
100
5.56k
    Status add(const uint8_t* vals, size_t* count) override {
101
5.56k
        return add_internal<false>(vals, count);
102
5.56k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
100
8.96k
    Status add(const uint8_t* vals, size_t* count) override {
101
8.96k
        return add_internal<false>(vals, count);
102
8.96k
    }
_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
455
    Status add(const uint8_t* vals, size_t* count) override {
101
455
        return add_internal<false>(vals, count);
102
455
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
100
46.4k
    Status add(const uint8_t* vals, size_t* count) override {
101
46.4k
        return add_internal<false>(vals, count);
102
46.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
100
44.2k
    Status add(const uint8_t* vals, size_t* count) override {
101
44.2k
        return add_internal<false>(vals, count);
102
44.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE3addEPKhPm
Line
Count
Source
100
340
    Status add(const uint8_t* vals, size_t* count) override {
101
340
        return add_internal<false>(vals, count);
102
340
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
100
567
    Status add(const uint8_t* vals, size_t* count) override {
101
567
        return add_internal<false>(vals, count);
102
567
    }
_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
317
    Status add(const uint8_t* vals, size_t* count) override {
101
317
        return add_internal<false>(vals, count);
102
317
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
100
5.27k
    Status add(const uint8_t* vals, size_t* count) override {
101
5.27k
        return add_internal<false>(vals, count);
102
5.27k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
100
30.0k
    Status add(const uint8_t* vals, size_t* count) override {
101
30.0k
        return add_internal<false>(vals, count);
102
30.0k
    }
_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.48k
    Status add(const uint8_t* vals, size_t* count) override {
101
1.48k
        return add_internal<false>(vals, count);
102
1.48k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Line
Count
Source
100
632
    Status add(const uint8_t* vals, size_t* count) override {
101
632
        return add_internal<false>(vals, count);
102
632
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
100
655
    Status add(const uint8_t* vals, size_t* count) override {
101
655
        return add_internal<false>(vals, count);
102
655
    }
_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
153M
    Status single_add(const uint8_t* vals, size_t* count) {
105
153M
        return add_internal<true>(vals, count);
106
153M
    }
107
108
    template <bool single>
109
152M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
152M
        DCHECK(!_finished);
111
152M
        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
152M
        uint32_t to_add = cast_set<UInt32>(
127
152M
                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
152M
        int to_add_size = to_add * SIZE_OF_TYPE;
130
152M
        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
152M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
155M
        _count += to_add;
135
155M
        _remain_element_capacity -= to_add;
136
155M
        _raw_data_size += to_add_size;
137
        // return added number through count
138
155M
        *num_written = to_add;
139
155M
        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
153M
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
153M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
153M
                        *reinterpret_cast<const uint32_t*>(vals);
150
153M
                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
153M
        }
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
155M
        return Status::OK();
160
152M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
57.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
57.7k
        DCHECK(!_finished);
111
57.7k
        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
57.7k
        uint32_t to_add = cast_set<UInt32>(
127
57.7k
                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
57.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
57.7k
        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
57.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
57.7k
        _count += to_add;
135
57.7k
        _remain_element_capacity -= to_add;
136
57.7k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
57.7k
        *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
57.7k
        memcpy(&_data[orig_size], vals, to_add_size);
159
57.7k
        return Status::OK();
160
57.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
10.7k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
10.7k
        DCHECK(!_finished);
111
10.7k
        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
10.7k
        uint32_t to_add = cast_set<UInt32>(
127
10.7k
                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
10.7k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
10.7k
        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
10.7k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
10.7k
        _count += to_add;
135
10.7k
        _remain_element_capacity -= to_add;
136
10.7k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
10.7k
        *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
10.7k
        memcpy(&_data[orig_size], vals, to_add_size);
159
10.7k
        return Status::OK();
160
10.7k
    }
_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
394k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
394k
        DCHECK(!_finished);
111
394k
        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
394k
        uint32_t to_add = cast_set<UInt32>(
127
394k
                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
394k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
394k
        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
394k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
394k
        _count += to_add;
135
394k
        _remain_element_capacity -= to_add;
136
394k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
394k
        *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
394k
        memcpy(&_data[orig_size], vals, to_add_size);
159
394k
        return Status::OK();
160
394k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
11.6k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
11.6k
        DCHECK(!_finished);
111
11.6k
        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.6k
        uint32_t to_add = cast_set<UInt32>(
127
11.6k
                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.6k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
11.6k
        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.6k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
11.6k
        _count += to_add;
135
11.6k
        _remain_element_capacity -= to_add;
136
11.6k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
11.6k
        *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.6k
        memcpy(&_data[orig_size], vals, to_add_size);
159
11.6k
        return Status::OK();
160
11.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
63.6k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
63.6k
        DCHECK(!_finished);
111
63.6k
        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.6k
        uint32_t to_add = cast_set<UInt32>(
127
63.6k
                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.6k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
63.6k
        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.6k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
63.6k
        _count += to_add;
135
63.6k
        _remain_element_capacity -= to_add;
136
63.6k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
63.6k
        *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.6k
        memcpy(&_data[orig_size], vals, to_add_size);
159
63.6k
        return Status::OK();
160
63.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
5.56k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
5.56k
        DCHECK(!_finished);
111
5.56k
        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.56k
        uint32_t to_add = cast_set<UInt32>(
127
5.56k
                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.56k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
5.56k
        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.56k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
5.56k
        _count += to_add;
135
5.56k
        _remain_element_capacity -= to_add;
136
5.56k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
5.56k
        *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.56k
        memcpy(&_data[orig_size], vals, to_add_size);
159
5.56k
        return Status::OK();
160
5.56k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
8.96k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
8.96k
        DCHECK(!_finished);
111
8.96k
        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
8.96k
        uint32_t to_add = cast_set<UInt32>(
127
8.96k
                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
8.96k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
8.96k
        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
8.96k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
8.96k
        _count += to_add;
135
8.96k
        _remain_element_capacity -= to_add;
136
8.96k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
8.96k
        *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
8.96k
        memcpy(&_data[orig_size], vals, to_add_size);
159
8.96k
        return Status::OK();
160
8.96k
    }
_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
455
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
455
        DCHECK(!_finished);
111
455
        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
455
        uint32_t to_add = cast_set<UInt32>(
127
455
                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
455
        int to_add_size = to_add * SIZE_OF_TYPE;
130
455
        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
455
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
455
        _count += to_add;
135
455
        _remain_element_capacity -= to_add;
136
455
        _raw_data_size += to_add_size;
137
        // return added number through count
138
455
        *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
455
        memcpy(&_data[orig_size], vals, to_add_size);
159
455
        return Status::OK();
160
455
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
46.4k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
46.4k
        DCHECK(!_finished);
111
46.4k
        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
46.4k
        uint32_t to_add = cast_set<UInt32>(
127
46.4k
                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
46.4k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
46.4k
        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
46.4k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
46.4k
        _count += to_add;
135
46.4k
        _remain_element_capacity -= to_add;
136
46.4k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
46.4k
        *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
46.4k
        memcpy(&_data[orig_size], vals, to_add_size);
159
46.4k
        return Status::OK();
160
46.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
44.2k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
44.2k
        DCHECK(!_finished);
111
44.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
44.2k
        uint32_t to_add = cast_set<UInt32>(
127
44.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
44.2k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
44.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
44.2k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
44.2k
        _count += to_add;
135
44.2k
        _remain_element_capacity -= to_add;
136
44.2k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
44.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
44.2k
        memcpy(&_data[orig_size], vals, to_add_size);
159
44.2k
        return Status::OK();
160
44.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
340
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
340
        DCHECK(!_finished);
111
340
        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
340
        uint32_t to_add = cast_set<UInt32>(
127
340
                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
340
        int to_add_size = to_add * SIZE_OF_TYPE;
130
340
        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
340
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
340
        _count += to_add;
135
340
        _remain_element_capacity -= to_add;
136
340
        _raw_data_size += to_add_size;
137
        // return added number through count
138
340
        *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
340
        memcpy(&_data[orig_size], vals, to_add_size);
159
340
        return Status::OK();
160
340
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
566
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
566
        DCHECK(!_finished);
111
566
        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
566
        uint32_t to_add = cast_set<UInt32>(
127
566
                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
566
        int to_add_size = to_add * SIZE_OF_TYPE;
130
566
        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
566
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
567
        _count += to_add;
135
567
        _remain_element_capacity -= to_add;
136
567
        _raw_data_size += to_add_size;
137
        // return added number through count
138
567
        *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
567
        memcpy(&_data[orig_size], vals, to_add_size);
159
567
        return Status::OK();
160
566
    }
_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
317
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
317
        DCHECK(!_finished);
111
317
        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
317
        uint32_t to_add = cast_set<UInt32>(
127
317
                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
317
        int to_add_size = to_add * SIZE_OF_TYPE;
130
317
        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
317
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
317
        _count += to_add;
135
317
        _remain_element_capacity -= to_add;
136
317
        _raw_data_size += to_add_size;
137
        // return added number through count
138
317
        *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
317
        memcpy(&_data[orig_size], vals, to_add_size);
159
317
        return Status::OK();
160
317
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
5.27k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
5.27k
        DCHECK(!_finished);
111
5.27k
        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.27k
        uint32_t to_add = cast_set<UInt32>(
127
5.27k
                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.27k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
5.27k
        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.27k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
5.27k
        _count += to_add;
135
5.27k
        _remain_element_capacity -= to_add;
136
5.27k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
5.27k
        *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.27k
        memcpy(&_data[orig_size], vals, to_add_size);
159
5.27k
        return Status::OK();
160
5.27k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
30.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
30.0k
        DCHECK(!_finished);
111
30.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
30.0k
        uint32_t to_add = cast_set<UInt32>(
127
30.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
30.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
30.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
30.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
30.0k
        _count += to_add;
135
30.0k
        _remain_element_capacity -= to_add;
136
30.0k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
30.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
30.0k
        memcpy(&_data[orig_size], vals, to_add_size);
159
30.0k
        return Status::OK();
160
30.0k
    }
_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.48k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
1.48k
        DCHECK(!_finished);
111
1.48k
        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.48k
        uint32_t to_add = cast_set<UInt32>(
127
1.48k
                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.48k
        int to_add_size = to_add * SIZE_OF_TYPE;
130
1.48k
        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.48k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
1.48k
        _count += to_add;
135
1.48k
        _remain_element_capacity -= to_add;
136
1.48k
        _raw_data_size += to_add_size;
137
        // return added number through count
138
1.48k
        *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.48k
        memcpy(&_data[orig_size], vals, to_add_size);
159
1.48k
        return Status::OK();
160
1.48k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
632
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
632
        DCHECK(!_finished);
111
632
        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
632
        uint32_t to_add = cast_set<UInt32>(
127
632
                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
632
        int to_add_size = to_add * SIZE_OF_TYPE;
130
632
        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
632
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
632
        _count += to_add;
135
632
        _remain_element_capacity -= to_add;
136
632
        _raw_data_size += to_add_size;
137
        // return added number through count
138
632
        *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
632
        memcpy(&_data[orig_size], vals, to_add_size);
159
632
        return Status::OK();
160
632
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
109
655
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
110
655
        DCHECK(!_finished);
111
655
        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
655
        uint32_t to_add = cast_set<UInt32>(
127
655
                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
655
        int to_add_size = to_add * SIZE_OF_TYPE;
130
655
        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
655
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
134
655
        _count += to_add;
135
655
        _remain_element_capacity -= to_add;
136
655
        _raw_data_size += to_add_size;
137
        // return added number through count
138
655
        *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
655
        memcpy(&_data[orig_size], vals, to_add_size);
159
655
        return Status::OK();
160
655
    }
_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
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
153M
        _count += to_add;
135
153M
        _remain_element_capacity -= to_add;
136
153M
        _raw_data_size += to_add_size;
137
        // return added number through count
138
153M
        *num_written = to_add;
139
153M
        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
153M
            } else if constexpr (SIZE_OF_TYPE == 4) {
148
153M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
149
153M
                        *reinterpret_cast<const uint32_t*>(vals);
150
153M
                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
153M
        }
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
153M
        return Status::OK();
160
150M
    }
161
162
753k
    Status finish(OwnedSlice* slice) override {
163
753k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
753k
        return Status::OK();
165
753k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
51.9k
    Status finish(OwnedSlice* slice) override {
163
51.9k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
51.9k
        return Status::OK();
165
51.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
7.62k
    Status finish(OwnedSlice* slice) override {
163
7.62k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
7.62k
        return Status::OK();
165
7.62k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
353k
    Status finish(OwnedSlice* slice) override {
163
353k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
353k
        return Status::OK();
165
353k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
111k
    Status finish(OwnedSlice* slice) override {
163
111k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
111k
        return Status::OK();
165
111k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
11.6k
    Status finish(OwnedSlice* slice) override {
163
11.6k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
11.6k
        return Status::OK();
165
11.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
63.3k
    Status finish(OwnedSlice* slice) override {
163
63.3k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
63.3k
        return Status::OK();
165
63.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
5.13k
    Status finish(OwnedSlice* slice) override {
163
5.13k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
5.13k
        return Status::OK();
165
5.13k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
7.71k
    Status finish(OwnedSlice* slice) override {
163
7.71k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
7.71k
        return Status::OK();
165
7.71k
    }
_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
378
    Status finish(OwnedSlice* slice) override {
163
378
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
378
        return Status::OK();
165
378
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
38.5k
    Status finish(OwnedSlice* slice) override {
163
38.5k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
38.5k
        return Status::OK();
165
38.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
43.4k
    Status finish(OwnedSlice* slice) override {
163
43.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
43.4k
        return Status::OK();
165
43.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
282
    Status finish(OwnedSlice* slice) override {
163
282
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
282
        return Status::OK();
165
282
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
603
    Status finish(OwnedSlice* slice) override {
163
603
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
604
        return Status::OK();
165
603
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
7.76k
    Status finish(OwnedSlice* slice) override {
163
7.76k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
7.76k
        return Status::OK();
165
7.76k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
266
    Status finish(OwnedSlice* slice) override {
163
266
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
266
        return Status::OK();
165
266
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
9.77k
    Status finish(OwnedSlice* slice) override {
163
9.77k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
9.77k
        return Status::OK();
165
9.77k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
19.7k
    Status finish(OwnedSlice* slice) override {
163
19.7k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
19.7k
        return Status::OK();
165
19.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.15k
    Status finish(OwnedSlice* slice) override {
163
1.15k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
1.15k
        return Status::OK();
165
1.15k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
586
    Status finish(OwnedSlice* slice) override {
163
586
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
586
        return Status::OK();
165
586
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
162
593
    Status finish(OwnedSlice* slice) override {
163
593
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
164
593
        return Status::OK();
165
593
    }
_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.79M
    Status reset() override {
168
1.79M
        RETURN_IF_CATCH_EXCEPTION({
169
1.79M
            size_t block_size = _options.data_page_size;
170
1.79M
            _count = 0;
171
1.79M
            _raw_data_size = 0;
172
1.79M
            _data.clear();
173
1.79M
            _data.reserve(block_size);
174
1.79M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
1.79M
                    << "buffer must be naturally-aligned";
176
1.79M
            _buffer.clear();
177
1.79M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
1.79M
            _finished = false;
179
1.79M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
1.79M
        });
181
1.79M
        return Status::OK();
182
1.79M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
167
105k
    Status reset() override {
168
105k
        RETURN_IF_CATCH_EXCEPTION({
169
105k
            size_t block_size = _options.data_page_size;
170
105k
            _count = 0;
171
105k
            _raw_data_size = 0;
172
105k
            _data.clear();
173
105k
            _data.reserve(block_size);
174
105k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
105k
                    << "buffer must be naturally-aligned";
176
105k
            _buffer.clear();
177
105k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
105k
            _finished = false;
179
105k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
105k
        });
181
105k
        return Status::OK();
182
105k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
167
15.7k
    Status reset() override {
168
15.7k
        RETURN_IF_CATCH_EXCEPTION({
169
15.7k
            size_t block_size = _options.data_page_size;
170
15.7k
            _count = 0;
171
15.7k
            _raw_data_size = 0;
172
15.7k
            _data.clear();
173
15.7k
            _data.reserve(block_size);
174
15.7k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
15.7k
                    << "buffer must be naturally-aligned";
176
15.7k
            _buffer.clear();
177
15.7k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
15.7k
            _finished = false;
179
15.7k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
15.7k
        });
181
15.7k
        return Status::OK();
182
15.7k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
167
1.00M
    Status reset() override {
168
1.00M
        RETURN_IF_CATCH_EXCEPTION({
169
1.00M
            size_t block_size = _options.data_page_size;
170
1.00M
            _count = 0;
171
1.00M
            _raw_data_size = 0;
172
1.00M
            _data.clear();
173
1.00M
            _data.reserve(block_size);
174
1.00M
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
1.00M
                    << "buffer must be naturally-aligned";
176
1.00M
            _buffer.clear();
177
1.00M
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
1.00M
            _finished = false;
179
1.00M
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
1.00M
        });
181
1.00M
        return Status::OK();
182
1.00M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
167
219k
    Status reset() override {
168
219k
        RETURN_IF_CATCH_EXCEPTION({
169
219k
            size_t block_size = _options.data_page_size;
170
219k
            _count = 0;
171
219k
            _raw_data_size = 0;
172
219k
            _data.clear();
173
219k
            _data.reserve(block_size);
174
219k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
219k
                    << "buffer must be naturally-aligned";
176
219k
            _buffer.clear();
177
219k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
219k
            _finished = false;
179
219k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
219k
        });
181
220k
        return Status::OK();
182
219k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
167
22.9k
    Status reset() override {
168
22.9k
        RETURN_IF_CATCH_EXCEPTION({
169
22.9k
            size_t block_size = _options.data_page_size;
170
22.9k
            _count = 0;
171
22.9k
            _raw_data_size = 0;
172
22.9k
            _data.clear();
173
22.9k
            _data.reserve(block_size);
174
22.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
22.9k
                    << "buffer must be naturally-aligned";
176
22.9k
            _buffer.clear();
177
22.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
22.9k
            _finished = false;
179
22.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
22.9k
        });
181
23.0k
        return Status::OK();
182
22.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
167
126k
    Status reset() override {
168
126k
        RETURN_IF_CATCH_EXCEPTION({
169
126k
            size_t block_size = _options.data_page_size;
170
126k
            _count = 0;
171
126k
            _raw_data_size = 0;
172
126k
            _data.clear();
173
126k
            _data.reserve(block_size);
174
126k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
126k
                    << "buffer must be naturally-aligned";
176
126k
            _buffer.clear();
177
126k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
126k
            _finished = false;
179
126k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
126k
        });
181
126k
        return Status::OK();
182
126k
    }
_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
10.6k
    Status reset() override {
168
10.6k
        RETURN_IF_CATCH_EXCEPTION({
169
10.6k
            size_t block_size = _options.data_page_size;
170
10.6k
            _count = 0;
171
10.6k
            _raw_data_size = 0;
172
10.6k
            _data.clear();
173
10.6k
            _data.reserve(block_size);
174
10.6k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
10.6k
                    << "buffer must be naturally-aligned";
176
10.6k
            _buffer.clear();
177
10.6k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
10.6k
            _finished = false;
179
10.6k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
10.6k
        });
181
10.6k
        return Status::OK();
182
10.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
167
14.1k
    Status reset() override {
168
14.1k
        RETURN_IF_CATCH_EXCEPTION({
169
14.1k
            size_t block_size = _options.data_page_size;
170
14.1k
            _count = 0;
171
14.1k
            _raw_data_size = 0;
172
14.1k
            _data.clear();
173
14.1k
            _data.reserve(block_size);
174
14.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
14.1k
                    << "buffer must be naturally-aligned";
176
14.1k
            _buffer.clear();
177
14.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
14.1k
            _finished = false;
179
14.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
14.1k
        });
181
14.1k
        return Status::OK();
182
14.1k
    }
_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
723
    Status reset() override {
168
723
        RETURN_IF_CATCH_EXCEPTION({
169
723
            size_t block_size = _options.data_page_size;
170
723
            _count = 0;
171
723
            _raw_data_size = 0;
172
723
            _data.clear();
173
723
            _data.reserve(block_size);
174
723
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
723
                    << "buffer must be naturally-aligned";
176
723
            _buffer.clear();
177
723
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
723
            _finished = false;
179
723
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
723
        });
181
723
        return Status::OK();
182
723
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
167
76.1k
    Status reset() override {
168
76.1k
        RETURN_IF_CATCH_EXCEPTION({
169
76.1k
            size_t block_size = _options.data_page_size;
170
76.1k
            _count = 0;
171
76.1k
            _raw_data_size = 0;
172
76.1k
            _data.clear();
173
76.1k
            _data.reserve(block_size);
174
76.1k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
76.1k
                    << "buffer must be naturally-aligned";
176
76.1k
            _buffer.clear();
177
76.1k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
76.1k
            _finished = false;
179
76.1k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
76.1k
        });
181
76.2k
        return Status::OK();
182
76.1k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
167
87.8k
    Status reset() override {
168
87.8k
        RETURN_IF_CATCH_EXCEPTION({
169
87.8k
            size_t block_size = _options.data_page_size;
170
87.8k
            _count = 0;
171
87.8k
            _raw_data_size = 0;
172
87.8k
            _data.clear();
173
87.8k
            _data.reserve(block_size);
174
87.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
87.8k
                    << "buffer must be naturally-aligned";
176
87.8k
            _buffer.clear();
177
87.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
87.8k
            _finished = false;
179
87.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
87.8k
        });
181
87.9k
        return Status::OK();
182
87.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE5resetEv
Line
Count
Source
167
621
    Status reset() override {
168
621
        RETURN_IF_CATCH_EXCEPTION({
169
621
            size_t block_size = _options.data_page_size;
170
621
            _count = 0;
171
621
            _raw_data_size = 0;
172
621
            _data.clear();
173
621
            _data.reserve(block_size);
174
621
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
621
                    << "buffer must be naturally-aligned";
176
621
            _buffer.clear();
177
621
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
621
            _finished = false;
179
621
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
621
        });
181
624
        return Status::OK();
182
621
    }
_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.4k
    Status reset() override {
168
15.4k
        RETURN_IF_CATCH_EXCEPTION({
169
15.4k
            size_t block_size = _options.data_page_size;
170
15.4k
            _count = 0;
171
15.4k
            _raw_data_size = 0;
172
15.4k
            _data.clear();
173
15.4k
            _data.reserve(block_size);
174
15.4k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
15.4k
                    << "buffer must be naturally-aligned";
176
15.4k
            _buffer.clear();
177
15.4k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
15.4k
            _finished = false;
179
15.4k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
15.4k
        });
181
15.5k
        return Status::OK();
182
15.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
167
605
    Status reset() override {
168
605
        RETURN_IF_CATCH_EXCEPTION({
169
605
            size_t block_size = _options.data_page_size;
170
605
            _count = 0;
171
605
            _raw_data_size = 0;
172
605
            _data.clear();
173
605
            _data.reserve(block_size);
174
605
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
605
                    << "buffer must be naturally-aligned";
176
605
            _buffer.clear();
177
605
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
605
            _finished = false;
179
605
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
605
        });
181
606
        return Status::OK();
182
605
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
167
19.5k
    Status reset() override {
168
19.5k
        RETURN_IF_CATCH_EXCEPTION({
169
19.5k
            size_t block_size = _options.data_page_size;
170
19.5k
            _count = 0;
171
19.5k
            _raw_data_size = 0;
172
19.5k
            _data.clear();
173
19.5k
            _data.reserve(block_size);
174
19.5k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
19.5k
                    << "buffer must be naturally-aligned";
176
19.5k
            _buffer.clear();
177
19.5k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
19.5k
            _finished = false;
179
19.5k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
19.5k
        });
181
19.5k
        return Status::OK();
182
19.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
167
31.9k
    Status reset() override {
168
31.9k
        RETURN_IF_CATCH_EXCEPTION({
169
31.9k
            size_t block_size = _options.data_page_size;
170
31.9k
            _count = 0;
171
31.9k
            _raw_data_size = 0;
172
31.9k
            _data.clear();
173
31.9k
            _data.reserve(block_size);
174
31.9k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
31.9k
                    << "buffer must be naturally-aligned";
176
31.9k
            _buffer.clear();
177
31.9k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
31.9k
            _finished = false;
179
31.9k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
31.9k
        });
181
31.9k
        return Status::OK();
182
31.9k
    }
_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.37k
    Status reset() override {
168
2.37k
        RETURN_IF_CATCH_EXCEPTION({
169
2.37k
            size_t block_size = _options.data_page_size;
170
2.37k
            _count = 0;
171
2.37k
            _raw_data_size = 0;
172
2.37k
            _data.clear();
173
2.37k
            _data.reserve(block_size);
174
2.37k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
2.37k
                    << "buffer must be naturally-aligned";
176
2.37k
            _buffer.clear();
177
2.37k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
2.37k
            _finished = false;
179
2.37k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
2.37k
        });
181
2.38k
        return Status::OK();
182
2.37k
    }
_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.26k
        return Status::OK();
182
1.25k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
167
1.26k
    Status reset() override {
168
1.26k
        RETURN_IF_CATCH_EXCEPTION({
169
1.26k
            size_t block_size = _options.data_page_size;
170
1.26k
            _count = 0;
171
1.26k
            _raw_data_size = 0;
172
1.26k
            _data.clear();
173
1.26k
            _data.reserve(block_size);
174
1.26k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
175
1.26k
                    << "buffer must be naturally-aligned";
176
1.26k
            _buffer.clear();
177
1.26k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
178
1.26k
            _finished = false;
179
1.26k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
180
1.26k
        });
181
1.26k
        return Status::OK();
182
1.26k
    }
_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
41.0k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
186
4.15k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
186
1.05k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
186
21.5k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
186
3.86k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
186
1.63k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
186
985
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
186
569
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
186
499
    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.69k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
186
2.36k
    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
268
    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.20k
    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
468k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
188
51.9k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
188
7.62k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
188
68.7k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
188
111k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
188
11.6k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
188
63.3k
    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.12k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
188
7.08k
    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
367
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
188
38.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
188
43.4k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE17get_raw_data_sizeEv
Line
Count
Source
188
282
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
188
599
    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
261
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
188
9.77k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
188
19.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.15k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Line
Count
Source
188
586
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
188
593
    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
746k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
53.0k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
8.10k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
357k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
107k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
11.3k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
63.2k
            : _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.54k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
6.40k
            : _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
347
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
37.5k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
44.4k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
340
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
437
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
7.66k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
340
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
9.77k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
12.1k
            : _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.22k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
670
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
192
671
            : _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
753k
    OwnedSlice _finish(int final_size_of_type) {
195
753k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
753k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
753k
        int padding_elems = num_elems_after_padding - _count;
200
753k
        int padding_bytes = padding_elems * final_size_of_type;
201
21.5M
        for (int i = 0; i < padding_bytes; i++) {
202
20.8M
            _data.push_back(0);
203
20.8M
        }
204
205
        // reserve enough place for compression
206
753k
        _buffer.resize(
207
753k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
753k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
753k
        int64_t bytes =
211
753k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
753k
                                         num_elems_after_padding, final_size_of_type, 0);
213
753k
        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
753k
        encode_fixed32_le(&_buffer[0], _count);
223
753k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
753k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
753k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
753k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
753k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
753k
        return _buffer.build();
230
753k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
194
51.9k
    OwnedSlice _finish(int final_size_of_type) {
195
51.9k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
51.9k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
51.9k
        int padding_elems = num_elems_after_padding - _count;
200
51.9k
        int padding_bytes = padding_elems * final_size_of_type;
201
332k
        for (int i = 0; i < padding_bytes; i++) {
202
280k
            _data.push_back(0);
203
280k
        }
204
205
        // reserve enough place for compression
206
51.9k
        _buffer.resize(
207
51.9k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
51.9k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
51.9k
        int64_t bytes =
211
51.9k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
51.9k
                                         num_elems_after_padding, final_size_of_type, 0);
213
51.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
51.9k
        encode_fixed32_le(&_buffer[0], _count);
223
51.9k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
51.9k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
51.9k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
51.9k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
51.9k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
51.9k
        return _buffer.build();
230
51.9k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
194
7.62k
    OwnedSlice _finish(int final_size_of_type) {
195
7.62k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
7.62k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
7.62k
        int padding_elems = num_elems_after_padding - _count;
200
7.62k
        int padding_bytes = padding_elems * final_size_of_type;
201
77.6k
        for (int i = 0; i < padding_bytes; i++) {
202
69.9k
            _data.push_back(0);
203
69.9k
        }
204
205
        // reserve enough place for compression
206
7.62k
        _buffer.resize(
207
7.62k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
7.62k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
7.62k
        int64_t bytes =
211
7.62k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
7.62k
                                         num_elems_after_padding, final_size_of_type, 0);
213
7.62k
        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.62k
        encode_fixed32_le(&_buffer[0], _count);
223
7.62k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
7.62k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
7.62k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
7.62k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
7.62k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
7.62k
        return _buffer.build();
230
7.62k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
194
353k
    OwnedSlice _finish(int final_size_of_type) {
195
353k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
353k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
353k
        int padding_elems = num_elems_after_padding - _count;
200
353k
        int padding_bytes = padding_elems * final_size_of_type;
201
6.81M
        for (int i = 0; i < padding_bytes; i++) {
202
6.46M
            _data.push_back(0);
203
6.46M
        }
204
205
        // reserve enough place for compression
206
353k
        _buffer.resize(
207
353k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
353k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
353k
        int64_t bytes =
211
353k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
353k
                                         num_elems_after_padding, final_size_of_type, 0);
213
353k
        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
353k
        encode_fixed32_le(&_buffer[0], _count);
223
353k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
353k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
353k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
353k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
353k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
353k
        return _buffer.build();
230
353k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
194
111k
    OwnedSlice _finish(int final_size_of_type) {
195
111k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
111k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
111k
        int padding_elems = num_elems_after_padding - _count;
200
111k
        int padding_bytes = padding_elems * final_size_of_type;
201
5.02M
        for (int i = 0; i < padding_bytes; i++) {
202
4.91M
            _data.push_back(0);
203
4.91M
        }
204
205
        // reserve enough place for compression
206
111k
        _buffer.resize(
207
111k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
111k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
111k
        int64_t bytes =
211
111k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
111k
                                         num_elems_after_padding, final_size_of_type, 0);
213
111k
        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
111k
        encode_fixed32_le(&_buffer[0], _count);
223
111k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
111k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
111k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
111k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
111k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
111k
        return _buffer.build();
230
111k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
194
11.6k
    OwnedSlice _finish(int final_size_of_type) {
195
11.6k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
11.6k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
11.6k
        int padding_elems = num_elems_after_padding - _count;
200
11.6k
        int padding_bytes = padding_elems * final_size_of_type;
201
757k
        for (int i = 0; i < padding_bytes; i++) {
202
745k
            _data.push_back(0);
203
745k
        }
204
205
        // reserve enough place for compression
206
11.6k
        _buffer.resize(
207
11.6k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
11.6k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
11.6k
        int64_t bytes =
211
11.6k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
11.6k
                                         num_elems_after_padding, final_size_of_type, 0);
213
11.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
11.6k
        encode_fixed32_le(&_buffer[0], _count);
223
11.6k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
11.6k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
11.6k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
11.6k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
11.6k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
11.6k
        return _buffer.build();
230
11.6k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
194
63.3k
    OwnedSlice _finish(int final_size_of_type) {
195
63.3k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
63.3k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
63.3k
        int padding_elems = num_elems_after_padding - _count;
200
63.3k
        int padding_bytes = padding_elems * final_size_of_type;
201
3.03M
        for (int i = 0; i < padding_bytes; i++) {
202
2.96M
            _data.push_back(0);
203
2.96M
        }
204
205
        // reserve enough place for compression
206
63.3k
        _buffer.resize(
207
63.3k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
63.3k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
63.3k
        int64_t bytes =
211
63.3k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
63.3k
                                         num_elems_after_padding, final_size_of_type, 0);
213
63.3k
        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.3k
        encode_fixed32_le(&_buffer[0], _count);
223
63.3k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
63.3k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
63.3k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
63.3k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
63.3k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
63.3k
        return _buffer.build();
230
63.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
194
5.13k
    OwnedSlice _finish(int final_size_of_type) {
195
5.13k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
5.13k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
5.13k
        int padding_elems = num_elems_after_padding - _count;
200
5.13k
        int padding_bytes = padding_elems * final_size_of_type;
201
112k
        for (int i = 0; i < padding_bytes; i++) {
202
107k
            _data.push_back(0);
203
107k
        }
204
205
        // reserve enough place for compression
206
5.13k
        _buffer.resize(
207
5.13k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
5.13k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
5.13k
        int64_t bytes =
211
5.13k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
5.13k
                                         num_elems_after_padding, final_size_of_type, 0);
213
5.13k
        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.13k
        encode_fixed32_le(&_buffer[0], _count);
223
5.13k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
5.13k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
5.13k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
5.13k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
5.13k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
5.13k
        return _buffer.build();
230
5.13k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
194
7.71k
    OwnedSlice _finish(int final_size_of_type) {
195
7.71k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
7.71k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
7.71k
        int padding_elems = num_elems_after_padding - _count;
200
7.71k
        int padding_bytes = padding_elems * final_size_of_type;
201
266k
        for (int i = 0; i < padding_bytes; i++) {
202
258k
            _data.push_back(0);
203
258k
        }
204
205
        // reserve enough place for compression
206
7.71k
        _buffer.resize(
207
7.71k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
7.71k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
7.71k
        int64_t bytes =
211
7.71k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
7.71k
                                         num_elems_after_padding, final_size_of_type, 0);
213
7.71k
        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.71k
        encode_fixed32_le(&_buffer[0], _count);
223
7.71k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
7.71k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
7.71k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
7.71k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
7.71k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
7.71k
        return _buffer.build();
230
7.71k
    }
_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
378
    OwnedSlice _finish(int final_size_of_type) {
195
378
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
378
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
378
        int padding_elems = num_elems_after_padding - _count;
200
378
        int padding_bytes = padding_elems * final_size_of_type;
201
5.57k
        for (int i = 0; i < padding_bytes; i++) {
202
5.19k
            _data.push_back(0);
203
5.19k
        }
204
205
        // reserve enough place for compression
206
378
        _buffer.resize(
207
378
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
378
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
378
        int64_t bytes =
211
378
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
378
                                         num_elems_after_padding, final_size_of_type, 0);
213
378
        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
378
        encode_fixed32_le(&_buffer[0], _count);
223
378
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
378
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
378
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
378
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
378
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
378
        return _buffer.build();
230
378
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
194
38.5k
    OwnedSlice _finish(int final_size_of_type) {
195
38.5k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
38.5k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
38.5k
        int padding_elems = num_elems_after_padding - _count;
200
38.5k
        int padding_bytes = padding_elems * final_size_of_type;
201
812k
        for (int i = 0; i < padding_bytes; i++) {
202
773k
            _data.push_back(0);
203
773k
        }
204
205
        // reserve enough place for compression
206
38.5k
        _buffer.resize(
207
38.5k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
38.5k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
38.5k
        int64_t bytes =
211
38.5k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
38.5k
                                         num_elems_after_padding, final_size_of_type, 0);
213
38.5k
        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
38.5k
        encode_fixed32_le(&_buffer[0], _count);
223
38.5k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
38.5k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
38.5k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
38.5k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
38.5k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
38.5k
        return _buffer.build();
230
38.5k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
194
43.4k
    OwnedSlice _finish(int final_size_of_type) {
195
43.4k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
43.4k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
43.4k
        int padding_elems = num_elems_after_padding - _count;
200
43.4k
        int padding_bytes = padding_elems * final_size_of_type;
201
1.84M
        for (int i = 0; i < padding_bytes; i++) {
202
1.80M
            _data.push_back(0);
203
1.80M
        }
204
205
        // reserve enough place for compression
206
43.4k
        _buffer.resize(
207
43.4k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
43.4k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
43.4k
        int64_t bytes =
211
43.4k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
43.4k
                                         num_elems_after_padding, final_size_of_type, 0);
213
43.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
43.4k
        encode_fixed32_le(&_buffer[0], _count);
223
43.4k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
43.4k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
43.4k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
43.4k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
43.4k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
43.4k
        return _buffer.build();
230
43.4k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE7_finishEi
Line
Count
Source
194
282
    OwnedSlice _finish(int final_size_of_type) {
195
282
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
282
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
282
        int padding_elems = num_elems_after_padding - _count;
200
282
        int padding_bytes = padding_elems * final_size_of_type;
201
11.8k
        for (int i = 0; i < padding_bytes; i++) {
202
11.5k
            _data.push_back(0);
203
11.5k
        }
204
205
        // reserve enough place for compression
206
282
        _buffer.resize(
207
282
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
282
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
282
        int64_t bytes =
211
282
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
282
                                         num_elems_after_padding, final_size_of_type, 0);
213
282
        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
282
        encode_fixed32_le(&_buffer[0], _count);
223
282
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
282
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
282
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
282
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
282
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
282
        return _buffer.build();
230
282
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
194
604
    OwnedSlice _finish(int final_size_of_type) {
195
604
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
604
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
604
        int padding_elems = num_elems_after_padding - _count;
200
604
        int padding_bytes = padding_elems * final_size_of_type;
201
13.4k
        for (int i = 0; i < padding_bytes; i++) {
202
12.8k
            _data.push_back(0);
203
12.8k
        }
204
205
        // reserve enough place for compression
206
604
        _buffer.resize(
207
604
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
604
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
604
        int64_t bytes =
211
604
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
604
                                         num_elems_after_padding, final_size_of_type, 0);
213
604
        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
604
        encode_fixed32_le(&_buffer[0], _count);
223
604
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
604
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
604
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
604
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
604
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
604
        return _buffer.build();
230
604
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
Line
Count
Source
194
7.76k
    OwnedSlice _finish(int final_size_of_type) {
195
7.76k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
7.76k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
7.76k
        int padding_elems = num_elems_after_padding - _count;
200
7.76k
        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.76k
        _buffer.resize(
207
7.76k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
7.76k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
7.76k
        int64_t bytes =
211
7.76k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
7.76k
                                         num_elems_after_padding, final_size_of_type, 0);
213
7.76k
        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.76k
        encode_fixed32_le(&_buffer[0], _count);
223
7.76k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
7.76k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
7.76k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
7.76k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
7.76k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
7.76k
        return _buffer.build();
230
7.76k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
194
266
    OwnedSlice _finish(int final_size_of_type) {
195
266
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
266
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
266
        int padding_elems = num_elems_after_padding - _count;
200
266
        int padding_bytes = padding_elems * final_size_of_type;
201
16.6k
        for (int i = 0; i < padding_bytes; i++) {
202
16.3k
            _data.push_back(0);
203
16.3k
        }
204
205
        // reserve enough place for compression
206
266
        _buffer.resize(
207
266
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
266
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
266
        int64_t bytes =
211
266
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
266
                                         num_elems_after_padding, final_size_of_type, 0);
213
266
        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
266
        encode_fixed32_le(&_buffer[0], _count);
223
266
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
266
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
266
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
266
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
266
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
266
        return _buffer.build();
230
266
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
194
9.77k
    OwnedSlice _finish(int final_size_of_type) {
195
9.77k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
9.77k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
9.77k
        int padding_elems = num_elems_after_padding - _count;
200
9.77k
        int padding_bytes = padding_elems * final_size_of_type;
201
119k
        for (int i = 0; i < padding_bytes; i++) {
202
109k
            _data.push_back(0);
203
109k
        }
204
205
        // reserve enough place for compression
206
9.77k
        _buffer.resize(
207
9.77k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
9.77k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
9.77k
        int64_t bytes =
211
9.77k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
9.77k
                                         num_elems_after_padding, final_size_of_type, 0);
213
9.77k
        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.77k
        encode_fixed32_le(&_buffer[0], _count);
223
9.77k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
9.77k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
9.77k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
9.77k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
9.77k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
9.77k
        return _buffer.build();
230
9.77k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
194
19.7k
    OwnedSlice _finish(int final_size_of_type) {
195
19.7k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
19.7k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
19.7k
        int padding_elems = num_elems_after_padding - _count;
200
19.7k
        int padding_bytes = padding_elems * final_size_of_type;
201
493k
        for (int i = 0; i < padding_bytes; i++) {
202
473k
            _data.push_back(0);
203
473k
        }
204
205
        // reserve enough place for compression
206
19.7k
        _buffer.resize(
207
19.7k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
19.7k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
19.7k
        int64_t bytes =
211
19.7k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
19.7k
                                         num_elems_after_padding, final_size_of_type, 0);
213
19.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
19.7k
        encode_fixed32_le(&_buffer[0], _count);
223
19.7k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
19.7k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
19.7k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
19.7k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
19.7k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
19.7k
        return _buffer.build();
230
19.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.15k
    OwnedSlice _finish(int final_size_of_type) {
195
1.15k
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
1.15k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
1.15k
        int padding_elems = num_elems_after_padding - _count;
200
1.15k
        int padding_bytes = padding_elems * final_size_of_type;
201
176k
        for (int i = 0; i < padding_bytes; i++) {
202
175k
            _data.push_back(0);
203
175k
        }
204
205
        // reserve enough place for compression
206
1.15k
        _buffer.resize(
207
1.15k
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
1.15k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
1.15k
        int64_t bytes =
211
1.15k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
1.15k
                                         num_elems_after_padding, final_size_of_type, 0);
213
1.15k
        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.15k
        encode_fixed32_le(&_buffer[0], _count);
223
1.15k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
1.15k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
1.15k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
1.15k
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
1.15k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
1.15k
        return _buffer.build();
230
1.15k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Line
Count
Source
194
586
    OwnedSlice _finish(int final_size_of_type) {
195
586
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
586
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
586
        int padding_elems = num_elems_after_padding - _count;
200
586
        int padding_bytes = padding_elems * final_size_of_type;
201
11.9k
        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
586
        _buffer.resize(
207
586
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
586
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
586
        int64_t bytes =
211
586
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
586
                                         num_elems_after_padding, final_size_of_type, 0);
213
586
        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
586
        encode_fixed32_le(&_buffer[0], _count);
223
586
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
586
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
586
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
586
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
586
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
586
        return _buffer.build();
230
586
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
194
593
    OwnedSlice _finish(int final_size_of_type) {
195
593
        _data.resize(final_size_of_type * _count);
196
197
        // Do padding so that the input num of element is multiple of 8.
198
593
        int num_elems_after_padding = ALIGN_UP(_count, 8);
199
593
        int padding_elems = num_elems_after_padding - _count;
200
593
        int padding_bytes = padding_elems * final_size_of_type;
201
47.3k
        for (int i = 0; i < padding_bytes; i++) {
202
46.7k
            _data.push_back(0);
203
46.7k
        }
204
205
        // reserve enough place for compression
206
593
        _buffer.resize(
207
593
                BITSHUFFLE_PAGE_HEADER_SIZE +
208
593
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
209
210
593
        int64_t bytes =
211
593
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
212
593
                                         num_elems_after_padding, final_size_of_type, 0);
213
593
        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
593
        encode_fixed32_le(&_buffer[0], _count);
223
593
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
224
593
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
225
593
        encode_fixed32_le(&_buffer[12], final_size_of_type);
226
593
        _finished = true;
227
        // before build(), update buffer length to the actual compressed size
228
593
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
229
593
        return _buffer.build();
230
593
    }
_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
1.87M
                                       int& size_of_element) {
254
1.87M
    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
1.87M
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
260
1.87M
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
261
1.87M
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
262
1.87M
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
263
1.87M
    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
1.87M
    switch (size_of_element) {
272
168k
    case 1:
273
190k
    case 2:
274
192k
    case 3:
275
1.20M
    case 4:
276
1.78M
    case 8:
277
1.78M
    case 12:
278
1.87M
    case 16:
279
1.87M
    case 32:
280
1.87M
        break;
281
0
    default:
282
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
283
1.87M
    }
284
1.87M
    return Status::OK();
285
1.87M
}
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
101k
            : _data(data),
292
101k
              _options(options),
293
101k
              _parsed(false),
294
101k
              _num_elements(0),
295
101k
              _num_element_after_padding(0),
296
101k
              _size_of_element(0),
297
101k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_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_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
528k
            : _data(data),
292
528k
              _options(options),
293
528k
              _parsed(false),
294
528k
              _num_elements(0),
295
528k
              _num_element_after_padding(0),
296
528k
              _size_of_element(0),
297
528k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
112k
            : _data(data),
292
112k
              _options(options),
293
112k
              _parsed(false),
294
112k
              _num_elements(0),
295
112k
              _num_element_after_padding(0),
296
112k
              _size_of_element(0),
297
112k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
16.5k
            : _data(data),
292
16.5k
              _options(options),
293
16.5k
              _parsed(false),
294
16.5k
              _num_elements(0),
295
16.5k
              _num_element_after_padding(0),
296
16.5k
              _size_of_element(0),
297
16.5k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
93.2k
            : _data(data),
292
93.2k
              _options(options),
293
93.2k
              _parsed(false),
294
93.2k
              _num_elements(0),
295
93.2k
              _num_element_after_padding(0),
296
93.2k
              _size_of_element(0),
297
93.2k
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
8.95k
            : _data(data),
292
8.95k
              _options(options),
293
8.95k
              _parsed(false),
294
8.95k
              _num_elements(0),
295
8.95k
              _num_element_after_padding(0),
296
8.95k
              _size_of_element(0),
297
8.95k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
13.2k
            : _data(data),
292
13.2k
              _options(options),
293
13.2k
              _parsed(false),
294
13.2k
              _num_elements(0),
295
13.2k
              _num_element_after_padding(0),
296
13.2k
              _size_of_element(0),
297
13.2k
              _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.57k
            : _data(data),
292
1.57k
              _options(options),
293
1.57k
              _parsed(false),
294
1.57k
              _num_elements(0),
295
1.57k
              _num_element_after_padding(0),
296
1.57k
              _size_of_element(0),
297
1.57k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
60.6k
            : _data(data),
292
60.6k
              _options(options),
293
60.6k
              _parsed(false),
294
60.6k
              _num_elements(0),
295
60.6k
              _num_element_after_padding(0),
296
60.6k
              _size_of_element(0),
297
60.6k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
67.3k
            : _data(data),
292
67.3k
              _options(options),
293
67.3k
              _parsed(false),
294
67.3k
              _num_elements(0),
295
67.3k
              _num_element_after_padding(0),
296
67.3k
              _size_of_element(0),
297
67.3k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
3.16k
            : _data(data),
292
3.16k
              _options(options),
293
3.16k
              _parsed(false),
294
3.16k
              _num_elements(0),
295
3.16k
              _num_element_after_padding(0),
296
3.16k
              _size_of_element(0),
297
3.16k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
2.26k
            : _data(data),
292
2.26k
              _options(options),
293
2.26k
              _parsed(false),
294
2.26k
              _num_elements(0),
295
2.26k
              _num_element_after_padding(0),
296
2.26k
              _size_of_element(0),
297
2.26k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
15.7k
            : _data(data),
292
15.7k
              _options(options),
293
15.7k
              _parsed(false),
294
15.7k
              _num_elements(0),
295
15.7k
              _num_element_after_padding(0),
296
15.7k
              _size_of_element(0),
297
15.7k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
1.37k
            : _data(data),
292
1.37k
              _options(options),
293
1.37k
              _parsed(false),
294
1.37k
              _num_elements(0),
295
1.37k
              _num_element_after_padding(0),
296
1.37k
              _size_of_element(0),
297
1.37k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
15.6k
            : _data(data),
292
15.6k
              _options(options),
293
15.6k
              _parsed(false),
294
15.6k
              _num_elements(0),
295
15.6k
              _num_element_after_padding(0),
296
15.6k
              _size_of_element(0),
297
15.6k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
46.2k
            : _data(data),
292
46.2k
              _options(options),
293
46.2k
              _parsed(false),
294
46.2k
              _num_elements(0),
295
46.2k
              _num_element_after_padding(0),
296
46.2k
              _size_of_element(0),
297
46.2k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
31.1k
            : _data(data),
292
31.1k
              _options(options),
293
31.1k
              _parsed(false),
294
31.1k
              _num_elements(0),
295
31.1k
              _num_element_after_padding(0),
296
31.1k
              _size_of_element(0),
297
31.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
1.78k
            : _data(data),
292
1.78k
              _options(options),
293
1.78k
              _parsed(false),
294
1.78k
              _num_elements(0),
295
1.78k
              _num_element_after_padding(0),
296
1.78k
              _size_of_element(0),
297
1.78k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
897
            : _data(data),
292
897
              _options(options),
293
897
              _parsed(false),
294
897
              _num_elements(0),
295
897
              _num_element_after_padding(0),
296
897
              _size_of_element(0),
297
897
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
942
            : _data(data),
292
942
              _options(options),
293
942
              _parsed(false),
294
942
              _num_elements(0),
295
942
              _num_element_after_padding(0),
296
942
              _size_of_element(0),
297
942
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
291
5.17k
            : _data(data),
292
5.17k
              _options(options),
293
5.17k
              _parsed(false),
294
5.17k
              _num_elements(0),
295
5.17k
              _num_element_after_padding(0),
296
5.17k
              _size_of_element(0),
297
5.17k
              _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
101k
    Status init() override {
300
101k
        CHECK(!_parsed);
301
101k
        size_t unused;
302
101k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
101k
                                                 _num_element_after_padding, _size_of_element));
304
305
101k
        if (_data.size !=
306
101k
            _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
101k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
101k
                     _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
101k
        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
101k
        _parsed = true;
326
101k
        return Status::OK();
327
101k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
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_9FieldTypeE5EE4initEv
Line
Count
Source
299
527k
    Status init() override {
300
527k
        CHECK(!_parsed);
301
527k
        size_t unused;
302
527k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
527k
                                                 _num_element_after_padding, _size_of_element));
304
305
527k
        if (_data.size !=
306
527k
            _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
527k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
527k
                     _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
527k
        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
527k
        _parsed = true;
326
527k
        return Status::OK();
327
527k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
299
112k
    Status init() override {
300
112k
        CHECK(!_parsed);
301
112k
        size_t unused;
302
112k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
112k
                                                 _num_element_after_padding, _size_of_element));
304
305
112k
        if (_data.size !=
306
112k
            _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
112k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
112k
                     _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
112k
        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
112k
        _parsed = true;
326
112k
        return Status::OK();
327
112k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
299
16.5k
    Status init() override {
300
16.5k
        CHECK(!_parsed);
301
16.5k
        size_t unused;
302
16.5k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
16.5k
                                                 _num_element_after_padding, _size_of_element));
304
305
16.5k
        if (_data.size !=
306
16.5k
            _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.5k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
16.5k
                     _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.5k
        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.5k
        _parsed = true;
326
16.5k
        return Status::OK();
327
16.5k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
299
93.2k
    Status init() override {
300
93.2k
        CHECK(!_parsed);
301
93.2k
        size_t unused;
302
93.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
93.2k
                                                 _num_element_after_padding, _size_of_element));
304
305
93.2k
        if (_data.size !=
306
93.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
93.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
93.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
93.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
93.2k
        _parsed = true;
326
93.2k
        return Status::OK();
327
93.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
299
8.95k
    Status init() override {
300
8.95k
        CHECK(!_parsed);
301
8.95k
        size_t unused;
302
8.95k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
8.95k
                                                 _num_element_after_padding, _size_of_element));
304
305
8.95k
        if (_data.size !=
306
8.95k
            _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
8.95k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
8.95k
                     _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
8.95k
        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
8.95k
        _parsed = true;
326
8.95k
        return Status::OK();
327
8.95k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
299
13.2k
    Status init() override {
300
13.2k
        CHECK(!_parsed);
301
13.2k
        size_t unused;
302
13.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
13.2k
                                                 _num_element_after_padding, _size_of_element));
304
305
13.2k
        if (_data.size !=
306
13.2k
            _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
13.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
13.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
13.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
13.2k
        _parsed = true;
326
13.2k
        return Status::OK();
327
13.2k
    }
_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.56k
    Status init() override {
300
1.56k
        CHECK(!_parsed);
301
1.56k
        size_t unused;
302
1.56k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
1.56k
                                                 _num_element_after_padding, _size_of_element));
304
305
1.56k
        if (_data.size !=
306
1.56k
            _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.56k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
1.56k
                     _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.56k
        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.56k
        _parsed = true;
326
1.56k
        return Status::OK();
327
1.56k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
299
60.6k
    Status init() override {
300
60.6k
        CHECK(!_parsed);
301
60.6k
        size_t unused;
302
60.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
60.6k
                                                 _num_element_after_padding, _size_of_element));
304
305
60.6k
        if (_data.size !=
306
60.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
60.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
60.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
60.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
60.6k
        _parsed = true;
326
60.6k
        return Status::OK();
327
60.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
299
67.3k
    Status init() override {
300
67.3k
        CHECK(!_parsed);
301
67.3k
        size_t unused;
302
67.3k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
67.3k
                                                 _num_element_after_padding, _size_of_element));
304
305
67.3k
        if (_data.size !=
306
67.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
67.3k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
67.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
67.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
67.3k
        _parsed = true;
326
67.3k
        return Status::OK();
327
67.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE4initEv
Line
Count
Source
299
3.16k
    Status init() override {
300
3.16k
        CHECK(!_parsed);
301
3.16k
        size_t unused;
302
3.16k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
3.16k
                                                 _num_element_after_padding, _size_of_element));
304
305
3.16k
        if (_data.size !=
306
3.16k
            _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.16k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
3.16k
                     _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.16k
        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.16k
        _parsed = true;
326
3.16k
        return Status::OK();
327
3.16k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
299
2.25k
    Status init() override {
300
2.25k
        CHECK(!_parsed);
301
2.25k
        size_t unused;
302
2.25k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
2.25k
                                                 _num_element_after_padding, _size_of_element));
304
305
2.25k
        if (_data.size !=
306
2.25k
            _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.25k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
2.25k
                     _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.25k
        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.25k
        _parsed = true;
326
2.25k
        return Status::OK();
327
2.25k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
299
15.7k
    Status init() override {
300
15.7k
        CHECK(!_parsed);
301
15.7k
        size_t unused;
302
15.7k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
15.7k
                                                 _num_element_after_padding, _size_of_element));
304
305
15.7k
        if (_data.size !=
306
15.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
15.7k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
15.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
15.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
15.7k
        _parsed = true;
326
15.7k
        return Status::OK();
327
15.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
299
1.38k
    Status init() override {
300
1.38k
        CHECK(!_parsed);
301
1.38k
        size_t unused;
302
1.38k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
1.38k
                                                 _num_element_after_padding, _size_of_element));
304
305
1.38k
        if (_data.size !=
306
1.38k
            _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.6k
    Status init() override {
300
15.6k
        CHECK(!_parsed);
301
15.6k
        size_t unused;
302
15.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
15.6k
                                                 _num_element_after_padding, _size_of_element));
304
305
15.6k
        if (_data.size !=
306
15.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
15.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
15.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
15.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
15.6k
        _parsed = true;
326
15.6k
        return Status::OK();
327
15.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
299
46.2k
    Status init() override {
300
46.2k
        CHECK(!_parsed);
301
46.2k
        size_t unused;
302
46.2k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
46.2k
                                                 _num_element_after_padding, _size_of_element));
304
305
46.2k
        if (_data.size !=
306
46.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
46.2k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
46.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
46.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
46.2k
        _parsed = true;
326
46.2k
        return Status::OK();
327
46.2k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
299
31.1k
    Status init() override {
300
31.1k
        CHECK(!_parsed);
301
31.1k
        size_t unused;
302
31.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
31.1k
                                                 _num_element_after_padding, _size_of_element));
304
305
31.1k
        if (_data.size !=
306
31.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
31.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
31.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
31.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
31.1k
        _parsed = true;
326
31.1k
        return Status::OK();
327
31.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
299
1.78k
    Status init() override {
300
1.78k
        CHECK(!_parsed);
301
1.78k
        size_t unused;
302
1.78k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
1.78k
                                                 _num_element_after_padding, _size_of_element));
304
305
1.78k
        if (_data.size !=
306
1.78k
            _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.78k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
1.78k
                     _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.78k
        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.78k
        _parsed = true;
326
1.78k
        return Status::OK();
327
1.78k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
299
897
    Status init() override {
300
897
        CHECK(!_parsed);
301
897
        size_t unused;
302
897
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
897
                                                 _num_element_after_padding, _size_of_element));
304
305
897
        if (_data.size !=
306
897
            _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
897
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
897
                     _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
897
        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
897
        _parsed = true;
326
897
        return Status::OK();
327
897
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
299
942
    Status init() override {
300
942
        CHECK(!_parsed);
301
942
        size_t unused;
302
942
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
942
                                                 _num_element_after_padding, _size_of_element));
304
305
942
        if (_data.size !=
306
942
            _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
942
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
942
                     _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
942
        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
942
        _parsed = true;
326
942
        return Status::OK();
327
942
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE4initEv
Line
Count
Source
299
5.17k
    Status init() override {
300
5.17k
        CHECK(!_parsed);
301
5.17k
        size_t unused;
302
5.17k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
303
5.17k
                                                 _num_element_after_padding, _size_of_element));
304
305
5.17k
        if (_data.size !=
306
5.17k
            _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.17k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
316
5.17k
                     _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.17k
        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.17k
        _parsed = true;
326
5.17k
        return Status::OK();
327
5.17k
    }
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
4.76M
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
4.76M
        if (_num_elements == 0) [[unlikely]] {
338
13.9k
            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
13.9k
        }
343
344
4.76M
        DCHECK_LE(pos, _num_elements);
345
4.76M
        _cur_index = pos;
346
4.76M
        return Status::OK();
347
4.76M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
335
298k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
298k
        if (_num_elements == 0) [[unlikely]] {
338
358
            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
358
        }
343
344
298k
        DCHECK_LE(pos, _num_elements);
345
298k
        _cur_index = pos;
346
298k
        return Status::OK();
347
298k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
335
233k
    Status seek_to_position_in_page(size_t pos) override {
336
233k
        DCHECK(_parsed) << "Must call init()";
337
233k
        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
233k
        DCHECK_LE(pos, _num_elements);
345
233k
        _cur_index = pos;
346
233k
        return Status::OK();
347
233k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
335
2.31M
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
2.31M
        if (_num_elements == 0) [[unlikely]] {
338
7.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
7.62k
        }
343
344
2.31M
        DCHECK_LE(pos, _num_elements);
345
2.31M
        _cur_index = pos;
346
2.31M
        return Status::OK();
347
2.31M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
335
188k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
188k
        if (_num_elements == 0) [[unlikely]] {
338
780
            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
780
        }
343
344
188k
        DCHECK_LE(pos, _num_elements);
345
188k
        _cur_index = pos;
346
188k
        return Status::OK();
347
188k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
335
113k
    Status seek_to_position_in_page(size_t pos) override {
336
113k
        DCHECK(_parsed) << "Must call init()";
337
113k
        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
113k
        DCHECK_LE(pos, _num_elements);
345
113k
        _cur_index = pos;
346
113k
        return Status::OK();
347
113k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
335
19.6k
    Status seek_to_position_in_page(size_t pos) override {
336
19.6k
        DCHECK(_parsed) << "Must call init()";
337
19.6k
        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
19.6k
        DCHECK_LE(pos, _num_elements);
345
19.6k
        _cur_index = pos;
346
19.6k
        return Status::OK();
347
19.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
335
237k
    Status seek_to_position_in_page(size_t pos) override {
336
237k
        DCHECK(_parsed) << "Must call init()";
337
237k
        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
237k
        DCHECK_LE(pos, _num_elements);
345
237k
        _cur_index = pos;
346
237k
        return Status::OK();
347
237k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
335
211k
    Status seek_to_position_in_page(size_t pos) override {
336
211k
        DCHECK(_parsed) << "Must call init()";
337
211k
        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
211k
        DCHECK_LE(pos, _num_elements);
345
211k
        _cur_index = pos;
346
211k
        return Status::OK();
347
211k
    }
_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
224k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
224k
        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
224k
        DCHECK_LE(pos, _num_elements);
345
224k
        _cur_index = pos;
346
224k
        return Status::OK();
347
224k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
335
511k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
511k
        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
511k
        DCHECK_LE(pos, _num_elements);
345
511k
        _cur_index = pos;
346
511k
        return Status::OK();
347
511k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Line
Count
Source
335
42.4k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
42.4k
        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
42.4k
        DCHECK_LE(pos, _num_elements);
345
42.4k
        _cur_index = pos;
346
42.4k
        return Status::OK();
347
42.4k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE24seek_to_position_in_pageEm
Line
Count
Source
335
1.09k
    Status seek_to_position_in_page(size_t pos) override {
336
1.09k
        DCHECK(_parsed) << "Must call init()";
337
1.09k
        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
1.09k
        DCHECK_LE(pos, _num_elements);
345
1.09k
        _cur_index = pos;
346
1.09k
        return Status::OK();
347
1.09k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_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
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
209k
        DCHECK_LE(pos, _num_elements);
345
209k
        _cur_index = pos;
346
209k
        return Status::OK();
347
209k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Line
Count
Source
335
6.80k
    Status seek_to_position_in_page(size_t pos) override {
336
18.4E
        DCHECK(_parsed) << "Must call init()";
337
6.80k
        if (_num_elements == 0) [[unlikely]] {
338
349
            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
349
        }
343
344
6.80k
        DCHECK_LE(pos, _num_elements);
345
6.80k
        _cur_index = pos;
346
6.80k
        return Status::OK();
347
6.80k
    }
_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
904
    Status seek_to_position_in_page(size_t pos) override {
336
904
        DCHECK(_parsed) << "Must call init()";
337
904
        if (_num_elements == 0) [[unlikely]] {
338
34
            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
34
        }
343
344
904
        DCHECK_LE(pos, _num_elements);
345
904
        _cur_index = pos;
346
904
        return Status::OK();
347
904
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Line
Count
Source
335
20.6k
    Status seek_to_position_in_page(size_t pos) override {
336
20.6k
        DCHECK(_parsed) << "Must call init()";
337
20.6k
        if (_num_elements == 0) [[unlikely]] {
338
3.42k
            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.42k
        }
343
344
20.6k
        DCHECK_LE(pos, _num_elements);
345
20.6k
        _cur_index = pos;
346
20.6k
        return Status::OK();
347
20.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_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
1.09k
            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.09k
        }
343
344
117k
        DCHECK_LE(pos, _num_elements);
345
117k
        _cur_index = pos;
346
117k
        return Status::OK();
347
117k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Line
Count
Source
335
2.01k
    Status seek_to_position_in_page(size_t pos) override {
336
2.01k
        DCHECK(_parsed) << "Must call init()";
337
2.01k
        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
2.01k
        DCHECK_LE(pos, _num_elements);
345
2.01k
        _cur_index = pos;
346
2.01k
        return Status::OK();
347
2.01k
    }
_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
9.48k
    Status seek_to_position_in_page(size_t pos) override {
336
9.48k
        DCHECK(_parsed) << "Must call init()";
337
9.48k
        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
9.48k
        DCHECK_LE(pos, _num_elements);
345
9.48k
        _cur_index = pos;
346
9.48k
        return Status::OK();
347
9.48k
    }
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
72
                left = mid + 1;
369
75
            } else {
370
75
                right = mid;
371
75
            }
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
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
    }
_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
26
                left = mid + 1;
369
26
            } else {
370
23
                right = mid;
371
23
            }
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
24
                left = mid + 1;
369
25
            } else {
370
25
                right = mid;
371
25
            }
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
1.64M
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
1.64M
        DCHECK(_parsed);
390
1.64M
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
1.64M
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
1.64M
        StorageLayout<Type>::storage_to_column(
398
1.64M
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
1.64M
        *n = max_fetch;
400
1.64M
        if constexpr (forward_index) {
401
1.59M
            _cur_index += max_fetch;
402
1.59M
        }
403
404
1.64M
        return Status::OK();
405
1.64M
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
136k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
136k
        DCHECK(_parsed);
390
136k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
136k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
136k
        StorageLayout<Type>::storage_to_column(
398
136k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
136k
        *n = max_fetch;
400
136k
        if constexpr (forward_index) {
401
136k
            _cur_index += max_fetch;
402
136k
        }
403
404
136k
        return Status::OK();
405
136k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
13.3k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
13.3k
        DCHECK(_parsed);
390
13.3k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
13.3k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
13.3k
        StorageLayout<Type>::storage_to_column(
398
13.3k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
13.3k
        *n = max_fetch;
400
13.3k
        if constexpr (forward_index) {
401
13.3k
            _cur_index += max_fetch;
402
13.3k
        }
403
404
13.3k
        return Status::OK();
405
13.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
555k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
555k
        DCHECK(_parsed);
390
556k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
555k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
555k
        StorageLayout<Type>::storage_to_column(
398
555k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
555k
        *n = max_fetch;
400
555k
        if constexpr (forward_index) {
401
555k
            _cur_index += max_fetch;
402
555k
        }
403
404
555k
        return Status::OK();
405
555k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
127k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
127k
        DCHECK(_parsed);
390
127k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
127k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
127k
        StorageLayout<Type>::storage_to_column(
398
127k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
127k
        *n = max_fetch;
400
127k
        if constexpr (forward_index) {
401
127k
            _cur_index += max_fetch;
402
127k
        }
403
404
127k
        return Status::OK();
405
127k
    }
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.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
14.4k
        DCHECK(_parsed);
390
14.4k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
14.4k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
14.4k
        StorageLayout<Type>::storage_to_column(
398
14.4k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
14.4k
        *n = max_fetch;
400
14.4k
        if constexpr (forward_index) {
401
14.4k
            _cur_index += max_fetch;
402
14.4k
        }
403
404
14.4k
        return Status::OK();
405
14.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
93.1k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
93.1k
        DCHECK(_parsed);
390
93.1k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
93.1k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
93.1k
        StorageLayout<Type>::storage_to_column(
398
93.1k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
93.1k
        *n = max_fetch;
400
93.1k
        if constexpr (forward_index) {
401
93.1k
            _cur_index += max_fetch;
402
93.1k
        }
403
404
93.1k
        return Status::OK();
405
93.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
57.5k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
57.5k
        DCHECK(_parsed);
390
57.5k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
57.5k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
57.5k
        StorageLayout<Type>::storage_to_column(
398
57.5k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
57.5k
        *n = max_fetch;
400
        if constexpr (forward_index) {
401
            _cur_index += max_fetch;
402
        }
403
404
57.5k
        return Status::OK();
405
57.5k
    }
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.28k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
7.28k
        DCHECK(_parsed);
390
7.28k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
7.28k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
7.28k
        StorageLayout<Type>::storage_to_column(
398
7.28k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
7.28k
        *n = max_fetch;
400
7.28k
        if constexpr (forward_index) {
401
7.28k
            _cur_index += max_fetch;
402
7.28k
        }
403
404
7.28k
        return Status::OK();
405
7.28k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
12.3k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
12.3k
        DCHECK(_parsed);
390
12.3k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
12.3k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
12.3k
        StorageLayout<Type>::storage_to_column(
398
12.3k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
12.3k
        *n = max_fetch;
400
12.3k
        if constexpr (forward_index) {
401
12.3k
            _cur_index += max_fetch;
402
12.3k
        }
403
404
12.3k
        return Status::OK();
405
12.3k
    }
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.13k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
4.13k
        DCHECK(_parsed);
390
4.14k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
4.13k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
4.13k
        StorageLayout<Type>::storage_to_column(
398
4.13k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
4.13k
        *n = max_fetch;
400
4.13k
        if constexpr (forward_index) {
401
4.13k
            _cur_index += max_fetch;
402
4.13k
        }
403
404
4.13k
        return Status::OK();
405
4.13k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
369k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
369k
        DCHECK(_parsed);
390
369k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
369k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
369k
        StorageLayout<Type>::storage_to_column(
398
369k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
369k
        *n = max_fetch;
400
369k
        if constexpr (forward_index) {
401
369k
            _cur_index += max_fetch;
402
369k
        }
403
404
369k
        return Status::OK();
405
369k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
63.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
63.9k
        DCHECK(_parsed);
390
63.9k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
63.9k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
63.9k
        StorageLayout<Type>::storage_to_column(
398
63.9k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
63.9k
        *n = max_fetch;
400
63.9k
        if constexpr (forward_index) {
401
63.9k
            _cur_index += max_fetch;
402
63.9k
        }
403
404
63.9k
        return Status::OK();
405
63.9k
    }
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.27k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
2.27k
        DCHECK(_parsed);
390
2.27k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
2.27k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
2.27k
        StorageLayout<Type>::storage_to_column(
398
2.27k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
2.27k
        *n = max_fetch;
400
2.27k
        if constexpr (forward_index) {
401
2.27k
            _cur_index += max_fetch;
402
2.27k
        }
403
404
2.27k
        return Status::OK();
405
2.27k
    }
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.36k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
1.36k
        DCHECK(_parsed);
390
1.36k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
1.36k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
1.36k
        StorageLayout<Type>::storage_to_column(
398
1.36k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
1.36k
        *n = max_fetch;
400
1.36k
        if constexpr (forward_index) {
401
1.36k
            _cur_index += max_fetch;
402
1.36k
        }
403
404
1.36k
        return Status::OK();
405
1.36k
    }
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.00k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
8.00k
        DCHECK(_parsed);
390
8.00k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
8.00k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
8.00k
        StorageLayout<Type>::storage_to_column(
398
8.00k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
8.00k
        *n = max_fetch;
400
8.00k
        if constexpr (forward_index) {
401
8.00k
            _cur_index += max_fetch;
402
8.00k
        }
403
404
8.00k
        return Status::OK();
405
8.00k
    }
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.27k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
1.27k
        DCHECK(_parsed);
390
1.27k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
1.27k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
1.27k
        StorageLayout<Type>::storage_to_column(
398
1.27k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
1.27k
        *n = max_fetch;
400
1.27k
        if constexpr (forward_index) {
401
1.27k
            _cur_index += max_fetch;
402
1.27k
        }
403
404
1.27k
        return Status::OK();
405
1.27k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
8.09k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
8.09k
        DCHECK(_parsed);
390
8.10k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
8.09k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
8.09k
        StorageLayout<Type>::storage_to_column(
398
8.09k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
8.09k
        *n = max_fetch;
400
8.09k
        if constexpr (forward_index) {
401
8.09k
            _cur_index += max_fetch;
402
8.09k
        }
403
404
8.09k
        return Status::OK();
405
8.09k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
51.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
51.6k
        DCHECK(_parsed);
390
51.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
51.6k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
51.6k
        StorageLayout<Type>::storage_to_column(
398
51.6k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
51.6k
        *n = max_fetch;
400
51.6k
        if constexpr (forward_index) {
401
51.6k
            _cur_index += max_fetch;
402
51.6k
        }
403
404
51.6k
        return Status::OK();
405
51.6k
    }
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.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
20.4k
        DCHECK(_parsed);
390
20.4k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
20.4k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
20.4k
        StorageLayout<Type>::storage_to_column(
398
20.4k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
20.4k
        *n = max_fetch;
400
20.4k
        if constexpr (forward_index) {
401
20.4k
            _cur_index += max_fetch;
402
20.4k
        }
403
404
20.4k
        return Status::OK();
405
20.4k
    }
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.22k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
3.22k
        DCHECK(_parsed);
390
3.22k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
3.22k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
3.22k
        StorageLayout<Type>::storage_to_column(
398
3.22k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
3.22k
        *n = max_fetch;
400
3.22k
        if constexpr (forward_index) {
401
3.22k
            _cur_index += max_fetch;
402
3.22k
        }
403
404
3.22k
        return Status::OK();
405
3.22k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
640
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
640
        DCHECK(_parsed);
390
640
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
640
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
640
        StorageLayout<Type>::storage_to_column(
398
640
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
640
        *n = max_fetch;
400
640
        if constexpr (forward_index) {
401
640
            _cur_index += max_fetch;
402
640
        }
403
404
640
        return Status::OK();
405
640
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
388
662
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
662
        DCHECK(_parsed);
390
662
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
662
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
662
        StorageLayout<Type>::storage_to_column(
398
662
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
662
        *n = max_fetch;
400
662
        if constexpr (forward_index) {
401
662
            _cur_index += max_fetch;
402
662
        }
403
404
662
        return Status::OK();
405
662
    }
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.7k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
389
94.7k
        DCHECK(_parsed);
390
94.7k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
391
0
            *n = 0;
392
0
            return Status::OK();
393
0
        }
394
395
94.7k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
396
397
94.7k
        StorageLayout<Type>::storage_to_column(
398
94.7k
                reinterpret_cast<const uint8_t*>(get_data(_cur_index)), max_fetch, *dst);
399
94.7k
        *n = max_fetch;
400
94.7k
        if constexpr (forward_index) {
401
94.7k
            _cur_index += max_fetch;
402
94.7k
        }
403
404
94.7k
        return Status::OK();
405
94.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
406
407
1.59M
    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
136k
    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
13.3k
    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
557k
    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
127k
    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.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
407
93.1k
    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.28k
    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
12.3k
    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.14k
    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
369k
    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
63.9k
    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.27k
    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.36k
    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.00k
    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
8.10k
    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
51.7k
    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.4k
    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.22k
    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
640
    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
662
    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.8k
    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
492k
                          MutableColumnPtr& dst) override {
411
492k
        DCHECK(_parsed);
412
492k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
492k
        auto total = *n;
418
492k
        auto read_count = 0;
419
492k
        _buffer.resize(total);
420
119M
        for (size_t i = 0; i < total; ++i) {
421
118M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
118M
            if (UNLIKELY(ord >= _num_elements)) {
423
13.4k
                break;
424
13.4k
            }
425
426
118M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
118M
        }
428
429
492k
        if (LIKELY(read_count > 0)) {
430
492k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
492k
                                                   read_count, *dst);
432
492k
        }
433
434
492k
        *n = read_count;
435
492k
        return Status::OK();
436
492k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
45.3k
                          MutableColumnPtr& dst) override {
411
45.3k
        DCHECK(_parsed);
412
45.3k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
45.3k
        auto total = *n;
418
45.3k
        auto read_count = 0;
419
45.3k
        _buffer.resize(total);
420
2.14M
        for (size_t i = 0; i < total; ++i) {
421
2.10M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
2.10M
            if (UNLIKELY(ord >= _num_elements)) {
423
0
                break;
424
0
            }
425
426
2.10M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
2.10M
        }
428
429
45.3k
        if (LIKELY(read_count > 0)) {
430
45.3k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
45.3k
                                                   read_count, *dst);
432
45.3k
        }
433
434
45.3k
        *n = read_count;
435
45.3k
        return Status::OK();
436
45.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
7.56k
                          MutableColumnPtr& dst) override {
411
7.56k
        DCHECK(_parsed);
412
7.56k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
7.56k
        auto total = *n;
418
7.56k
        auto read_count = 0;
419
7.56k
        _buffer.resize(total);
420
619k
        for (size_t i = 0; i < total; ++i) {
421
612k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
612k
            if (UNLIKELY(ord >= _num_elements)) {
423
13
                break;
424
13
            }
425
426
612k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
612k
        }
428
429
7.56k
        if (LIKELY(read_count > 0)) {
430
7.56k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
7.56k
                                                   read_count, *dst);
432
7.56k
        }
433
434
7.56k
        *n = read_count;
435
7.56k
        return Status::OK();
436
7.56k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
75.6k
                          MutableColumnPtr& dst) override {
411
75.6k
        DCHECK(_parsed);
412
75.6k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
75.6k
        auto total = *n;
418
75.6k
        auto read_count = 0;
419
75.6k
        _buffer.resize(total);
420
25.1M
        for (size_t i = 0; i < total; ++i) {
421
25.0M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
25.0M
            if (UNLIKELY(ord >= _num_elements)) {
423
663
                break;
424
663
            }
425
426
25.0M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
25.0M
        }
428
429
75.6k
        if (LIKELY(read_count > 0)) {
430
75.6k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
75.6k
                                                   read_count, *dst);
432
75.6k
        }
433
434
75.6k
        *n = read_count;
435
75.6k
        return Status::OK();
436
75.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
153k
                          MutableColumnPtr& dst) override {
411
153k
        DCHECK(_parsed);
412
153k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
153k
        auto total = *n;
418
153k
        auto read_count = 0;
419
153k
        _buffer.resize(total);
420
27.6M
        for (size_t i = 0; i < total; ++i) {
421
27.5M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
27.5M
            if (UNLIKELY(ord >= _num_elements)) {
423
1.87k
                break;
424
1.87k
            }
425
426
27.5M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
27.5M
        }
428
429
153k
        if (LIKELY(read_count > 0)) {
430
153k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
153k
                                                   read_count, *dst);
432
153k
        }
433
434
153k
        *n = read_count;
435
153k
        return Status::OK();
436
153k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
8.42k
                          MutableColumnPtr& dst) override {
411
8.42k
        DCHECK(_parsed);
412
8.42k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
8.42k
        auto total = *n;
418
8.42k
        auto read_count = 0;
419
8.42k
        _buffer.resize(total);
420
1.87M
        for (size_t i = 0; i < total; ++i) {
421
1.86M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
1.86M
            if (UNLIKELY(ord >= _num_elements)) {
423
533
                break;
424
533
            }
425
426
1.86M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
1.86M
        }
428
429
8.42k
        if (LIKELY(read_count > 0)) {
430
8.42k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
8.42k
                                                   read_count, *dst);
432
8.42k
        }
433
434
8.42k
        *n = read_count;
435
8.42k
        return Status::OK();
436
8.42k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
63.6k
                          MutableColumnPtr& dst) override {
411
63.6k
        DCHECK(_parsed);
412
63.6k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
63.6k
        auto total = *n;
418
63.6k
        auto read_count = 0;
419
63.6k
        _buffer.resize(total);
420
9.40M
        for (size_t i = 0; i < total; ++i) {
421
9.34M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
9.34M
            if (UNLIKELY(ord >= _num_elements)) {
423
2.52k
                break;
424
2.52k
            }
425
426
9.34M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
9.34M
        }
428
429
63.6k
        if (LIKELY(read_count > 0)) {
430
63.6k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
63.6k
                                                   read_count, *dst);
432
63.6k
        }
433
434
63.6k
        *n = read_count;
435
63.6k
        return Status::OK();
436
63.6k
    }
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.12k
                          MutableColumnPtr& dst) override {
411
5.12k
        DCHECK(_parsed);
412
5.12k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
5.12k
        auto total = *n;
418
5.12k
        auto read_count = 0;
419
5.12k
        _buffer.resize(total);
420
1.20M
        for (size_t i = 0; i < total; ++i) {
421
1.20M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
1.20M
            if (UNLIKELY(ord >= _num_elements)) {
423
30
                break;
424
30
            }
425
426
1.20M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
1.20M
        }
428
429
5.12k
        if (LIKELY(read_count > 0)) {
430
5.12k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
5.12k
                                                   read_count, *dst);
432
5.12k
        }
433
434
5.12k
        *n = read_count;
435
5.12k
        return Status::OK();
436
5.12k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
7.23k
                          MutableColumnPtr& dst) override {
411
7.23k
        DCHECK(_parsed);
412
7.23k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
7.23k
        auto total = *n;
418
7.23k
        auto read_count = 0;
419
7.23k
        _buffer.resize(total);
420
1.97M
        for (size_t i = 0; i < total; ++i) {
421
1.97M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
1.97M
            if (UNLIKELY(ord >= _num_elements)) {
423
451
                break;
424
451
            }
425
426
1.97M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
1.97M
        }
428
429
7.23k
        if (LIKELY(read_count > 0)) {
430
7.23k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
7.23k
                                                   read_count, *dst);
432
7.23k
        }
433
434
7.23k
        *n = read_count;
435
7.23k
        return Status::OK();
436
7.23k
    }
_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.36k
                          MutableColumnPtr& dst) override {
411
1.36k
        DCHECK(_parsed);
412
1.36k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
1.36k
        auto total = *n;
418
1.36k
        auto read_count = 0;
419
1.36k
        _buffer.resize(total);
420
501k
        for (size_t i = 0; i < total; ++i) {
421
500k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
500k
            if (UNLIKELY(ord >= _num_elements)) {
423
15
                break;
424
15
            }
425
426
500k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
500k
        }
428
429
1.36k
        if (LIKELY(read_count > 0)) {
430
1.36k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
1.36k
                                                   read_count, *dst);
432
1.36k
        }
433
434
1.36k
        *n = read_count;
435
1.36k
        return Status::OK();
436
1.36k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
29.7k
                          MutableColumnPtr& dst) override {
411
29.7k
        DCHECK(_parsed);
412
29.7k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
29.7k
        auto total = *n;
418
29.7k
        auto read_count = 0;
419
29.7k
        _buffer.resize(total);
420
6.86M
        for (size_t i = 0; i < total; ++i) {
421
6.83M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
6.83M
            if (UNLIKELY(ord >= _num_elements)) {
423
884
                break;
424
884
            }
425
426
6.83M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
6.83M
        }
428
429
29.7k
        if (LIKELY(read_count > 0)) {
430
29.7k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
29.7k
                                                   read_count, *dst);
432
29.7k
        }
433
434
29.7k
        *n = read_count;
435
29.7k
        return Status::OK();
436
29.7k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
32.8k
                          MutableColumnPtr& dst) override {
411
32.8k
        DCHECK(_parsed);
412
32.8k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
32.8k
        auto total = *n;
418
32.8k
        auto read_count = 0;
419
32.8k
        _buffer.resize(total);
420
10.4M
        for (size_t i = 0; i < total; ++i) {
421
10.4M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
10.4M
            if (UNLIKELY(ord >= _num_elements)) {
423
162
                break;
424
162
            }
425
426
10.4M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
10.4M
        }
428
429
32.8k
        if (LIKELY(read_count > 0)) {
430
32.8k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
32.8k
                                                   read_count, *dst);
432
32.8k
        }
433
434
32.8k
        *n = read_count;
435
32.8k
        return Status::OK();
436
32.8k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
1.23k
                          MutableColumnPtr& dst) override {
411
1.23k
        DCHECK(_parsed);
412
1.23k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
1.23k
        auto total = *n;
418
1.23k
        auto read_count = 0;
419
1.23k
        _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.23k
        *n = read_count;
435
1.23k
        return Status::OK();
436
1.23k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
1.80k
                          MutableColumnPtr& dst) override {
411
1.80k
        DCHECK(_parsed);
412
1.80k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
1.80k
        auto total = *n;
418
1.80k
        auto read_count = 0;
419
1.80k
        _buffer.resize(total);
420
493k
        for (size_t i = 0; i < total; ++i) {
421
492k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
492k
            if (UNLIKELY(ord >= _num_elements)) {
423
247
                break;
424
247
            }
425
426
491k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
491k
        }
428
429
1.80k
        if (LIKELY(read_count > 0)) {
430
1.80k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
1.80k
                                                   read_count, *dst);
432
1.80k
        }
433
434
1.80k
        *n = read_count;
435
1.80k
        return Status::OK();
436
1.80k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
12.3k
                          MutableColumnPtr& dst) override {
411
12.3k
        DCHECK(_parsed);
412
12.3k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
12.3k
        auto total = *n;
418
12.3k
        auto read_count = 0;
419
12.3k
        _buffer.resize(total);
420
26.2k
        for (size_t i = 0; i < total; ++i) {
421
13.9k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
13.9k
            if (UNLIKELY(ord >= _num_elements)) {
423
1
                break;
424
1
            }
425
426
13.9k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
13.9k
        }
428
429
12.3k
        if (LIKELY(read_count > 0)) {
430
12.3k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
12.3k
                                                   read_count, *dst);
432
12.3k
        }
433
434
12.3k
        *n = read_count;
435
12.3k
        return Status::OK();
436
12.3k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
164
                          MutableColumnPtr& dst) override {
411
164
        DCHECK(_parsed);
412
164
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
164
        auto total = *n;
418
164
        auto read_count = 0;
419
164
        _buffer.resize(total);
420
472
        for (size_t i = 0; i < total; ++i) {
421
310
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
310
            if (UNLIKELY(ord >= _num_elements)) {
423
2
                break;
424
2
            }
425
426
308
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
308
        }
428
429
164
        if (LIKELY(read_count > 0)) {
430
164
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
164
                                                   read_count, *dst);
432
164
        }
433
434
164
        *n = read_count;
435
164
        return Status::OK();
436
164
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
4.59k
                          MutableColumnPtr& dst) override {
411
4.59k
        DCHECK(_parsed);
412
4.59k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
4.59k
        auto total = *n;
418
4.59k
        auto read_count = 0;
419
4.59k
        _buffer.resize(total);
420
19.1k
        for (size_t i = 0; i < total; ++i) {
421
14.5k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
14.5k
            if (UNLIKELY(ord >= _num_elements)) {
423
0
                break;
424
0
            }
425
426
14.5k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
14.5k
        }
428
429
4.59k
        if (LIKELY(read_count > 0)) {
430
4.59k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
4.59k
                                                   read_count, *dst);
432
4.59k
        }
433
434
4.59k
        *n = read_count;
435
4.59k
        return Status::OK();
436
4.59k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
410
26.6k
                          MutableColumnPtr& dst) override {
411
26.6k
        DCHECK(_parsed);
412
26.6k
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
26.6k
        auto total = *n;
418
26.6k
        auto read_count = 0;
419
26.6k
        _buffer.resize(total);
420
21.2M
        for (size_t i = 0; i < total; ++i) {
421
21.2M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
21.2M
            if (UNLIKELY(ord >= _num_elements)) {
423
5.30k
                break;
424
5.30k
            }
425
426
21.2M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
21.2M
        }
428
429
26.6k
        if (LIKELY(read_count > 0)) {
430
26.6k
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
26.6k
                                                   read_count, *dst);
432
26.6k
        }
433
434
26.6k
        *n = read_count;
435
26.6k
        return Status::OK();
436
26.6k
    }
_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
9.30M
        for (size_t i = 0; i < total; ++i) {
421
9.28M
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
9.28M
            if (UNLIKELY(ord >= _num_elements)) {
423
716
                break;
424
716
            }
425
426
9.28M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
9.28M
        }
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.98k
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
1.98k
            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
302
                          MutableColumnPtr& dst) override {
411
302
        DCHECK(_parsed);
412
302
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
302
        auto total = *n;
418
302
        auto read_count = 0;
419
302
        _buffer.resize(total);
420
1.00k
        for (size_t i = 0; i < total; ++i) {
421
698
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
698
            if (UNLIKELY(ord >= _num_elements)) {
423
0
                break;
424
0
            }
425
426
698
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
698
        }
428
429
302
        if (LIKELY(read_count > 0)) {
430
302
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
302
                                                   read_count, *dst);
432
302
        }
433
434
302
        *n = read_count;
435
302
        return Status::OK();
436
302
    }
_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
533
                          MutableColumnPtr& dst) override {
411
533
        DCHECK(_parsed);
412
533
        if (*n == 0) [[unlikely]] {
413
0
            *n = 0;
414
0
            return Status::OK();
415
0
        }
416
417
533
        auto total = *n;
418
533
        auto read_count = 0;
419
533
        _buffer.resize(total);
420
1.30k
        for (size_t i = 0; i < total; ++i) {
421
775
            ordinal_t ord = rowids[i] - page_first_ordinal;
422
775
            if (UNLIKELY(ord >= _num_elements)) {
423
3
                break;
424
3
            }
425
426
772
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
427
772
        }
428
429
533
        if (LIKELY(read_count > 0)) {
430
533
            StorageLayout<Type>::storage_to_column(reinterpret_cast<const uint8_t*>(_buffer.data()),
431
533
                                                   read_count, *dst);
432
533
        }
433
434
533
        *n = read_count;
435
533
        return Status::OK();
436
533
    }
437
438
57.5k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
439
57.5k
        return next_batch<false>(n, dst);
440
57.5k
    }
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
57.5k
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
439
57.5k
        return next_batch<false>(n, dst);
440
57.5k
    }
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
4.02M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
444
232k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
444
230k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
444
1.96M
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
444
227k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
444
108k
    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
237k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
444
209k
    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
221k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Line
Count
Source
444
239k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Line
Count
Source
444
14.6k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE13current_indexEv
Line
Count
Source
444
320
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Line
Count
Source
444
208k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Line
Count
Source
444
1.09k
    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.58k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Line
Count
Source
444
4.55k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Line
Count
Source
444
113k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE13current_indexEv
Line
Count
Source
444
368
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE13current_indexEv
Line
Count
Source
444
90
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
Line
Count
Source
444
98
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE13current_indexEv
Line
Count
Source
444
11.6k
    size_t current_index() const override { return _cur_index; }
445
446
122M
    char* get_data(size_t index) const {
447
122M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
122M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
446
2.23M
    char* get_data(size_t index) const {
447
2.23M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
2.23M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
446
625k
    char* get_data(size_t index) const {
447
625k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
625k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
446
27.4M
    char* get_data(size_t index) const {
447
27.4M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
27.4M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
446
27.6M
    char* get_data(size_t index) const {
447
27.6M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
27.6M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
446
1.87M
    char* get_data(size_t index) const {
447
1.87M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
1.87M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
446
9.49M
    char* get_data(size_t index) const {
447
9.49M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
9.49M
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
446
1.20M
    char* get_data(size_t index) const {
447
1.20M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
1.20M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
446
1.98M
    char* get_data(size_t index) const {
447
1.98M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
1.98M
    }
_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
504k
    char* get_data(size_t index) const {
447
504k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
504k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
446
7.20M
    char* get_data(size_t index) const {
447
7.20M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
7.20M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
446
10.5M
    char* get_data(size_t index) const {
447
10.5M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
10.5M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE8get_dataEm
Line
Count
Source
446
5.31k
    char* get_data(size_t index) const {
447
5.31k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
5.31k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
446
493k
    char* get_data(size_t index) const {
447
493k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
493k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
446
21.9k
    char* get_data(size_t index) const {
447
21.9k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
21.9k
    }
_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.6k
    char* get_data(size_t index) const {
447
22.6k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
22.6k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
446
21.3M
    char* get_data(size_t index) const {
447
21.3M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
21.3M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
446
9.30M
    char* get_data(size_t index) const {
447
9.30M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
9.30M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
446
5.20k
    char* get_data(size_t index) const {
447
5.20k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
5.20k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Line
Count
Source
446
1.33k
    char* get_data(size_t index) const {
447
1.33k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
1.33k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
Line
Count
Source
446
1.66k
    char* get_data(size_t index) const {
447
1.66k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
1.66k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE42EE8get_dataEm
Line
Count
Source
446
95.5k
    char* get_data(size_t index) const {
447
95.5k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
448
95.5k
    }
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