Coverage Report

Created: 2026-09-28 21:26

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/storage/segment/bitshuffle_page.h
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#pragma once
19
20
#include <glog/logging.h>
21
22
#include <algorithm>
23
#include <cstddef>
24
#include <cstdint>
25
#include <cstring>
26
#include <ostream>
27
#include <type_traits>
28
29
#include "common/cast_set.h"
30
#include "common/compiler_util.h" // IWYU pragma: keep
31
#include "common/status.h"
32
#include "core/column/column.h"
33
#include "core/data_type/data_type.h"
34
#include "core/types.h"
35
#include "storage/olap_common.h"
36
#include "storage/segment/bitshuffle_wrapper.h"
37
#include "storage/segment/common.h"
38
#include "storage/segment/options.h"
39
#include "storage/segment/page_builder.h"
40
#include "storage/segment/page_decoder.h"
41
#include "storage/types.h"
42
#include "util/alignment.h"
43
#include "util/coding.h"
44
#include "util/faststring.h"
45
#include "util/slice.h"
46
47
namespace doris {
48
namespace segment_v2 {
49
50
enum { BITSHUFFLE_PAGE_HEADER_SIZE = 16 };
51
52
void warn_with_bitshuffle_error(int64_t val);
53
54
// BitshufflePageBuilder bitshuffles and compresses the bits of fixed
55
// size type blocks with lz4.
56
//
57
// The page format is as follows:
58
//
59
// 1. Header: (16 bytes total)
60
//
61
//    <num_elements> [32-bit]
62
//      The number of elements encoded in the page.
63
//
64
//    <compressed_size> [32-bit]
65
//      The post-compression size of the page, including this header.
66
//
67
//    <padded_num_elements> [32-bit]
68
//      Padding is needed to meet the requirements of the bitshuffle
69
//      library such that the input/output is a multiple of 8. Some
70
//      ignored elements are appended to the end of the page if necessary
71
//      to meet this requirement.
72
//
73
//      This header field is the post-padding element count.
74
//
75
//    <elem_size_bytes> [32-bit]
76
//      The size of the elements, in bytes, as actually encoded. In the
77
//      case that all of the data in a page can fit into a smaller
78
//      integer type, then we may choose to encode that smaller type
79
//      to save CPU costs.
80
//
81
//      This is currently only implemented in the UINT32 page type.
82
//
83
//   NOTE: all on-disk ints are encoded little-endian
84
//
85
// 2. Element data
86
//
87
//    The header is followed by the bitshuffle-compressed element data.
88
//
89
template <FieldType Type>
90
class BitshufflePageBuilder : public PageBuilderHelper<BitshufflePageBuilder<Type>> {
91
public:
92
    using Self = BitshufflePageBuilder<Type>;
93
    friend class PageBuilderHelper<Self>;
94
95
19.1k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
95
13.7k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
95
862
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
95
29
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
95
51
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
95
140
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
95
1.64k
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
95
118
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
95
107
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
95
925
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4initEv
Line
Count
Source
95
1
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4initEv
Line
Count
Source
95
1
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
95
145
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
95
148
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
95
141
    Status init() override { return reset(); }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE4initEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
95
152
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
95
140
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
95
136
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
95
136
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
95
136
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
95
137
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
95
136
    Status init() override { return reset(); }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
95
136
    Status init() override { return reset(); }
96
97
2.00M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
97
1.97M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
97
13.0k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12is_page_fullEv
Line
Count
Source
97
1.04k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
97
1.06k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Line
Count
Source
97
224
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
97
5.75k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
97
506
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
97
159
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12is_page_fullEv
Line
Count
Source
97
949
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12is_page_fullEv
Line
Count
Source
97
768
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12is_page_fullEv
Line
Count
Source
97
408
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Line
Count
Source
97
157
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Line
Count
Source
97
150
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE12is_page_fullEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Line
Count
Source
97
280
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
Line
Count
Source
97
149
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Line
Count
Source
97
141
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Line
Count
Source
97
141
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Line
Count
Source
97
141
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Line
Count
Source
97
142
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Line
Count
Source
97
141
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
Line
Count
Source
97
141
    bool is_page_full() override { return _remain_element_capacity == 0; }
98
99
661k
    Status add(const uint8_t* vals, size_t* count) override {
100
661k
        return add_internal<false>(vals, count);
101
661k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
99
635k
    Status add(const uint8_t* vals, size_t* count) override {
100
635k
        return add_internal<false>(vals, count);
101
635k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
99
13.0k
    Status add(const uint8_t* vals, size_t* count) override {
100
13.0k
        return add_internal<false>(vals, count);
101
13.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
99
1.04k
    Status add(const uint8_t* vals, size_t* count) override {
100
1.04k
        return add_internal<false>(vals, count);
101
1.04k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
99
1.07k
    Status add(const uint8_t* vals, size_t* count) override {
100
1.07k
        return add_internal<false>(vals, count);
101
1.07k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Line
Count
Source
99
225
    Status add(const uint8_t* vals, size_t* count) override {
100
225
        return add_internal<false>(vals, count);
101
225
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
99
5.75k
    Status add(const uint8_t* vals, size_t* count) override {
100
5.75k
        return add_internal<false>(vals, count);
101
5.75k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
99
506
    Status add(const uint8_t* vals, size_t* count) override {
100
506
        return add_internal<false>(vals, count);
101
506
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
99
159
    Status add(const uint8_t* vals, size_t* count) override {
100
159
        return add_internal<false>(vals, count);
101
159
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE3addEPKhPm
Line
Count
Source
99
949
    Status add(const uint8_t* vals, size_t* count) override {
100
949
        return add_internal<false>(vals, count);
101
949
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE3addEPKhPm
Line
Count
Source
99
768
    Status add(const uint8_t* vals, size_t* count) override {
100
768
        return add_internal<false>(vals, count);
101
768
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Line
Count
Source
99
408
    Status add(const uint8_t* vals, size_t* count) override {
100
408
        return add_internal<false>(vals, count);
101
408
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Line
Count
Source
99
157
    Status add(const uint8_t* vals, size_t* count) override {
100
157
        return add_internal<false>(vals, count);
101
157
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Line
Count
Source
99
150
    Status add(const uint8_t* vals, size_t* count) override {
100
150
        return add_internal<false>(vals, count);
101
150
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE3addEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Line
Count
Source
99
280
    Status add(const uint8_t* vals, size_t* count) override {
100
280
        return add_internal<false>(vals, count);
101
280
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE3addEPKhPm
Line
Count
Source
99
149
    Status add(const uint8_t* vals, size_t* count) override {
100
149
        return add_internal<false>(vals, count);
101
149
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Line
Count
Source
99
141
    Status add(const uint8_t* vals, size_t* count) override {
100
141
        return add_internal<false>(vals, count);
101
141
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Line
Count
Source
99
141
    Status add(const uint8_t* vals, size_t* count) override {
100
141
        return add_internal<false>(vals, count);
101
141
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Line
Count
Source
99
141
    Status add(const uint8_t* vals, size_t* count) override {
100
141
        return add_internal<false>(vals, count);
101
141
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Line
Count
Source
99
142
    Status add(const uint8_t* vals, size_t* count) override {
100
142
        return add_internal<false>(vals, count);
101
142
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Line
Count
Source
99
141
    Status add(const uint8_t* vals, size_t* count) override {
100
141
        return add_internal<false>(vals, count);
101
141
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE3addEPKhPm
Line
Count
Source
99
141
    Status add(const uint8_t* vals, size_t* count) override {
100
141
        return add_internal<false>(vals, count);
101
141
    }
102
103
1.31M
    Status single_add(const uint8_t* vals, size_t* count) {
104
1.31M
        return add_internal<true>(vals, count);
105
1.31M
    }
106
107
    template <bool single>
108
1.97M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
1.97M
        DCHECK(!_finished);
110
1.97M
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
1.97M
        uint32_t to_add = cast_set<UInt32>(
126
1.97M
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
1.97M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
1.97M
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
1.97M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
1.97M
        _count += to_add;
134
1.97M
        _remain_element_capacity -= to_add;
135
1.97M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
1.97M
        *num_written = to_add;
138
1.97M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
1.31M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
1.31M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
1.31M
                        *reinterpret_cast<const uint32_t*>(vals);
149
1.31M
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
1.31M
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
0
        memcpy(&_data[orig_size], vals, to_add_size);
158
1.97M
        return Status::OK();
159
1.97M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
635k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
635k
        DCHECK(!_finished);
110
635k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
635k
        uint32_t to_add = cast_set<UInt32>(
126
635k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
635k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
635k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
635k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
635k
        _count += to_add;
134
635k
        _remain_element_capacity -= to_add;
135
635k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
635k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
635k
        memcpy(&_data[orig_size], vals, to_add_size);
158
635k
        return Status::OK();
159
635k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
13.0k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
13.0k
        DCHECK(!_finished);
110
13.0k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
13.0k
        uint32_t to_add = cast_set<UInt32>(
126
13.0k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
13.0k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
13.0k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
13.0k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
13.0k
        _count += to_add;
134
13.0k
        _remain_element_capacity -= to_add;
135
13.0k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
13.0k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
13.0k
        memcpy(&_data[orig_size], vals, to_add_size);
158
13.0k
        return Status::OK();
159
13.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
1.04k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
1.04k
        DCHECK(!_finished);
110
1.04k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
1.04k
        uint32_t to_add = cast_set<UInt32>(
126
1.04k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
1.04k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
1.04k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
1.04k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
1.04k
        _count += to_add;
134
1.04k
        _remain_element_capacity -= to_add;
135
1.04k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
1.04k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
1.04k
        memcpy(&_data[orig_size], vals, to_add_size);
158
1.04k
        return Status::OK();
159
1.04k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
1.07k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
1.07k
        DCHECK(!_finished);
110
1.07k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
1.07k
        uint32_t to_add = cast_set<UInt32>(
126
1.07k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
1.07k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
1.07k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
1.07k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
1.07k
        _count += to_add;
134
1.07k
        _remain_element_capacity -= to_add;
135
1.07k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
1.07k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
1.07k
        memcpy(&_data[orig_size], vals, to_add_size);
158
1.07k
        return Status::OK();
159
1.07k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
225
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
225
        DCHECK(!_finished);
110
225
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
225
        uint32_t to_add = cast_set<UInt32>(
126
225
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
225
        int to_add_size = to_add * SIZE_OF_TYPE;
129
225
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
225
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
225
        _count += to_add;
134
225
        _remain_element_capacity -= to_add;
135
225
        _raw_data_size += to_add_size;
136
        // return added number through count
137
225
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
225
        memcpy(&_data[orig_size], vals, to_add_size);
158
225
        return Status::OK();
159
225
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE12add_internalILb1EEENS_6StatusEPKhPm
Line
Count
Source
108
1.31M
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
1.31M
        DCHECK(!_finished);
110
1.31M
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
1.31M
        uint32_t to_add = cast_set<UInt32>(
126
1.31M
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
1.31M
        int to_add_size = to_add * SIZE_OF_TYPE;
129
1.31M
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
1.31M
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
1.31M
        _count += to_add;
134
1.31M
        _remain_element_capacity -= to_add;
135
1.31M
        _raw_data_size += to_add_size;
136
        // return added number through count
137
1.31M
        *num_written = to_add;
138
1.31M
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
1.31M
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
1.31M
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
1.31M
                        *reinterpret_cast<const uint32_t*>(vals);
149
1.31M
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
1.31M
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
0
        memcpy(&_data[orig_size], vals, to_add_size);
158
1.31M
        return Status::OK();
159
1.31M
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
5.75k
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
5.75k
        DCHECK(!_finished);
110
5.75k
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
5.75k
        uint32_t to_add = cast_set<UInt32>(
126
5.75k
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
5.75k
        int to_add_size = to_add * SIZE_OF_TYPE;
129
5.75k
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
5.75k
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
5.75k
        _count += to_add;
134
5.75k
        _remain_element_capacity -= to_add;
135
5.75k
        _raw_data_size += to_add_size;
136
        // return added number through count
137
5.75k
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
5.75k
        memcpy(&_data[orig_size], vals, to_add_size);
158
5.75k
        return Status::OK();
159
5.75k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
506
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
506
        DCHECK(!_finished);
110
506
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
506
        uint32_t to_add = cast_set<UInt32>(
126
506
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
506
        int to_add_size = to_add * SIZE_OF_TYPE;
129
506
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
506
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
506
        _count += to_add;
134
506
        _remain_element_capacity -= to_add;
135
506
        _raw_data_size += to_add_size;
136
        // return added number through count
137
506
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
506
        memcpy(&_data[orig_size], vals, to_add_size);
158
506
        return Status::OK();
159
506
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
159
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
159
        DCHECK(!_finished);
110
159
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
159
        uint32_t to_add = cast_set<UInt32>(
126
159
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
159
        int to_add_size = to_add * SIZE_OF_TYPE;
129
159
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
159
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
159
        _count += to_add;
134
159
        _remain_element_capacity -= to_add;
135
159
        _raw_data_size += to_add_size;
136
        // return added number through count
137
159
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
159
        memcpy(&_data[orig_size], vals, to_add_size);
158
159
        return Status::OK();
159
159
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
949
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
949
        DCHECK(!_finished);
110
949
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
949
        uint32_t to_add = cast_set<UInt32>(
126
949
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
949
        int to_add_size = to_add * SIZE_OF_TYPE;
129
949
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
949
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
949
        _count += to_add;
134
949
        _remain_element_capacity -= to_add;
135
949
        _raw_data_size += to_add_size;
136
        // return added number through count
137
949
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
949
        memcpy(&_data[orig_size], vals, to_add_size);
158
949
        return Status::OK();
159
949
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
768
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
768
        DCHECK(!_finished);
110
768
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
768
        uint32_t to_add = cast_set<UInt32>(
126
768
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
768
        int to_add_size = to_add * SIZE_OF_TYPE;
129
768
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
768
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
768
        _count += to_add;
134
768
        _remain_element_capacity -= to_add;
135
768
        _raw_data_size += to_add_size;
136
        // return added number through count
137
768
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
768
        memcpy(&_data[orig_size], vals, to_add_size);
158
768
        return Status::OK();
159
768
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
408
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
408
        DCHECK(!_finished);
110
408
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
408
        uint32_t to_add = cast_set<UInt32>(
126
408
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
408
        int to_add_size = to_add * SIZE_OF_TYPE;
129
408
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
408
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
408
        _count += to_add;
134
408
        _remain_element_capacity -= to_add;
135
408
        _raw_data_size += to_add_size;
136
        // return added number through count
137
408
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
408
        memcpy(&_data[orig_size], vals, to_add_size);
158
408
        return Status::OK();
159
408
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
157
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
157
        DCHECK(!_finished);
110
157
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
157
        uint32_t to_add = cast_set<UInt32>(
126
157
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
157
        int to_add_size = to_add * SIZE_OF_TYPE;
129
157
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
157
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
157
        _count += to_add;
134
157
        _remain_element_capacity -= to_add;
135
157
        _raw_data_size += to_add_size;
136
        // return added number through count
137
157
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
157
        memcpy(&_data[orig_size], vals, to_add_size);
158
157
        return Status::OK();
159
157
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
150
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
150
        DCHECK(!_finished);
110
150
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
150
        uint32_t to_add = cast_set<UInt32>(
126
150
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
150
        int to_add_size = to_add * SIZE_OF_TYPE;
129
150
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
150
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
150
        _count += to_add;
134
150
        _remain_element_capacity -= to_add;
135
150
        _raw_data_size += to_add_size;
136
        // return added number through count
137
150
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
150
        memcpy(&_data[orig_size], vals, to_add_size);
158
150
        return Status::OK();
159
150
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE12add_internalILb0EEENS_6StatusEPKhPm
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
280
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
280
        DCHECK(!_finished);
110
280
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
280
        uint32_t to_add = cast_set<UInt32>(
126
280
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
280
        int to_add_size = to_add * SIZE_OF_TYPE;
129
280
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
280
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
280
        _count += to_add;
134
280
        _remain_element_capacity -= to_add;
135
280
        _raw_data_size += to_add_size;
136
        // return added number through count
137
280
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
280
        memcpy(&_data[orig_size], vals, to_add_size);
158
280
        return Status::OK();
159
280
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
149
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
149
        DCHECK(!_finished);
110
149
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
149
        uint32_t to_add = cast_set<UInt32>(
126
149
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
149
        int to_add_size = to_add * SIZE_OF_TYPE;
129
149
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
149
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
149
        _count += to_add;
134
149
        _remain_element_capacity -= to_add;
135
149
        _raw_data_size += to_add_size;
136
        // return added number through count
137
149
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
149
        memcpy(&_data[orig_size], vals, to_add_size);
158
149
        return Status::OK();
159
149
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
141
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
141
        DCHECK(!_finished);
110
141
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
141
        uint32_t to_add = cast_set<UInt32>(
126
141
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
141
        int to_add_size = to_add * SIZE_OF_TYPE;
129
141
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
141
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
141
        _count += to_add;
134
141
        _remain_element_capacity -= to_add;
135
141
        _raw_data_size += to_add_size;
136
        // return added number through count
137
141
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
141
        memcpy(&_data[orig_size], vals, to_add_size);
158
141
        return Status::OK();
159
141
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
141
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
141
        DCHECK(!_finished);
110
141
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
141
        uint32_t to_add = cast_set<UInt32>(
126
141
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
141
        int to_add_size = to_add * SIZE_OF_TYPE;
129
141
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
141
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
141
        _count += to_add;
134
141
        _remain_element_capacity -= to_add;
135
141
        _raw_data_size += to_add_size;
136
        // return added number through count
137
141
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
141
        memcpy(&_data[orig_size], vals, to_add_size);
158
141
        return Status::OK();
159
141
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
141
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
141
        DCHECK(!_finished);
110
141
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
141
        uint32_t to_add = cast_set<UInt32>(
126
141
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
141
        int to_add_size = to_add * SIZE_OF_TYPE;
129
141
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
141
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
141
        _count += to_add;
134
141
        _remain_element_capacity -= to_add;
135
141
        _raw_data_size += to_add_size;
136
        // return added number through count
137
141
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
141
        memcpy(&_data[orig_size], vals, to_add_size);
158
141
        return Status::OK();
159
141
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
142
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
142
        DCHECK(!_finished);
110
142
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
142
        uint32_t to_add = cast_set<UInt32>(
126
142
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
142
        int to_add_size = to_add * SIZE_OF_TYPE;
129
142
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
142
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
142
        _count += to_add;
134
142
        _remain_element_capacity -= to_add;
135
142
        _raw_data_size += to_add_size;
136
        // return added number through count
137
142
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
142
        memcpy(&_data[orig_size], vals, to_add_size);
158
142
        return Status::OK();
159
142
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
141
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
141
        DCHECK(!_finished);
110
141
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
141
        uint32_t to_add = cast_set<UInt32>(
126
141
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
141
        int to_add_size = to_add * SIZE_OF_TYPE;
129
141
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
141
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
141
        _count += to_add;
134
141
        _remain_element_capacity -= to_add;
135
141
        _raw_data_size += to_add_size;
136
        // return added number through count
137
141
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
141
        memcpy(&_data[orig_size], vals, to_add_size);
158
141
        return Status::OK();
159
141
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE12add_internalILb0EEENS_6StatusEPKhPm
Line
Count
Source
108
141
    inline Status add_internal(const uint8_t* vals, size_t* num_written) {
109
141
        DCHECK(!_finished);
110
141
        if (_remain_element_capacity == 0) {
111
0
            *num_written = 0;
112
0
            return Status::OK();
113
0
        }
114
115
        // When increasing the size of the memtabl flush threshold to a very large value, for example 15GB.
116
        // the row count of a single men tbl could be very large.
117
        // a real log:
118
        /*
119
        I20250823 19:01:16.153575 2982018 memtable_flush_executor.cpp:185] begin to flush memtable for tablet: 1755915952737, memsize: 15.11 GB, rows: 3751968
120
        */
121
        // This is not a very wide table, actually it just has two columns, int and array<float>
122
        // The write process of column array has two steps: write nested column(column float here), and write offsets column.
123
        // The row count of column array is 3751968, which is not that big, but each row of column array has 768 float numbers (this is a common case in vector search scenario).
124
        // so the row num of nested column float will be 3751968 * 768 = 2,881,511,424, which is bigger than INT32_MAX.
125
141
        uint32_t to_add = cast_set<UInt32>(
126
141
                std::min(cast_set<size_t>(_remain_element_capacity), *num_written));
127
        // Max value of to_add_size is less than STORAGE_PAGE_SIZE_DEFAULT_VALUE
128
141
        int to_add_size = to_add * SIZE_OF_TYPE;
129
141
        size_t orig_size = _data.size();
130
        // This may need a large memory, should return error if could not allocated
131
        // successfully, to avoid BE OOM.
132
141
        RETURN_IF_CATCH_EXCEPTION(_data.resize(orig_size + to_add_size));
133
141
        _count += to_add;
134
141
        _remain_element_capacity -= to_add;
135
141
        _raw_data_size += to_add_size;
136
        // return added number through count
137
141
        *num_written = to_add;
138
        if constexpr (single) {
139
            if constexpr (SIZE_OF_TYPE == 1) {
140
                _data[orig_size] = *vals;
141
                return Status::OK();
142
            } else if constexpr (SIZE_OF_TYPE == 2) {
143
                *reinterpret_cast<uint16_t*>(&_data[orig_size]) =
144
                        *reinterpret_cast<const uint16_t*>(vals);
145
                return Status::OK();
146
            } else if constexpr (SIZE_OF_TYPE == 4) {
147
                *reinterpret_cast<uint32_t*>(&_data[orig_size]) =
148
                        *reinterpret_cast<const uint32_t*>(vals);
149
                return Status::OK();
150
            } else if constexpr (SIZE_OF_TYPE == 8) {
151
                *reinterpret_cast<uint64_t*>(&_data[orig_size]) =
152
                        *reinterpret_cast<const uint64_t*>(vals);
153
                return Status::OK();
154
            }
155
        }
156
        // when single is true and SIZE_OF_TYPE > 8 or single is false
157
141
        memcpy(&_data[orig_size], vals, to_add_size);
158
141
        return Status::OK();
159
141
    }
160
161
19.2k
    Status finish(OwnedSlice* slice) override {
162
19.2k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
19.2k
        return Status::OK();
164
19.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
13.8k
    Status finish(OwnedSlice* slice) override {
162
13.8k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
13.8k
        return Status::OK();
164
13.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
836
    Status finish(OwnedSlice* slice) override {
162
836
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
836
        return Status::OK();
164
836
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
29
    Status finish(OwnedSlice* slice) override {
162
29
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
29
        return Status::OK();
164
29
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
51
    Status finish(OwnedSlice* slice) override {
162
51
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
51
        return Status::OK();
164
51
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
139
    Status finish(OwnedSlice* slice) override {
162
139
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
139
        return Status::OK();
164
139
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
1.65k
    Status finish(OwnedSlice* slice) override {
162
1.65k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
1.65k
        return Status::OK();
164
1.65k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
117
    Status finish(OwnedSlice* slice) override {
162
117
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
117
        return Status::OK();
164
117
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
106
    Status finish(OwnedSlice* slice) override {
162
106
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
106
        return Status::OK();
164
106
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
928
    Status finish(OwnedSlice* slice) override {
162
928
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
928
        return Status::OK();
164
928
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
1
    Status finish(OwnedSlice* slice) override {
162
1
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
1
        return Status::OK();
164
1
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
144
    Status finish(OwnedSlice* slice) override {
162
144
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
144
        return Status::OK();
164
144
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
147
    Status finish(OwnedSlice* slice) override {
162
147
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
147
        return Status::OK();
164
147
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
140
    Status finish(OwnedSlice* slice) override {
162
140
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
140
        return Status::OK();
164
140
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE6finishEPNS_10OwnedSliceE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
151
    Status finish(OwnedSlice* slice) override {
162
151
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
151
        return Status::OK();
164
151
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
139
    Status finish(OwnedSlice* slice) override {
162
139
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
139
        return Status::OK();
164
139
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
135
    Status finish(OwnedSlice* slice) override {
162
135
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
135
        return Status::OK();
164
135
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
135
    Status finish(OwnedSlice* slice) override {
162
135
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
135
        return Status::OK();
164
135
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
135
    Status finish(OwnedSlice* slice) override {
162
135
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
135
        return Status::OK();
164
135
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
136
    Status finish(OwnedSlice* slice) override {
162
136
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
136
        return Status::OK();
164
136
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
135
    Status finish(OwnedSlice* slice) override {
162
135
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
135
        return Status::OK();
164
135
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
Line
Count
Source
161
135
    Status finish(OwnedSlice* slice) override {
162
135
        RETURN_IF_CATCH_EXCEPTION({ *slice = _finish(SIZE_OF_TYPE); });
163
135
        return Status::OK();
164
135
    }
165
166
42.8k
    Status reset() override {
167
42.8k
        RETURN_IF_CATCH_EXCEPTION({
168
42.8k
            size_t block_size = _options.data_page_size;
169
42.8k
            _count = 0;
170
42.8k
            _raw_data_size = 0;
171
42.8k
            _data.clear();
172
42.8k
            _data.reserve(block_size);
173
42.8k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
42.8k
                    << "buffer must be naturally-aligned";
175
42.8k
            _buffer.clear();
176
42.8k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
42.8k
            _finished = false;
178
42.8k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
42.8k
        });
180
42.8k
        return Status::OK();
181
42.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
166
32.0k
    Status reset() override {
167
32.0k
        RETURN_IF_CATCH_EXCEPTION({
168
32.0k
            size_t block_size = _options.data_page_size;
169
32.0k
            _count = 0;
170
32.0k
            _raw_data_size = 0;
171
32.0k
            _data.clear();
172
32.0k
            _data.reserve(block_size);
173
32.0k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
32.0k
                    << "buffer must be naturally-aligned";
175
32.0k
            _buffer.clear();
176
32.0k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
32.0k
            _finished = false;
178
32.0k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
32.0k
        });
180
32.0k
        return Status::OK();
181
32.0k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
166
1.69k
    Status reset() override {
167
1.69k
        RETURN_IF_CATCH_EXCEPTION({
168
1.69k
            size_t block_size = _options.data_page_size;
169
1.69k
            _count = 0;
170
1.69k
            _raw_data_size = 0;
171
1.69k
            _data.clear();
172
1.69k
            _data.reserve(block_size);
173
1.69k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.69k
                    << "buffer must be naturally-aligned";
175
1.69k
            _buffer.clear();
176
1.69k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.69k
            _finished = false;
178
1.69k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.69k
        });
180
1.69k
        return Status::OK();
181
1.69k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
166
56
    Status reset() override {
167
56
        RETURN_IF_CATCH_EXCEPTION({
168
56
            size_t block_size = _options.data_page_size;
169
56
            _count = 0;
170
56
            _raw_data_size = 0;
171
56
            _data.clear();
172
56
            _data.reserve(block_size);
173
56
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
56
                    << "buffer must be naturally-aligned";
175
56
            _buffer.clear();
176
56
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
56
            _finished = false;
178
56
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
56
        });
180
56
        return Status::OK();
181
56
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
166
98
    Status reset() override {
167
98
        RETURN_IF_CATCH_EXCEPTION({
168
98
            size_t block_size = _options.data_page_size;
169
98
            _count = 0;
170
98
            _raw_data_size = 0;
171
98
            _data.clear();
172
98
            _data.reserve(block_size);
173
98
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
98
                    << "buffer must be naturally-aligned";
175
98
            _buffer.clear();
176
98
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
98
            _finished = false;
178
98
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
98
        });
180
98
        return Status::OK();
181
98
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5resetEv
Line
Count
Source
166
278
    Status reset() override {
167
278
        RETURN_IF_CATCH_EXCEPTION({
168
278
            size_t block_size = _options.data_page_size;
169
278
            _count = 0;
170
278
            _raw_data_size = 0;
171
278
            _data.clear();
172
278
            _data.reserve(block_size);
173
278
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
278
                    << "buffer must be naturally-aligned";
175
278
            _buffer.clear();
176
278
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
278
            _finished = false;
178
278
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
278
        });
180
278
        return Status::OK();
181
278
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
166
3.29k
    Status reset() override {
167
3.29k
        RETURN_IF_CATCH_EXCEPTION({
168
3.29k
            size_t block_size = _options.data_page_size;
169
3.29k
            _count = 0;
170
3.29k
            _raw_data_size = 0;
171
3.29k
            _data.clear();
172
3.29k
            _data.reserve(block_size);
173
3.29k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
3.29k
                    << "buffer must be naturally-aligned";
175
3.29k
            _buffer.clear();
176
3.29k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
3.29k
            _finished = false;
178
3.29k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
3.29k
        });
180
3.29k
        return Status::OK();
181
3.29k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
166
235
    Status reset() override {
167
235
        RETURN_IF_CATCH_EXCEPTION({
168
235
            size_t block_size = _options.data_page_size;
169
235
            _count = 0;
170
235
            _raw_data_size = 0;
171
235
            _data.clear();
172
235
            _data.reserve(block_size);
173
235
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
235
                    << "buffer must be naturally-aligned";
175
235
            _buffer.clear();
176
235
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
235
            _finished = false;
178
235
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
235
        });
180
235
        return Status::OK();
181
235
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
166
213
    Status reset() override {
167
213
        RETURN_IF_CATCH_EXCEPTION({
168
213
            size_t block_size = _options.data_page_size;
169
213
            _count = 0;
170
213
            _raw_data_size = 0;
171
213
            _data.clear();
172
213
            _data.reserve(block_size);
173
213
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
213
                    << "buffer must be naturally-aligned";
175
213
            _buffer.clear();
176
213
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
213
            _finished = false;
178
213
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
213
        });
180
213
        return Status::OK();
181
213
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5resetEv
Line
Count
Source
166
1.85k
    Status reset() override {
167
1.85k
        RETURN_IF_CATCH_EXCEPTION({
168
1.85k
            size_t block_size = _options.data_page_size;
169
1.85k
            _count = 0;
170
1.85k
            _raw_data_size = 0;
171
1.85k
            _data.clear();
172
1.85k
            _data.reserve(block_size);
173
1.85k
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1.85k
                    << "buffer must be naturally-aligned";
175
1.85k
            _buffer.clear();
176
1.85k
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1.85k
            _finished = false;
178
1.85k
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1.85k
        });
180
1.85k
        return Status::OK();
181
1.85k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5resetEv
Line
Count
Source
166
1
    Status reset() override {
167
1
        RETURN_IF_CATCH_EXCEPTION({
168
1
            size_t block_size = _options.data_page_size;
169
1
            _count = 0;
170
1
            _raw_data_size = 0;
171
1
            _data.clear();
172
1
            _data.reserve(block_size);
173
1
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
1
                    << "buffer must be naturally-aligned";
175
1
            _buffer.clear();
176
1
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
1
            _finished = false;
178
1
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
1
        });
180
1
        return Status::OK();
181
1
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5resetEv
Line
Count
Source
166
2
    Status reset() override {
167
2
        RETURN_IF_CATCH_EXCEPTION({
168
2
            size_t block_size = _options.data_page_size;
169
2
            _count = 0;
170
2
            _raw_data_size = 0;
171
2
            _data.clear();
172
2
            _data.reserve(block_size);
173
2
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
2
                    << "buffer must be naturally-aligned";
175
2
            _buffer.clear();
176
2
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
2
            _finished = false;
178
2
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
2
        });
180
2
        return Status::OK();
181
2
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5resetEv
Line
Count
Source
166
289
    Status reset() override {
167
289
        RETURN_IF_CATCH_EXCEPTION({
168
289
            size_t block_size = _options.data_page_size;
169
289
            _count = 0;
170
289
            _raw_data_size = 0;
171
289
            _data.clear();
172
289
            _data.reserve(block_size);
173
289
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
289
                    << "buffer must be naturally-aligned";
175
289
            _buffer.clear();
176
289
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
289
            _finished = false;
178
289
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
289
        });
180
289
        return Status::OK();
181
289
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5resetEv
Line
Count
Source
166
295
    Status reset() override {
167
295
        RETURN_IF_CATCH_EXCEPTION({
168
295
            size_t block_size = _options.data_page_size;
169
295
            _count = 0;
170
295
            _raw_data_size = 0;
171
295
            _data.clear();
172
295
            _data.reserve(block_size);
173
295
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
295
                    << "buffer must be naturally-aligned";
175
295
            _buffer.clear();
176
295
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
295
            _finished = false;
178
295
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
295
        });
180
295
        return Status::OK();
181
295
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5resetEv
Line
Count
Source
166
281
    Status reset() override {
167
281
        RETURN_IF_CATCH_EXCEPTION({
168
281
            size_t block_size = _options.data_page_size;
169
281
            _count = 0;
170
281
            _raw_data_size = 0;
171
281
            _data.clear();
172
281
            _data.reserve(block_size);
173
281
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
281
                    << "buffer must be naturally-aligned";
175
281
            _buffer.clear();
176
281
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
281
            _finished = false;
178
281
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
281
        });
180
281
        return Status::OK();
181
281
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE5resetEv
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5resetEv
Line
Count
Source
166
303
    Status reset() override {
167
303
        RETURN_IF_CATCH_EXCEPTION({
168
303
            size_t block_size = _options.data_page_size;
169
303
            _count = 0;
170
303
            _raw_data_size = 0;
171
303
            _data.clear();
172
303
            _data.reserve(block_size);
173
303
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
303
                    << "buffer must be naturally-aligned";
175
303
            _buffer.clear();
176
303
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
303
            _finished = false;
178
303
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
303
        });
180
303
        return Status::OK();
181
303
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5resetEv
Line
Count
Source
166
279
    Status reset() override {
167
279
        RETURN_IF_CATCH_EXCEPTION({
168
279
            size_t block_size = _options.data_page_size;
169
279
            _count = 0;
170
279
            _raw_data_size = 0;
171
279
            _data.clear();
172
279
            _data.reserve(block_size);
173
279
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
279
                    << "buffer must be naturally-aligned";
175
279
            _buffer.clear();
176
279
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
279
            _finished = false;
178
279
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
279
        });
180
279
        return Status::OK();
181
279
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5resetEv
Line
Count
Source
166
271
    Status reset() override {
167
271
        RETURN_IF_CATCH_EXCEPTION({
168
271
            size_t block_size = _options.data_page_size;
169
271
            _count = 0;
170
271
            _raw_data_size = 0;
171
271
            _data.clear();
172
271
            _data.reserve(block_size);
173
271
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
271
                    << "buffer must be naturally-aligned";
175
271
            _buffer.clear();
176
271
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
271
            _finished = false;
178
271
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
271
        });
180
271
        return Status::OK();
181
271
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5resetEv
Line
Count
Source
166
271
    Status reset() override {
167
271
        RETURN_IF_CATCH_EXCEPTION({
168
271
            size_t block_size = _options.data_page_size;
169
271
            _count = 0;
170
271
            _raw_data_size = 0;
171
271
            _data.clear();
172
271
            _data.reserve(block_size);
173
271
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
271
                    << "buffer must be naturally-aligned";
175
271
            _buffer.clear();
176
271
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
271
            _finished = false;
178
271
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
271
        });
180
271
        return Status::OK();
181
271
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5resetEv
Line
Count
Source
166
271
    Status reset() override {
167
271
        RETURN_IF_CATCH_EXCEPTION({
168
271
            size_t block_size = _options.data_page_size;
169
271
            _count = 0;
170
271
            _raw_data_size = 0;
171
271
            _data.clear();
172
271
            _data.reserve(block_size);
173
271
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
271
                    << "buffer must be naturally-aligned";
175
271
            _buffer.clear();
176
271
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
271
            _finished = false;
178
271
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
271
        });
180
271
        return Status::OK();
181
271
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5resetEv
Line
Count
Source
166
273
    Status reset() override {
167
273
        RETURN_IF_CATCH_EXCEPTION({
168
273
            size_t block_size = _options.data_page_size;
169
273
            _count = 0;
170
273
            _raw_data_size = 0;
171
273
            _data.clear();
172
273
            _data.reserve(block_size);
173
273
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
273
                    << "buffer must be naturally-aligned";
175
273
            _buffer.clear();
176
273
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
273
            _finished = false;
178
273
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
273
        });
180
273
        return Status::OK();
181
273
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5resetEv
Line
Count
Source
166
271
    Status reset() override {
167
271
        RETURN_IF_CATCH_EXCEPTION({
168
271
            size_t block_size = _options.data_page_size;
169
271
            _count = 0;
170
271
            _raw_data_size = 0;
171
271
            _data.clear();
172
271
            _data.reserve(block_size);
173
271
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
271
                    << "buffer must be naturally-aligned";
175
271
            _buffer.clear();
176
271
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
271
            _finished = false;
178
271
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
271
        });
180
271
        return Status::OK();
181
271
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5resetEv
Line
Count
Source
166
271
    Status reset() override {
167
271
        RETURN_IF_CATCH_EXCEPTION({
168
271
            size_t block_size = _options.data_page_size;
169
271
            _count = 0;
170
271
            _raw_data_size = 0;
171
271
            _data.clear();
172
271
            _data.reserve(block_size);
173
271
            DCHECK_EQ(reinterpret_cast<uintptr_t>(_data.data()) & (alignof(CppType) - 1), 0)
174
271
                    << "buffer must be naturally-aligned";
175
271
            _buffer.clear();
176
271
            _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE);
177
271
            _finished = false;
178
271
            _remain_element_capacity = cast_set<UInt32>(block_size / SIZE_OF_TYPE);
179
271
        });
180
271
        return Status::OK();
181
271
    }
182
183
4
    size_t count() const override { return _count; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
183
4
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE5countEv
184
185
13.5k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
185
9.84k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
185
369
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
185
14
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
185
4
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE4sizeEv
Line
Count
Source
185
104
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
185
1.67k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
185
103
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
185
92
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE4sizeEv
Line
Count
Source
185
148
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE4sizeEv
Line
Count
Source
185
112
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE4sizeEv
Line
Count
Source
185
113
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE4sizeEv
Line
Count
Source
185
106
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE4sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE4sizeEv
Line
Count
Source
185
119
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE4sizeEv
Line
Count
Source
185
106
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE4sizeEv
Line
Count
Source
185
102
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE4sizeEv
Line
Count
Source
185
102
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE4sizeEv
Line
Count
Source
185
102
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE4sizeEv
Line
Count
Source
185
102
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE4sizeEv
Line
Count
Source
185
102
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE4sizeEv
Line
Count
Source
185
102
    uint64_t size() const override { return _buffer.size(); }
186
187
13.5k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
187
8.18k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
187
835
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
187
27
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
187
47
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Line
Count
Source
187
138
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
187
1.65k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
187
117
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
187
106
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE17get_raw_data_sizeEv
Line
Count
Source
187
928
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE17get_raw_data_sizeEv
Line
Count
Source
187
1
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE17get_raw_data_sizeEv
Line
Count
Source
187
144
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Line
Count
Source
187
147
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Line
Count
Source
187
140
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE17get_raw_data_sizeEv
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Line
Count
Source
187
151
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
Line
Count
Source
187
139
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Line
Count
Source
187
135
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Line
Count
Source
187
135
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Line
Count
Source
187
135
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE17get_raw_data_sizeEv
Line
Count
Source
187
136
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Line
Count
Source
187
135
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
Line
Count
Source
187
135
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
188
189
private:
190
    BitshufflePageBuilder(const PageBuilderOptions& options)
191
19.1k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
13.7k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
862
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
29
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
51
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
140
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1.64k
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
118
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
107
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
925
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
1
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
145
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
148
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
141
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EEC2ERKNS0_18PageBuilderOptionsE
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
152
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
140
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
136
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
136
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
136
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
137
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
136
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
191
136
            : _options(options), _count(0), _remain_element_capacity(0), _finished(false) {}
192
193
19.2k
    OwnedSlice _finish(int final_size_of_type) {
194
19.2k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
19.2k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
19.2k
        int padding_elems = num_elems_after_padding - _count;
199
19.2k
        int padding_bytes = padding_elems * final_size_of_type;
200
280k
        for (int i = 0; i < padding_bytes; i++) {
201
261k
            _data.push_back(0);
202
261k
        }
203
204
        // reserve enough place for compression
205
19.2k
        _buffer.resize(
206
19.2k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
19.2k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
19.2k
        int64_t bytes =
210
19.2k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
19.2k
                                         num_elems_after_padding, final_size_of_type, 0);
212
19.2k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
19.2k
        encode_fixed32_le(&_buffer[0], _count);
222
19.2k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
19.2k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
19.2k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
19.2k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
19.2k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
19.2k
        return _buffer.build();
229
19.2k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE5EE7_finishEi
Line
Count
Source
193
13.8k
    OwnedSlice _finish(int final_size_of_type) {
194
13.8k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
13.8k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
13.8k
        int padding_elems = num_elems_after_padding - _count;
199
13.8k
        int padding_bytes = padding_elems * final_size_of_type;
200
125k
        for (int i = 0; i < padding_bytes; i++) {
201
111k
            _data.push_back(0);
202
111k
        }
203
204
        // reserve enough place for compression
205
13.8k
        _buffer.resize(
206
13.8k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
13.8k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
13.8k
        int64_t bytes =
210
13.8k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
13.8k
                                         num_elems_after_padding, final_size_of_type, 0);
212
13.8k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
13.8k
        encode_fixed32_le(&_buffer[0], _count);
222
13.8k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
13.8k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
13.8k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
13.8k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
13.8k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
13.8k
        return _buffer.build();
229
13.8k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE7EE7_finishEi
Line
Count
Source
193
836
    OwnedSlice _finish(int final_size_of_type) {
194
836
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
836
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
836
        int padding_elems = num_elems_after_padding - _count;
199
836
        int padding_bytes = padding_elems * final_size_of_type;
200
23.8k
        for (int i = 0; i < padding_bytes; i++) {
201
23.0k
            _data.push_back(0);
202
23.0k
        }
203
204
        // reserve enough place for compression
205
836
        _buffer.resize(
206
836
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
836
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
836
        int64_t bytes =
210
836
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
836
                                         num_elems_after_padding, final_size_of_type, 0);
212
836
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
836
        encode_fixed32_le(&_buffer[0], _count);
222
836
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
836
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
836
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
836
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
836
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
836
        return _buffer.build();
229
836
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE10EE7_finishEi
Line
Count
Source
193
29
    OwnedSlice _finish(int final_size_of_type) {
194
29
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
29
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
29
        int padding_elems = num_elems_after_padding - _count;
199
29
        int padding_bytes = padding_elems * final_size_of_type;
200
205
        for (int i = 0; i < padding_bytes; i++) {
201
176
            _data.push_back(0);
202
176
        }
203
204
        // reserve enough place for compression
205
29
        _buffer.resize(
206
29
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
29
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
29
        int64_t bytes =
210
29
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
29
                                         num_elems_after_padding, final_size_of_type, 0);
212
29
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
29
        encode_fixed32_le(&_buffer[0], _count);
222
29
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
29
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
29
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
29
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
29
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
29
        return _buffer.build();
229
29
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE11EE7_finishEi
Line
Count
Source
193
51
    OwnedSlice _finish(int final_size_of_type) {
194
51
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
51
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
51
        int padding_elems = num_elems_after_padding - _count;
199
51
        int padding_bytes = padding_elems * final_size_of_type;
200
2.53k
        for (int i = 0; i < padding_bytes; i++) {
201
2.48k
            _data.push_back(0);
202
2.48k
        }
203
204
        // reserve enough place for compression
205
51
        _buffer.resize(
206
51
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
51
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
51
        int64_t bytes =
210
51
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
51
                                         num_elems_after_padding, final_size_of_type, 0);
212
51
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
51
        encode_fixed32_le(&_buffer[0], _count);
222
51
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
51
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
51
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
51
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
51
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
51
        return _buffer.build();
229
51
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE16EE7_finishEi
Line
Count
Source
193
139
    OwnedSlice _finish(int final_size_of_type) {
194
139
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
139
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
139
        int padding_elems = num_elems_after_padding - _count;
199
139
        int padding_bytes = padding_elems * final_size_of_type;
200
8.74k
        for (int i = 0; i < padding_bytes; i++) {
201
8.60k
            _data.push_back(0);
202
8.60k
        }
203
204
        // reserve enough place for compression
205
139
        _buffer.resize(
206
139
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
139
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
139
        int64_t bytes =
210
139
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
139
                                         num_elems_after_padding, final_size_of_type, 0);
212
139
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
139
        encode_fixed32_le(&_buffer[0], _count);
222
139
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
139
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
139
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
139
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
139
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
139
        return _buffer.build();
229
139
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE1EE7_finishEi
Line
Count
Source
193
1.65k
    OwnedSlice _finish(int final_size_of_type) {
194
1.65k
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
1.65k
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
1.65k
        int padding_elems = num_elems_after_padding - _count;
199
1.65k
        int padding_bytes = padding_elems * final_size_of_type;
200
4.41k
        for (int i = 0; i < padding_bytes; i++) {
201
2.76k
            _data.push_back(0);
202
2.76k
        }
203
204
        // reserve enough place for compression
205
1.65k
        _buffer.resize(
206
1.65k
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
1.65k
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
1.65k
        int64_t bytes =
210
1.65k
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
1.65k
                                         num_elems_after_padding, final_size_of_type, 0);
212
1.65k
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
1.65k
        encode_fixed32_le(&_buffer[0], _count);
222
1.65k
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
1.65k
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
1.65k
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
1.65k
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
1.65k
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
1.65k
        return _buffer.build();
229
1.65k
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE3EE7_finishEi
Line
Count
Source
193
117
    OwnedSlice _finish(int final_size_of_type) {
194
117
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
117
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
117
        int padding_elems = num_elems_after_padding - _count;
199
117
        int padding_bytes = padding_elems * final_size_of_type;
200
1.33k
        for (int i = 0; i < padding_bytes; i++) {
201
1.22k
            _data.push_back(0);
202
1.22k
        }
203
204
        // reserve enough place for compression
205
117
        _buffer.resize(
206
117
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
117
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
117
        int64_t bytes =
210
117
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
117
                                         num_elems_after_padding, final_size_of_type, 0);
212
117
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
117
        encode_fixed32_le(&_buffer[0], _count);
222
117
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
117
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
117
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
117
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
117
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
117
        return _buffer.build();
229
117
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE9EE7_finishEi
Line
Count
Source
193
106
    OwnedSlice _finish(int final_size_of_type) {
194
106
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
106
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
106
        int padding_elems = num_elems_after_padding - _count;
199
106
        int padding_bytes = padding_elems * final_size_of_type;
200
8.71k
        for (int i = 0; i < padding_bytes; i++) {
201
8.60k
            _data.push_back(0);
202
8.60k
        }
203
204
        // reserve enough place for compression
205
106
        _buffer.resize(
206
106
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
106
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
106
        int64_t bytes =
210
106
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
106
                                         num_elems_after_padding, final_size_of_type, 0);
212
106
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
106
        encode_fixed32_le(&_buffer[0], _count);
222
106
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
106
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
106
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
106
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
106
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
106
        return _buffer.build();
229
106
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE8EE7_finishEi
Line
Count
Source
193
928
    OwnedSlice _finish(int final_size_of_type) {
194
928
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
928
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
928
        int padding_elems = num_elems_after_padding - _count;
199
928
        int padding_bytes = padding_elems * final_size_of_type;
200
24.3k
        for (int i = 0; i < padding_bytes; i++) {
201
23.4k
            _data.push_back(0);
202
23.4k
        }
203
204
        // reserve enough place for compression
205
928
        _buffer.resize(
206
928
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
928
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
928
        int64_t bytes =
210
928
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
928
                                         num_elems_after_padding, final_size_of_type, 0);
212
928
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
928
        encode_fixed32_le(&_buffer[0], _count);
222
928
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
928
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
928
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
928
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
928
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
928
        return _buffer.build();
229
928
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE6EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE24EE7_finishEi
Line
Count
Source
193
1
    OwnedSlice _finish(int final_size_of_type) {
194
1
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
1
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
1
        int padding_elems = num_elems_after_padding - _count;
199
1
        int padding_bytes = padding_elems * final_size_of_type;
200
1
        for (int i = 0; i < padding_bytes; i++) {
201
0
            _data.push_back(0);
202
0
        }
203
204
        // reserve enough place for compression
205
1
        _buffer.resize(
206
1
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
1
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
1
        int64_t bytes =
210
1
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
1
                                         num_elems_after_padding, final_size_of_type, 0);
212
1
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
1
        encode_fixed32_le(&_buffer[0], _count);
222
1
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
1
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
1
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
1
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
1
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
1
        return _buffer.build();
229
1
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE14EE7_finishEi
Line
Count
Source
193
144
    OwnedSlice _finish(int final_size_of_type) {
194
144
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
144
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
144
        int padding_elems = num_elems_after_padding - _count;
199
144
        int padding_bytes = padding_elems * final_size_of_type;
200
2.38k
        for (int i = 0; i < padding_bytes; i++) {
201
2.24k
            _data.push_back(0);
202
2.24k
        }
203
204
        // reserve enough place for compression
205
144
        _buffer.resize(
206
144
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
144
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
144
        int64_t bytes =
210
144
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
144
                                         num_elems_after_padding, final_size_of_type, 0);
212
144
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
144
        encode_fixed32_le(&_buffer[0], _count);
222
144
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
144
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
144
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
144
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
144
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
144
        return _buffer.build();
229
144
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE28EE7_finishEi
Line
Count
Source
193
147
    OwnedSlice _finish(int final_size_of_type) {
194
147
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
147
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
147
        int padding_elems = num_elems_after_padding - _count;
199
147
        int padding_bytes = padding_elems * final_size_of_type;
200
3.21k
        for (int i = 0; i < padding_bytes; i++) {
201
3.07k
            _data.push_back(0);
202
3.07k
        }
203
204
        // reserve enough place for compression
205
147
        _buffer.resize(
206
147
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
147
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
147
        int64_t bytes =
210
147
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
147
                                         num_elems_after_padding, final_size_of_type, 0);
212
147
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
147
        encode_fixed32_le(&_buffer[0], _count);
222
147
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
147
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
147
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
147
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
147
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
147
        return _buffer.build();
229
147
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE29EE7_finishEi
Line
Count
Source
193
140
    OwnedSlice _finish(int final_size_of_type) {
194
140
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
140
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
140
        int padding_elems = num_elems_after_padding - _count;
199
140
        int padding_bytes = padding_elems * final_size_of_type;
200
5.93k
        for (int i = 0; i < padding_bytes; i++) {
201
5.79k
            _data.push_back(0);
202
5.79k
        }
203
204
        // reserve enough place for compression
205
140
        _buffer.resize(
206
140
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
140
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
140
        int64_t bytes =
210
140
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
140
                                         num_elems_after_padding, final_size_of_type, 0);
212
140
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
140
        encode_fixed32_le(&_buffer[0], _count);
222
140
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
140
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
140
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
140
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
140
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
140
        return _buffer.build();
229
140
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE41EE7_finishEi
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE15EE7_finishEi
Line
Count
Source
193
151
    OwnedSlice _finish(int final_size_of_type) {
194
151
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
151
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
151
        int padding_elems = num_elems_after_padding - _count;
199
151
        int padding_bytes = padding_elems * final_size_of_type;
200
6.47k
        for (int i = 0; i < padding_bytes; i++) {
201
6.32k
            _data.push_back(0);
202
6.32k
        }
203
204
        // reserve enough place for compression
205
151
        _buffer.resize(
206
151
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
151
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
151
        int64_t bytes =
210
151
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
151
                                         num_elems_after_padding, final_size_of_type, 0);
212
151
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
151
        encode_fixed32_le(&_buffer[0], _count);
222
151
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
151
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
151
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
151
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
151
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
151
        return _buffer.build();
229
151
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE40EE7_finishEi
Line
Count
Source
193
139
    OwnedSlice _finish(int final_size_of_type) {
194
139
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
139
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
139
        int padding_elems = num_elems_after_padding - _count;
199
139
        int padding_bytes = padding_elems * final_size_of_type;
200
5.89k
        for (int i = 0; i < padding_bytes; i++) {
201
5.76k
            _data.push_back(0);
202
5.76k
        }
203
204
        // reserve enough place for compression
205
139
        _buffer.resize(
206
139
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
139
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
139
        int64_t bytes =
210
139
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
139
                                         num_elems_after_padding, final_size_of_type, 0);
212
139
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
139
        encode_fixed32_le(&_buffer[0], _count);
222
139
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
139
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
139
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
139
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
139
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
139
        return _buffer.build();
229
139
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE31EE7_finishEi
Line
Count
Source
193
135
    OwnedSlice _finish(int final_size_of_type) {
194
135
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
135
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
135
        int padding_elems = num_elems_after_padding - _count;
199
135
        int padding_bytes = padding_elems * final_size_of_type;
200
2.91k
        for (int i = 0; i < padding_bytes; i++) {
201
2.78k
            _data.push_back(0);
202
2.78k
        }
203
204
        // reserve enough place for compression
205
135
        _buffer.resize(
206
135
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
135
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
135
        int64_t bytes =
210
135
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
135
                                         num_elems_after_padding, final_size_of_type, 0);
212
135
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
135
        encode_fixed32_le(&_buffer[0], _count);
222
135
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
135
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
135
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
135
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
135
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
135
        return _buffer.build();
229
135
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE32EE7_finishEi
Line
Count
Source
193
135
    OwnedSlice _finish(int final_size_of_type) {
194
135
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
135
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
135
        int padding_elems = num_elems_after_padding - _count;
199
135
        int padding_bytes = padding_elems * final_size_of_type;
200
5.70k
        for (int i = 0; i < padding_bytes; i++) {
201
5.56k
            _data.push_back(0);
202
5.56k
        }
203
204
        // reserve enough place for compression
205
135
        _buffer.resize(
206
135
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
135
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
135
        int64_t bytes =
210
135
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
135
                                         num_elems_after_padding, final_size_of_type, 0);
212
135
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
135
        encode_fixed32_le(&_buffer[0], _count);
222
135
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
135
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
135
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
135
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
135
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
135
        return _buffer.build();
229
135
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE33EE7_finishEi
Line
Count
Source
193
135
    OwnedSlice _finish(int final_size_of_type) {
194
135
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
135
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
135
        int padding_elems = num_elems_after_padding - _count;
199
135
        int padding_bytes = padding_elems * final_size_of_type;
200
11.2k
        for (int i = 0; i < padding_bytes; i++) {
201
11.1k
            _data.push_back(0);
202
11.1k
        }
203
204
        // reserve enough place for compression
205
135
        _buffer.resize(
206
135
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
135
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
135
        int64_t bytes =
210
135
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
135
                                         num_elems_after_padding, final_size_of_type, 0);
212
135
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
135
        encode_fixed32_le(&_buffer[0], _count);
222
135
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
135
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
135
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
135
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
135
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
135
        return _buffer.build();
229
135
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE37EE7_finishEi
Line
Count
Source
193
136
    OwnedSlice _finish(int final_size_of_type) {
194
136
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
136
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
136
        int padding_elems = num_elems_after_padding - _count;
199
136
        int padding_bytes = padding_elems * final_size_of_type;
200
22.6k
        for (int i = 0; i < padding_bytes; i++) {
201
22.4k
            _data.push_back(0);
202
22.4k
        }
203
204
        // reserve enough place for compression
205
136
        _buffer.resize(
206
136
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
136
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
136
        int64_t bytes =
210
136
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
136
                                         num_elems_after_padding, final_size_of_type, 0);
212
136
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
136
        encode_fixed32_le(&_buffer[0], _count);
222
136
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
136
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
136
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
136
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
136
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
136
        return _buffer.build();
229
136
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE38EE7_finishEi
Line
Count
Source
193
135
    OwnedSlice _finish(int final_size_of_type) {
194
135
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
135
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
135
        int padding_elems = num_elems_after_padding - _count;
199
135
        int padding_bytes = padding_elems * final_size_of_type;
200
2.91k
        for (int i = 0; i < padding_bytes; i++) {
201
2.78k
            _data.push_back(0);
202
2.78k
        }
203
204
        // reserve enough place for compression
205
135
        _buffer.resize(
206
135
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
135
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
135
        int64_t bytes =
210
135
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
135
                                         num_elems_after_padding, final_size_of_type, 0);
212
135
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
135
        encode_fixed32_le(&_buffer[0], _count);
222
135
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
135
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
135
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
135
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
135
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
135
        return _buffer.build();
229
135
    }
_ZN5doris10segment_v221BitshufflePageBuilderILNS_9FieldTypeE39EE7_finishEi
Line
Count
Source
193
135
    OwnedSlice _finish(int final_size_of_type) {
194
135
        _data.resize(final_size_of_type * _count);
195
196
        // Do padding so that the input num of element is multiple of 8.
197
135
        int num_elems_after_padding = ALIGN_UP(_count, 8);
198
135
        int padding_elems = num_elems_after_padding - _count;
199
135
        int padding_bytes = padding_elems * final_size_of_type;
200
11.2k
        for (int i = 0; i < padding_bytes; i++) {
201
11.1k
            _data.push_back(0);
202
11.1k
        }
203
204
        // reserve enough place for compression
205
135
        _buffer.resize(
206
135
                BITSHUFFLE_PAGE_HEADER_SIZE +
207
135
                bitshuffle::compress_lz4_bound(num_elems_after_padding, final_size_of_type, 0));
208
209
135
        int64_t bytes =
210
135
                bitshuffle::compress_lz4(_data.data(), &_buffer[BITSHUFFLE_PAGE_HEADER_SIZE],
211
135
                                         num_elems_after_padding, final_size_of_type, 0);
212
135
        if (bytes < 0) [[unlikely]] {
213
            // This means the bitshuffle function fails.
214
            // Ideally, this should not happen.
215
0
            warn_with_bitshuffle_error(bytes);
216
            // It does not matter what will be returned here,
217
            // since we have logged fatal in warn_with_bitshuffle_error().
218
0
            return OwnedSlice();
219
0
        }
220
        // update header
221
135
        encode_fixed32_le(&_buffer[0], _count);
222
135
        encode_fixed32_le(&_buffer[4], cast_set<uint32_t>(BITSHUFFLE_PAGE_HEADER_SIZE + bytes));
223
135
        encode_fixed32_le(&_buffer[8], num_elems_after_padding);
224
135
        encode_fixed32_le(&_buffer[12], final_size_of_type);
225
135
        _finished = true;
226
        // before build(), update buffer length to the actual compressed size
227
135
        _buffer.resize(BITSHUFFLE_PAGE_HEADER_SIZE + bytes);
228
135
        return _buffer.build();
229
135
    }
230
231
    using CppType = typename TypeTraits<Type>::CppType;
232
233
    CppType cell(int idx) const {
234
        DCHECK_GE(idx, 0);
235
        CppType ret;
236
        memcpy(&ret, &_data[idx * SIZE_OF_TYPE], SIZE_OF_TYPE);
237
        return ret;
238
    }
239
240
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
241
    PageBuilderOptions _options;
242
    uint32_t _count;
243
    uint32_t _remain_element_capacity;
244
    bool _finished;
245
    faststring _data;
246
    faststring _buffer;
247
    uint64_t _raw_data_size = 0;
248
};
249
250
inline Status parse_bit_shuffle_header(const Slice& data, size_t& num_elements,
251
                                       size_t& compressed_size, size_t& num_element_after_padding,
252
25.1k
                                       int& size_of_element) {
253
25.1k
    if (data.size < BITSHUFFLE_PAGE_HEADER_SIZE) {
254
0
        return Status::InternalError("file corruption: invalid data size:{}, header size:{}",
255
0
                                     data.size, BITSHUFFLE_PAGE_HEADER_SIZE);
256
0
    }
257
258
25.1k
    num_elements = decode_fixed32_le((const uint8_t*)&data[0]);
259
25.1k
    compressed_size = decode_fixed32_le((const uint8_t*)&data[4]);
260
25.1k
    num_element_after_padding = decode_fixed32_le((const uint8_t*)&data[8]);
261
25.1k
    size_of_element = decode_fixed32_le((const uint8_t*)&data[12]);
262
25.1k
    if (num_element_after_padding != ALIGN_UP(num_elements, 8)) {
263
0
        return Status::InternalError(
264
0
                "num of element information corrupted,"
265
0
                " _num_element_after_padding:{}, _num_elements:{}, expected_padding:{},"
266
0
                " compressed_size:{}, size_of_element:{}, data_size:{}",
267
0
                num_element_after_padding, num_elements, ALIGN_UP(num_elements, 8), compressed_size,
268
0
                size_of_element, data.size);
269
0
    }
270
25.1k
    switch (size_of_element) {
271
2.24k
    case 1:
272
2.30k
    case 2:
273
2.34k
    case 3:
274
22.7k
    case 4:
275
24.9k
    case 8:
276
24.9k
    case 12:
277
25.1k
    case 16:
278
25.1k
    case 32:
279
25.1k
        break;
280
0
    default:
281
0
        return Status::InternalError("invalid size_of_elem:{}", size_of_element);
282
25.1k
    }
283
25.1k
    return Status::OK();
284
25.1k
}
285
286
template <FieldType Type>
287
class BitShufflePageDecoder : public PageDecoder {
288
public:
289
    BitShufflePageDecoder(Slice data, const PageDecoderOptions& options)
290
12.6k
            : _data(data),
291
12.6k
              _options(options),
292
12.6k
              _parsed(false),
293
12.6k
              _num_elements(0),
294
12.6k
              _num_element_after_padding(0),
295
12.6k
              _size_of_element(0),
296
12.6k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
10.1k
            : _data(data),
291
10.1k
              _options(options),
292
10.1k
              _parsed(false),
293
10.1k
              _num_elements(0),
294
10.1k
              _num_element_after_padding(0),
295
10.1k
              _size_of_element(0),
296
10.1k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
434
            : _data(data),
291
434
              _options(options),
292
434
              _parsed(false),
293
434
              _num_elements(0),
294
434
              _num_element_after_padding(0),
295
434
              _size_of_element(0),
296
434
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
7
            : _data(data),
291
7
              _options(options),
292
7
              _parsed(false),
293
7
              _num_elements(0),
294
7
              _num_element_after_padding(0),
295
7
              _size_of_element(0),
296
7
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
18
            : _data(data),
291
18
              _options(options),
292
18
              _parsed(false),
293
18
              _num_elements(0),
294
18
              _num_element_after_padding(0),
295
18
              _size_of_element(0),
296
18
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
24
            : _data(data),
291
24
              _options(options),
292
24
              _parsed(false),
293
24
              _num_elements(0),
294
24
              _num_element_after_padding(0),
295
24
              _size_of_element(0),
296
24
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
1.13k
            : _data(data),
291
1.13k
              _options(options),
292
1.13k
              _parsed(false),
293
1.13k
              _num_elements(0),
294
1.13k
              _num_element_after_padding(0),
295
1.13k
              _size_of_element(0),
296
1.13k
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
27
            : _data(data),
291
27
              _options(options),
292
27
              _parsed(false),
293
27
              _num_elements(0),
294
27
              _num_element_after_padding(0),
295
27
              _size_of_element(0),
296
27
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
22
            : _data(data),
291
22
              _options(options),
292
22
              _parsed(false),
293
22
              _num_elements(0),
294
22
              _num_element_after_padding(0),
295
22
              _size_of_element(0),
296
22
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
547
            : _data(data),
291
547
              _options(options),
292
547
              _parsed(false),
293
547
              _num_elements(0),
294
547
              _num_element_after_padding(0),
295
547
              _size_of_element(0),
296
547
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
2
            : _data(data),
291
2
              _options(options),
292
2
              _parsed(false),
293
2
              _num_elements(0),
294
2
              _num_element_after_padding(0),
295
2
              _size_of_element(0),
296
2
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
22
            : _data(data),
291
22
              _options(options),
292
22
              _parsed(false),
293
22
              _num_elements(0),
294
22
              _num_element_after_padding(0),
295
22
              _size_of_element(0),
296
22
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
26
            : _data(data),
291
26
              _options(options),
292
26
              _parsed(false),
293
26
              _num_elements(0),
294
26
              _num_element_after_padding(0),
295
26
              _size_of_element(0),
296
26
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
21
            : _data(data),
291
21
              _options(options),
292
21
              _parsed(false),
293
21
              _num_elements(0),
294
21
              _num_element_after_padding(0),
295
21
              _size_of_element(0),
296
21
              _cur_index(0) {}
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
27
            : _data(data),
291
27
              _options(options),
292
27
              _parsed(false),
293
27
              _num_elements(0),
294
27
              _num_element_after_padding(0),
295
27
              _size_of_element(0),
296
27
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
20
            : _data(data),
291
20
              _options(options),
292
20
              _parsed(false),
293
20
              _num_elements(0),
294
20
              _num_element_after_padding(0),
295
20
              _size_of_element(0),
296
20
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
20
            : _data(data),
291
20
              _options(options),
292
20
              _parsed(false),
293
20
              _num_elements(0),
294
20
              _num_element_after_padding(0),
295
20
              _size_of_element(0),
296
20
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
20
            : _data(data),
291
20
              _options(options),
292
20
              _parsed(false),
293
20
              _num_elements(0),
294
20
              _num_element_after_padding(0),
295
20
              _size_of_element(0),
296
20
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
20
            : _data(data),
291
20
              _options(options),
292
20
              _parsed(false),
293
20
              _num_elements(0),
294
20
              _num_element_after_padding(0),
295
20
              _size_of_element(0),
296
20
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
20
            : _data(data),
291
20
              _options(options),
292
20
              _parsed(false),
293
20
              _num_elements(0),
294
20
              _num_element_after_padding(0),
295
20
              _size_of_element(0),
296
20
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
20
            : _data(data),
291
20
              _options(options),
292
20
              _parsed(false),
293
20
              _num_elements(0),
294
20
              _num_element_after_padding(0),
295
20
              _size_of_element(0),
296
20
              _cur_index(0) {}
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
290
20
            : _data(data),
291
20
              _options(options),
292
20
              _parsed(false),
293
20
              _num_elements(0),
294
20
              _num_element_after_padding(0),
295
20
              _size_of_element(0),
296
20
              _cur_index(0) {}
297
298
12.6k
    Status init() override {
299
12.6k
        CHECK(!_parsed);
300
12.6k
        size_t unused;
301
12.6k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
12.6k
                                                 _num_element_after_padding, _size_of_element));
303
304
12.6k
        if (_data.size !=
305
12.6k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
13
            std::stringstream ss;
307
13
            ss << "Size information unmatched, _data.size:" << _data.size
308
13
               << ", _num_elements:" << _num_elements << ", expected size is "
309
13
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
13
            return Status::InternalError(ss.str());
311
13
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
12.6k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
12.6k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
12.6k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
12.6k
        _parsed = true;
325
12.6k
        return Status::OK();
326
12.6k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
298
10.1k
    Status init() override {
299
10.1k
        CHECK(!_parsed);
300
10.1k
        size_t unused;
301
10.1k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
10.1k
                                                 _num_element_after_padding, _size_of_element));
303
304
10.1k
        if (_data.size !=
305
10.1k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
5
            std::stringstream ss;
307
5
            ss << "Size information unmatched, _data.size:" << _data.size
308
5
               << ", _num_elements:" << _num_elements << ", expected size is "
309
5
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
5
            return Status::InternalError(ss.str());
311
5
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
10.1k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
10.1k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
10.1k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
10.1k
        _parsed = true;
325
10.1k
        return Status::OK();
326
10.1k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
298
434
    Status init() override {
299
434
        CHECK(!_parsed);
300
434
        size_t unused;
301
434
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
434
                                                 _num_element_after_padding, _size_of_element));
303
304
434
        if (_data.size !=
305
434
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
1
            std::stringstream ss;
307
1
            ss << "Size information unmatched, _data.size:" << _data.size
308
1
               << ", _num_elements:" << _num_elements << ", expected size is "
309
1
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
1
            return Status::InternalError(ss.str());
311
1
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
433
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
433
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
433
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
433
        _parsed = true;
325
433
        return Status::OK();
326
433
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
298
7
    Status init() override {
299
7
        CHECK(!_parsed);
300
7
        size_t unused;
301
7
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
7
                                                 _num_element_after_padding, _size_of_element));
303
304
7
        if (_data.size !=
305
7
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
2
            std::stringstream ss;
307
2
            ss << "Size information unmatched, _data.size:" << _data.size
308
2
               << ", _num_elements:" << _num_elements << ", expected size is "
309
2
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
2
            return Status::InternalError(ss.str());
311
2
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
5
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
5
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
5
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
5
        _parsed = true;
325
5
        return Status::OK();
326
5
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
298
18
    Status init() override {
299
18
        CHECK(!_parsed);
300
18
        size_t unused;
301
18
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
18
                                                 _num_element_after_padding, _size_of_element));
303
304
18
        if (_data.size !=
305
18
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
4
            std::stringstream ss;
307
4
            ss << "Size information unmatched, _data.size:" << _data.size
308
4
               << ", _num_elements:" << _num_elements << ", expected size is "
309
4
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
4
            return Status::InternalError(ss.str());
311
4
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
14
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
14
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
14
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
14
        _parsed = true;
325
14
        return Status::OK();
326
14
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE4initEv
Line
Count
Source
298
24
    Status init() override {
299
24
        CHECK(!_parsed);
300
24
        size_t unused;
301
24
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
24
                                                 _num_element_after_padding, _size_of_element));
303
304
24
        if (_data.size !=
305
24
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
1
            std::stringstream ss;
307
1
            ss << "Size information unmatched, _data.size:" << _data.size
308
1
               << ", _num_elements:" << _num_elements << ", expected size is "
309
1
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
1
            return Status::InternalError(ss.str());
311
1
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
23
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
23
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
23
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
23
        _parsed = true;
325
23
        return Status::OK();
326
23
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
298
1.13k
    Status init() override {
299
1.13k
        CHECK(!_parsed);
300
1.13k
        size_t unused;
301
1.13k
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
1.13k
                                                 _num_element_after_padding, _size_of_element));
303
304
1.13k
        if (_data.size !=
305
1.13k
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
1.13k
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
1.13k
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
1.13k
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
1.13k
        _parsed = true;
325
1.13k
        return Status::OK();
326
1.13k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
298
27
    Status init() override {
299
27
        CHECK(!_parsed);
300
27
        size_t unused;
301
27
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
27
                                                 _num_element_after_padding, _size_of_element));
303
304
27
        if (_data.size !=
305
27
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
27
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
27
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
27
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
27
        _parsed = true;
325
27
        return Status::OK();
326
27
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
298
22
    Status init() override {
299
22
        CHECK(!_parsed);
300
22
        size_t unused;
301
22
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
22
                                                 _num_element_after_padding, _size_of_element));
303
304
22
        if (_data.size !=
305
22
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
22
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
22
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
22
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
22
        _parsed = true;
325
22
        return Status::OK();
326
22
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE4initEv
Line
Count
Source
298
547
    Status init() override {
299
547
        CHECK(!_parsed);
300
547
        size_t unused;
301
547
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
547
                                                 _num_element_after_padding, _size_of_element));
303
304
547
        if (_data.size !=
305
547
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
547
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
547
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
547
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
547
        _parsed = true;
325
547
        return Status::OK();
326
547
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE4initEv
Line
Count
Source
298
2
    Status init() override {
299
2
        CHECK(!_parsed);
300
2
        size_t unused;
301
2
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
2
                                                 _num_element_after_padding, _size_of_element));
303
304
2
        if (_data.size !=
305
2
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
2
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
2
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
2
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
2
        _parsed = true;
325
2
        return Status::OK();
326
2
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE4initEv
Line
Count
Source
298
22
    Status init() override {
299
22
        CHECK(!_parsed);
300
22
        size_t unused;
301
22
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
22
                                                 _num_element_after_padding, _size_of_element));
303
304
22
        if (_data.size !=
305
22
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
22
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
22
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
22
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
22
        _parsed = true;
325
22
        return Status::OK();
326
22
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE4initEv
Line
Count
Source
298
26
    Status init() override {
299
26
        CHECK(!_parsed);
300
26
        size_t unused;
301
26
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
26
                                                 _num_element_after_padding, _size_of_element));
303
304
26
        if (_data.size !=
305
26
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
26
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
26
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
26
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
26
        _parsed = true;
325
26
        return Status::OK();
326
26
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE4initEv
Line
Count
Source
298
21
    Status init() override {
299
21
        CHECK(!_parsed);
300
21
        size_t unused;
301
21
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
21
                                                 _num_element_after_padding, _size_of_element));
303
304
21
        if (_data.size !=
305
21
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
21
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
21
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
21
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
21
        _parsed = true;
325
21
        return Status::OK();
326
21
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE4initEv
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE4initEv
Line
Count
Source
298
27
    Status init() override {
299
27
        CHECK(!_parsed);
300
27
        size_t unused;
301
27
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
27
                                                 _num_element_after_padding, _size_of_element));
303
304
27
        if (_data.size !=
305
27
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
27
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
27
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
27
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
27
        _parsed = true;
325
27
        return Status::OK();
326
27
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE4initEv
Line
Count
Source
298
20
    Status init() override {
299
20
        CHECK(!_parsed);
300
20
        size_t unused;
301
20
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
20
                                                 _num_element_after_padding, _size_of_element));
303
304
20
        if (_data.size !=
305
20
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
20
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
20
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
20
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
20
        _parsed = true;
325
20
        return Status::OK();
326
20
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE4initEv
Line
Count
Source
298
20
    Status init() override {
299
20
        CHECK(!_parsed);
300
20
        size_t unused;
301
20
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
20
                                                 _num_element_after_padding, _size_of_element));
303
304
20
        if (_data.size !=
305
20
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
20
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
20
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
20
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
20
        _parsed = true;
325
20
        return Status::OK();
326
20
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE4initEv
Line
Count
Source
298
20
    Status init() override {
299
20
        CHECK(!_parsed);
300
20
        size_t unused;
301
20
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
20
                                                 _num_element_after_padding, _size_of_element));
303
304
20
        if (_data.size !=
305
20
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
20
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
20
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
20
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
20
        _parsed = true;
325
20
        return Status::OK();
326
20
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE4initEv
Line
Count
Source
298
20
    Status init() override {
299
20
        CHECK(!_parsed);
300
20
        size_t unused;
301
20
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
20
                                                 _num_element_after_padding, _size_of_element));
303
304
20
        if (_data.size !=
305
20
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
20
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
20
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
20
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
20
        _parsed = true;
325
20
        return Status::OK();
326
20
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE4initEv
Line
Count
Source
298
20
    Status init() override {
299
20
        CHECK(!_parsed);
300
20
        size_t unused;
301
20
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
20
                                                 _num_element_after_padding, _size_of_element));
303
304
20
        if (_data.size !=
305
20
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
20
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
20
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
20
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
20
        _parsed = true;
325
20
        return Status::OK();
326
20
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE4initEv
Line
Count
Source
298
20
    Status init() override {
299
20
        CHECK(!_parsed);
300
20
        size_t unused;
301
20
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
20
                                                 _num_element_after_padding, _size_of_element));
303
304
20
        if (_data.size !=
305
20
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
20
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
20
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
20
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
20
        _parsed = true;
325
20
        return Status::OK();
326
20
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE4initEv
Line
Count
Source
298
20
    Status init() override {
299
20
        CHECK(!_parsed);
300
20
        size_t unused;
301
20
        RETURN_IF_ERROR(parse_bit_shuffle_header(_data, _num_elements, unused,
302
20
                                                 _num_element_after_padding, _size_of_element));
303
304
20
        if (_data.size !=
305
20
            _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE) {
306
0
            std::stringstream ss;
307
0
            ss << "Size information unmatched, _data.size:" << _data.size
308
0
               << ", _num_elements:" << _num_elements << ", expected size is "
309
0
               << _num_element_after_padding * _size_of_element + BITSHUFFLE_PAGE_HEADER_SIZE;
310
0
            return Status::InternalError(ss.str());
311
0
        }
312
313
        // Currently, only the UINT32 block encoder supports expanding size:
314
20
        if (UNLIKELY(Type != FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT &&
315
20
                     _size_of_element != SIZE_OF_TYPE)) {
316
0
            return Status::InternalError(
317
0
                    "invalid size info. size of element:{}, SIZE_OF_TYPE:{}, type:{}",
318
0
                    _size_of_element, SIZE_OF_TYPE, Type);
319
0
        }
320
20
        if (UNLIKELY(_size_of_element > SIZE_OF_TYPE)) {
321
0
            return Status::InternalError("invalid size info. size of element:{}, SIZE_OF_TYPE:{}",
322
0
                                         _size_of_element, SIZE_OF_TYPE);
323
0
        }
324
20
        _parsed = true;
325
20
        return Status::OK();
326
20
    }
327
328
    // If the page only contains null, then _num_elements == 0, and the nullmap has
329
    // some value. But in _seek_columns --> seek_to_ordinal --> _seek_to_pos_in_page
330
    // in this call stack it will pass pos == 0 to this method. Although we can add some
331
    // code such as check if the count == 0, then skip seek, but there are other method such
332
    // as init will also call seek with pos == 0. And the seek is useless when _num_elements
333
    // == 0, because next batch will return empty in this method.
334
8.98k
    Status seek_to_position_in_page(size_t pos) override {
335
8.98k
        DCHECK(_parsed) << "Must call init()";
336
8.98k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
8.98k
        DCHECK_LE(pos, _num_elements);
344
8.98k
        _cur_index = pos;
345
8.98k
        return Status::OK();
346
8.98k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
334
5.98k
    Status seek_to_position_in_page(size_t pos) override {
335
5.98k
        DCHECK(_parsed) << "Must call init()";
336
5.98k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
5.98k
        DCHECK_LE(pos, _num_elements);
344
5.98k
        _cur_index = pos;
345
5.98k
        return Status::OK();
346
5.98k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
334
2.04k
    Status seek_to_position_in_page(size_t pos) override {
335
2.04k
        DCHECK(_parsed) << "Must call init()";
336
2.04k
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
2.04k
        DCHECK_LE(pos, _num_elements);
344
2.04k
        _cur_index = pos;
345
2.04k
        return Status::OK();
346
2.04k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
334
100
    Status seek_to_position_in_page(size_t pos) override {
335
100
        DCHECK(_parsed) << "Must call init()";
336
100
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
100
        DCHECK_LE(pos, _num_elements);
344
100
        _cur_index = pos;
345
100
        return Status::OK();
346
100
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
334
300
    Status seek_to_position_in_page(size_t pos) override {
335
300
        DCHECK(_parsed) << "Must call init()";
336
300
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
300
        DCHECK_LE(pos, _num_elements);
344
300
        _cur_index = pos;
345
300
        return Status::OK();
346
300
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
334
462
    Status seek_to_position_in_page(size_t pos) override {
335
462
        DCHECK(_parsed) << "Must call init()";
336
462
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
462
        DCHECK_LE(pos, _num_elements);
344
462
        _cur_index = pos;
345
462
        return Status::OK();
346
462
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
334
1
    Status seek_to_position_in_page(size_t pos) override {
335
1
        DCHECK(_parsed) << "Must call init()";
336
1
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
1
        DCHECK_LE(pos, _num_elements);
344
1
        _cur_index = pos;
345
1
        return Status::OK();
346
1
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE24seek_to_position_in_pageEm
Line
Count
Source
334
94
    Status seek_to_position_in_page(size_t pos) override {
335
94
        DCHECK(_parsed) << "Must call init()";
336
94
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
94
        DCHECK_LE(pos, _num_elements);
344
94
        _cur_index = pos;
345
94
        return Status::OK();
346
94
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Line
Count
Source
334
1
    Status seek_to_position_in_page(size_t pos) override {
335
1
        DCHECK(_parsed) << "Must call init()";
336
1
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
1
        DCHECK_LE(pos, _num_elements);
344
1
        _cur_index = pos;
345
1
        return Status::OK();
346
1
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE24seek_to_position_in_pageEm
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Line
Count
Source
334
1
    Status seek_to_position_in_page(size_t pos) override {
335
1
        DCHECK(_parsed) << "Must call init()";
336
1
        if (_num_elements == 0) [[unlikely]] {
337
0
            if (pos != 0) {
338
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
339
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elements);
340
0
            }
341
0
        }
342
343
1
        DCHECK_LE(pos, _num_elements);
344
1
        _cur_index = pos;
345
1
        return Status::OK();
346
1
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE24seek_to_position_in_pageEm
347
348
15
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
349
15
        DCHECK(_parsed) << "Must call init() firstly";
350
351
15
        if (_num_elements == 0) {
352
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
353
0
        }
354
355
15
        size_t left = 0;
356
15
        size_t right = _num_elements;
357
358
15
        void* mid_value = nullptr;
359
360
        // find the first value >= target. after loop,
361
        // - left == index of first value >= target when found
362
        // - left == _num_elements when not found (all values < target)
363
162
        while (left < right) {
364
147
            size_t mid = left + (right - left) / 2;
365
147
            mid_value = get_data(mid);
366
147
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
367
66
                left = mid + 1;
368
81
            } else {
369
81
                right = mid;
370
81
            }
371
147
        }
372
15
        if (left >= _num_elements) {
373
3
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
374
3
        }
375
12
        void* find_value = get_data(left);
376
12
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
377
9
            *exact_match = true;
378
9
        } else {
379
3
            *exact_match = false;
380
3
        }
381
382
12
        _cur_index = left;
383
12
        return Status::OK();
384
15
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE22seek_at_or_after_valueEPKvPb
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE22seek_at_or_after_valueEPKvPb
Line
Count
Source
348
5
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
349
5
        DCHECK(_parsed) << "Must call init() firstly";
350
351
5
        if (_num_elements == 0) {
352
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
353
0
        }
354
355
5
        size_t left = 0;
356
5
        size_t right = _num_elements;
357
358
5
        void* mid_value = nullptr;
359
360
        // find the first value >= target. after loop,
361
        // - left == index of first value >= target when found
362
        // - left == _num_elements when not found (all values < target)
363
54
        while (left < right) {
364
49
            size_t mid = left + (right - left) / 2;
365
49
            mid_value = get_data(mid);
366
49
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
367
21
                left = mid + 1;
368
28
            } else {
369
28
                right = mid;
370
28
            }
371
49
        }
372
5
        if (left >= _num_elements) {
373
1
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
374
1
        }
375
4
        void* find_value = get_data(left);
376
4
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
377
3
            *exact_match = true;
378
3
        } else {
379
1
            *exact_match = false;
380
1
        }
381
382
4
        _cur_index = left;
383
4
        return Status::OK();
384
5
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE22seek_at_or_after_valueEPKvPb
Line
Count
Source
348
5
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
349
5
        DCHECK(_parsed) << "Must call init() firstly";
350
351
5
        if (_num_elements == 0) {
352
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
353
0
        }
354
355
5
        size_t left = 0;
356
5
        size_t right = _num_elements;
357
358
5
        void* mid_value = nullptr;
359
360
        // find the first value >= target. after loop,
361
        // - left == index of first value >= target when found
362
        // - left == _num_elements when not found (all values < target)
363
54
        while (left < right) {
364
49
            size_t mid = left + (right - left) / 2;
365
49
            mid_value = get_data(mid);
366
49
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
367
21
                left = mid + 1;
368
28
            } else {
369
28
                right = mid;
370
28
            }
371
49
        }
372
5
        if (left >= _num_elements) {
373
1
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
374
1
        }
375
4
        void* find_value = get_data(left);
376
4
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
377
3
            *exact_match = true;
378
3
        } else {
379
1
            *exact_match = false;
380
1
        }
381
382
4
        _cur_index = left;
383
4
        return Status::OK();
384
5
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE22seek_at_or_after_valueEPKvPb
Line
Count
Source
348
5
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
349
5
        DCHECK(_parsed) << "Must call init() firstly";
350
351
5
        if (_num_elements == 0) {
352
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
353
0
        }
354
355
5
        size_t left = 0;
356
5
        size_t right = _num_elements;
357
358
5
        void* mid_value = nullptr;
359
360
        // find the first value >= target. after loop,
361
        // - left == index of first value >= target when found
362
        // - left == _num_elements when not found (all values < target)
363
54
        while (left < right) {
364
49
            size_t mid = left + (right - left) / 2;
365
49
            mid_value = get_data(mid);
366
49
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
367
24
                left = mid + 1;
368
25
            } else {
369
25
                right = mid;
370
25
            }
371
49
        }
372
5
        if (left >= _num_elements) {
373
1
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
374
1
        }
375
4
        void* find_value = get_data(left);
376
4
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
377
3
            *exact_match = true;
378
3
        } else {
379
1
            *exact_match = false;
380
1
        }
381
382
4
        _cur_index = left;
383
4
        return Status::OK();
384
5
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_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
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE22seek_at_or_after_valueEPKvPb
385
386
    template <bool forward_index = true>
387
58.6k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
58.6k
        DCHECK(_parsed);
389
58.6k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
58.6k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
58.6k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
58.6k
        *n = max_fetch;
398
58.6k
        if constexpr (forward_index) {
399
58.0k
            _cur_index += max_fetch;
400
58.0k
        }
401
402
58.6k
        return Status::OK();
403
58.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
44.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
44.8k
        DCHECK(_parsed);
389
44.8k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
44.8k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
44.8k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
44.8k
        *n = max_fetch;
398
44.8k
        if constexpr (forward_index) {
399
44.8k
            _cur_index += max_fetch;
400
44.8k
        }
401
402
44.8k
        return Status::OK();
403
44.8k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
7.45k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
7.45k
        DCHECK(_parsed);
389
7.45k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
7.45k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
7.45k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
7.45k
        *n = max_fetch;
398
7.45k
        if constexpr (forward_index) {
399
7.45k
            _cur_index += max_fetch;
400
7.45k
        }
401
402
7.45k
        return Status::OK();
403
7.45k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
118
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
118
        DCHECK(_parsed);
389
118
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
118
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
118
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
118
        *n = max_fetch;
398
118
        if constexpr (forward_index) {
399
118
            _cur_index += max_fetch;
400
118
        }
401
402
118
        return Status::OK();
403
118
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
327
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
327
        DCHECK(_parsed);
389
327
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
327
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
327
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
327
        *n = max_fetch;
398
327
        if constexpr (forward_index) {
399
327
            _cur_index += max_fetch;
400
327
        }
401
402
327
        return Status::OK();
403
327
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
28
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
28
        DCHECK(_parsed);
389
28
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
28
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
28
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
28
        *n = max_fetch;
398
28
        if constexpr (forward_index) {
399
28
            _cur_index += max_fetch;
400
28
        }
401
402
28
        return Status::OK();
403
28
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
3.48k
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
3.48k
        DCHECK(_parsed);
389
3.48k
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
3.48k
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
3.48k
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
3.48k
        *n = max_fetch;
398
3.48k
        if constexpr (forward_index) {
399
3.48k
            _cur_index += max_fetch;
400
3.48k
        }
401
402
3.48k
        return Status::OK();
403
3.48k
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
277
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
277
        DCHECK(_parsed);
389
277
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
277
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
277
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
277
        *n = max_fetch;
398
277
        if constexpr (forward_index) {
399
277
            _cur_index += max_fetch;
400
277
        }
401
402
277
        return Status::OK();
403
277
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
52
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
52
        DCHECK(_parsed);
389
52
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
52
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
52
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
52
        *n = max_fetch;
398
52
        if constexpr (forward_index) {
399
52
            _cur_index += max_fetch;
400
52
        }
401
402
52
        return Status::OK();
403
52
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
561
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
561
        DCHECK(_parsed);
389
561
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
561
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
561
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
561
        *n = max_fetch;
398
561
        if constexpr (forward_index) {
399
561
            _cur_index += max_fetch;
400
561
        }
401
402
561
        return Status::OK();
403
561
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
540
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
540
        DCHECK(_parsed);
389
540
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
540
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
540
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
540
        *n = max_fetch;
398
        if constexpr (forward_index) {
399
            _cur_index += max_fetch;
400
        }
401
402
540
        return Status::OK();
403
540
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
512
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
512
        DCHECK(_parsed);
389
512
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
512
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
512
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
512
        *n = max_fetch;
398
512
        if constexpr (forward_index) {
399
512
            _cur_index += max_fetch;
400
512
        }
401
402
512
        return Status::OK();
403
512
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
190
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
190
        DCHECK(_parsed);
389
190
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
190
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
190
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
190
        *n = max_fetch;
398
190
        if constexpr (forward_index) {
399
190
            _cur_index += max_fetch;
400
190
        }
401
402
190
        return Status::OK();
403
190
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
21
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
21
        DCHECK(_parsed);
389
21
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
21
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
21
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
21
        *n = max_fetch;
398
21
        if constexpr (forward_index) {
399
21
            _cur_index += max_fetch;
400
21
        }
401
402
21
        return Status::OK();
403
21
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
20
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
20
        DCHECK(_parsed);
389
20
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
20
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
20
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
20
        *n = max_fetch;
398
20
        if constexpr (forward_index) {
399
20
            _cur_index += max_fetch;
400
20
        }
401
402
20
        return Status::OK();
403
20
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
37
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
37
        DCHECK(_parsed);
389
37
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
37
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
37
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
37
        *n = max_fetch;
398
37
        if constexpr (forward_index) {
399
37
            _cur_index += max_fetch;
400
37
        }
401
402
37
        return Status::OK();
403
37
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
20
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
20
        DCHECK(_parsed);
389
20
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
20
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
20
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
20
        *n = max_fetch;
398
20
        if constexpr (forward_index) {
399
20
            _cur_index += max_fetch;
400
20
        }
401
402
20
        return Status::OK();
403
20
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
20
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
20
        DCHECK(_parsed);
389
20
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
20
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
20
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
20
        *n = max_fetch;
398
20
        if constexpr (forward_index) {
399
20
            _cur_index += max_fetch;
400
20
        }
401
402
20
        return Status::OK();
403
20
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
20
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
20
        DCHECK(_parsed);
389
20
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
20
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
20
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
20
        *n = max_fetch;
398
20
        if constexpr (forward_index) {
399
20
            _cur_index += max_fetch;
400
20
        }
401
402
20
        return Status::OK();
403
20
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
20
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
20
        DCHECK(_parsed);
389
20
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
20
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
20
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
20
        *n = max_fetch;
398
20
        if constexpr (forward_index) {
399
20
            _cur_index += max_fetch;
400
20
        }
401
402
20
        return Status::OK();
403
20
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
20
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
20
        DCHECK(_parsed);
389
20
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
20
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
20
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
20
        *n = max_fetch;
398
20
        if constexpr (forward_index) {
399
20
            _cur_index += max_fetch;
400
20
        }
401
402
20
        return Status::OK();
403
20
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
20
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
20
        DCHECK(_parsed);
389
20
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
20
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
20
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
20
        *n = max_fetch;
398
20
        if constexpr (forward_index) {
399
20
            _cur_index += max_fetch;
400
20
        }
401
402
20
        return Status::OK();
403
20
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb1EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
387
20
    Status next_batch(size_t* n, MutableColumnPtr& dst) {
388
20
        DCHECK(_parsed);
389
20
        if (*n == 0 || _cur_index >= _num_elements) [[unlikely]] {
390
0
            *n = 0;
391
0
            return Status::OK();
392
0
        }
393
394
20
        size_t max_fetch = std::min(*n, _num_elements - _cur_index);
395
396
20
        dst->insert_many_fix_len_data(get_data(_cur_index), max_fetch);
397
20
        *n = max_fetch;
398
20
        if constexpr (forward_index) {
399
20
            _cur_index += max_fetch;
400
20
        }
401
402
20
        return Status::OK();
403
20
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchILb0EEENS_6StatusEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
404
405
58.0k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
44.8k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
7.45k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
118
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
327
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
28
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
3.48k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
277
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
52
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
561
    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_9FieldTypeE24EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
512
    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
405
190
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
21
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
20
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
37
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
20
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
20
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
20
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
20
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
20
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
20
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
405
20
    Status next_batch(size_t* n, MutableColumnPtr& dst) override { return next_batch<>(n, dst); }
406
407
    Status read_by_rowids(const rowid_t* rowids, ordinal_t page_first_ordinal, size_t* n,
408
3.64k
                          MutableColumnPtr& dst) override {
409
3.64k
        DCHECK(_parsed);
410
3.64k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
3.64k
        auto total = *n;
416
3.64k
        auto read_count = 0;
417
3.64k
        _buffer.resize(total);
418
3.32M
        for (size_t i = 0; i < total; ++i) {
419
3.32M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
3.32M
            if (UNLIKELY(ord >= _num_elements)) {
421
17
                break;
422
17
            }
423
424
3.32M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
3.32M
        }
426
427
3.64k
        if (LIKELY(read_count > 0)) {
428
3.64k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
3.64k
        }
430
431
3.64k
        *n = read_count;
432
3.64k
        return Status::OK();
433
3.64k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
2.53k
                          MutableColumnPtr& dst) override {
409
2.53k
        DCHECK(_parsed);
410
2.53k
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
2.53k
        auto total = *n;
416
2.53k
        auto read_count = 0;
417
2.53k
        _buffer.resize(total);
418
2.76M
        for (size_t i = 0; i < total; ++i) {
419
2.76M
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
2.76M
            if (UNLIKELY(ord >= _num_elements)) {
421
9
                break;
422
9
            }
423
424
2.76M
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
2.76M
        }
426
427
2.53k
        if (LIKELY(read_count > 0)) {
428
2.53k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
2.53k
        }
430
431
2.53k
        *n = read_count;
432
2.53k
        return Status::OK();
433
2.53k
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
416
                          MutableColumnPtr& dst) override {
409
416
        DCHECK(_parsed);
410
416
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
416
        auto total = *n;
416
416
        auto read_count = 0;
417
416
        _buffer.resize(total);
418
1.80k
        for (size_t i = 0; i < total; ++i) {
419
1.38k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1.38k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
1.38k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1.38k
        }
426
427
416
        if (LIKELY(read_count > 0)) {
428
416
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
416
        }
430
431
416
        *n = read_count;
432
416
        return Status::OK();
433
416
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
567
                          MutableColumnPtr& dst) override {
409
567
        DCHECK(_parsed);
410
567
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
567
        auto total = *n;
416
567
        auto read_count = 0;
417
567
        _buffer.resize(total);
418
549k
        for (size_t i = 0; i < total; ++i) {
419
548k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
548k
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
548k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
548k
        }
426
427
567
        if (LIKELY(read_count > 0)) {
428
567
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
567
        }
430
431
567
        *n = read_count;
432
567
        return Status::OK();
433
567
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4
                          MutableColumnPtr& dst) override {
409
4
        DCHECK(_parsed);
410
4
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4
        auto total = *n;
416
4
        auto read_count = 0;
417
4
        _buffer.resize(total);
418
8
        for (size_t i = 0; i < total; ++i) {
419
4
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
4
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
4
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
4
        }
426
427
4
        if (LIKELY(read_count > 0)) {
428
4
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4
        }
430
431
4
        *n = read_count;
432
4
        return Status::OK();
433
4
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
115
                          MutableColumnPtr& dst) override {
409
115
        DCHECK(_parsed);
410
115
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
115
        auto total = *n;
416
115
        auto read_count = 0;
417
115
        _buffer.resize(total);
418
9.26k
        for (size_t i = 0; i < total; ++i) {
419
9.16k
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
9.16k
            if (UNLIKELY(ord >= _num_elements)) {
421
8
                break;
422
8
            }
423
424
9.15k
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
9.15k
        }
426
427
115
        if (LIKELY(read_count > 0)) {
428
115
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
115
        }
430
431
115
        *n = read_count;
432
115
        return Status::OK();
433
115
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
5
                          MutableColumnPtr& dst) override {
409
5
        DCHECK(_parsed);
410
5
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
5
        auto total = *n;
416
5
        auto read_count = 0;
417
5
        _buffer.resize(total);
418
11
        for (size_t i = 0; i < total; ++i) {
419
6
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
6
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
6
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
6
        }
426
427
5
        if (LIKELY(read_count > 0)) {
428
5
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
5
        }
430
431
5
        *n = read_count;
432
5
        return Status::OK();
433
5
    }
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
1
                          MutableColumnPtr& dst) override {
409
1
        DCHECK(_parsed);
410
1
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
1
        auto total = *n;
416
1
        auto read_count = 0;
417
1
        _buffer.resize(total);
418
2
        for (size_t i = 0; i < total; ++i) {
419
1
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
1
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
1
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
1
        }
426
427
1
        if (LIKELY(read_count > 0)) {
428
1
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
1
        }
430
431
1
        *n = read_count;
432
1
        return Status::OK();
433
1
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
408
4
                          MutableColumnPtr& dst) override {
409
4
        DCHECK(_parsed);
410
4
        if (*n == 0) [[unlikely]] {
411
0
            *n = 0;
412
0
            return Status::OK();
413
0
        }
414
415
4
        auto total = *n;
416
4
        auto read_count = 0;
417
4
        _buffer.resize(total);
418
8
        for (size_t i = 0; i < total; ++i) {
419
4
            ordinal_t ord = rowids[i] - page_first_ordinal;
420
4
            if (UNLIKELY(ord >= _num_elements)) {
421
0
                break;
422
0
            }
423
424
4
            _buffer[read_count++] = *reinterpret_cast<CppType*>(get_data(ord));
425
4
        }
426
427
4
        if (LIKELY(read_count > 0)) {
428
4
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
429
4
        }
430
431
4
        *n = read_count;
432
4
        return Status::OK();
433
4
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
434
435
540
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
540
        return next_batch<false>(n, dst);
437
540
    }
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_9FieldTypeE10EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
_ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
435
540
    Status peek_next_batch(size_t* n, MutableColumnPtr& dst) override {
436
540
        return next_batch<false>(n, dst);
437
540
    }
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE15peek_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_9FieldTypeE31EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE15peek_next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
438
439
4
    size_t count() const override { return _num_elements; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE5countEv
Line
Count
Source
439
4
    size_t count() const override { return _num_elements; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE5countEv
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_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE5countEv
440
441
9.07k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
441
4.50k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
441
4.14k
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE13current_indexEv
Line
Count
Source
441
106
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
441
308
    size_t current_index() const override { return _cur_index; }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE13current_indexEv
Line
Count
Source
441
5
    size_t current_index() const override { return _cur_index; }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE13current_indexEv
442
443
3.39M
    char* get_data(size_t index) const {
444
3.39M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
3.39M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE5EE8get_dataEm
Line
Count
Source
443
2.81M
    char* get_data(size_t index) const {
444
2.81M
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
2.81M
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE7EE8get_dataEm
Line
Count
Source
443
8.84k
    char* get_data(size_t index) const {
444
8.84k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
8.84k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE10EE8get_dataEm
Line
Count
Source
443
171
    char* get_data(size_t index) const {
444
171
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
171
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE11EE8get_dataEm
Line
Count
Source
443
380
    char* get_data(size_t index) const {
444
380
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
380
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE16EE8get_dataEm
Line
Count
Source
443
81
    char* get_data(size_t index) const {
444
81
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
81
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE1EE8get_dataEm
Line
Count
Source
443
552k
    char* get_data(size_t index) const {
444
552k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
552k
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE3EE8get_dataEm
Line
Count
Source
443
281
    char* get_data(size_t index) const {
444
281
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
281
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE9EE8get_dataEm
Line
Count
Source
443
52
    char* get_data(size_t index) const {
444
52
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
52
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE8EE8get_dataEm
Line
Count
Source
443
10.2k
    char* get_data(size_t index) const {
444
10.2k
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
10.2k
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE6EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE24EE8get_dataEm
Line
Count
Source
443
512
    char* get_data(size_t index) const {
444
512
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
512
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE14EE8get_dataEm
Line
Count
Source
443
190
    char* get_data(size_t index) const {
444
190
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
190
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE28EE8get_dataEm
Line
Count
Source
443
27
    char* get_data(size_t index) const {
444
27
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
27
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE29EE8get_dataEm
Line
Count
Source
443
21
    char* get_data(size_t index) const {
444
21
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
21
    }
Unexecuted instantiation: _ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE41EE8get_dataEm
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE15EE8get_dataEm
Line
Count
Source
443
41
    char* get_data(size_t index) const {
444
41
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
41
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE40EE8get_dataEm
Line
Count
Source
443
20
    char* get_data(size_t index) const {
444
20
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE31EE8get_dataEm
Line
Count
Source
443
20
    char* get_data(size_t index) const {
444
20
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE32EE8get_dataEm
Line
Count
Source
443
20
    char* get_data(size_t index) const {
444
20
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE33EE8get_dataEm
Line
Count
Source
443
20
    char* get_data(size_t index) const {
444
20
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE37EE8get_dataEm
Line
Count
Source
443
20
    char* get_data(size_t index) const {
444
20
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE38EE8get_dataEm
Line
Count
Source
443
20
    char* get_data(size_t index) const {
444
20
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20
    }
_ZNK5doris10segment_v221BitShufflePageDecoderILNS_9FieldTypeE39EE8get_dataEm
Line
Count
Source
443
20
    char* get_data(size_t index) const {
444
20
        return &_data.data[BITSHUFFLE_PAGE_HEADER_SIZE + index * SIZE_OF_TYPE];
445
20
    }
446
447
private:
448
    void _copy_next_values(size_t n, void* data) {
449
        memcpy(data, get_data(_cur_index), n * SIZE_OF_TYPE);
450
    }
451
452
    using CppType = typename TypeTraits<Type>::CppType;
453
454
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
455
456
    Slice _data;
457
    PageDecoderOptions _options;
458
    bool _parsed;
459
    size_t _num_elements;
460
    size_t _num_element_after_padding;
461
462
    int _size_of_element;
463
    size_t _cur_index;
464
465
    std::vector<std::conditional_t<std::is_same_v<CppType, bool>, uint8_t, CppType>> _buffer;
466
467
    friend class BinaryDictPageDecoder;
468
};
469
470
} // namespace segment_v2
471
} // namespace doris