Coverage Report

Created: 2026-09-24 11:34

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/storage/segment/plain_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 "common/cast_set.h"
21
#include "storage/olap_common.h"
22
#include "storage/segment/options.h"
23
#include "storage/segment/page_builder.h"
24
#include "storage/segment/page_decoder.h"
25
#include "storage/types.h"
26
#include "util/coding.h"
27
#include "util/faststring.h"
28
#include "util/unaligned.h"
29
30
namespace doris {
31
namespace segment_v2 {
32
33
static const size_t PLAIN_PAGE_HEADER_SIZE = sizeof(uint32_t);
34
35
template <FieldType Type>
36
class PlainPageBuilder : public PageBuilderHelper<PlainPageBuilder<Type>> {
37
public:
38
    using Self = PlainPageBuilder<Type>;
39
    friend class PageBuilderHelper<Self>;
40
41
153k
    Status init() override {
42
        // Reserve enough space for the page, plus a bit of slop since
43
        // we often overrun the page by a few values.
44
153k
        return reset();
45
153k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
41
35.6k
    Status init() override {
42
        // Reserve enough space for the page, plus a bit of slop since
43
        // we often overrun the page by a few values.
44
35.6k
        return reset();
45
35.6k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
41
8.16k
    Status init() override {
42
        // Reserve enough space for the page, plus a bit of slop since
43
        // we often overrun the page by a few values.
44
8.16k
        return reset();
45
8.16k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
41
46.9k
    Status init() override {
42
        // Reserve enough space for the page, plus a bit of slop since
43
        // we often overrun the page by a few values.
44
46.9k
        return reset();
45
46.9k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
41
37.8k
    Status init() override {
42
        // Reserve enough space for the page, plus a bit of slop since
43
        // we often overrun the page by a few values.
44
37.8k
        return reset();
45
37.8k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
41
10.5k
    Status init() override {
42
        // Reserve enough space for the page, plus a bit of slop since
43
        // we often overrun the page by a few values.
44
10.5k
        return reset();
45
10.5k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
41
6.68k
    Status init() override {
42
        // Reserve enough space for the page, plus a bit of slop since
43
        // we often overrun the page by a few values.
44
6.68k
        return reset();
45
6.68k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
41
7.98k
    Status init() override {
42
        // Reserve enough space for the page, plus a bit of slop since
43
        // we often overrun the page by a few values.
44
7.98k
        return reset();
45
7.98k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE24EE4initEv
Line
Count
Source
41
3
    Status init() override {
42
        // Reserve enough space for the page, plus a bit of slop since
43
        // we often overrun the page by a few values.
44
3
        return reset();
45
3
    }
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE14EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE28EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE29EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE41EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE15EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE40EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE16EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE31EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE32EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE33EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE37EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE38EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE39EE4initEv
46
47
1.00M
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE1EE12is_page_fullEv
Line
Count
Source
47
71.0k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE3EE12is_page_fullEv
Line
Count
Source
47
21.6k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE5EE12is_page_fullEv
Line
Count
Source
47
300k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE7EE12is_page_fullEv
Line
Count
Source
47
562k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE9EE12is_page_fullEv
Line
Count
Source
47
21.9k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE10EE12is_page_fullEv
Line
Count
Source
47
13.7k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE11EE12is_page_fullEv
Line
Count
Source
47
19.1k
    bool is_page_full() override { return _remain_element_capacity == 0; }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE24EE12is_page_fullEv
Line
Count
Source
47
3
    bool is_page_full() override { return _remain_element_capacity == 0; }
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE14EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE28EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE29EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE41EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE15EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE40EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE16EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE31EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE32EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE33EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE37EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE38EE12is_page_fullEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE39EE12is_page_fullEv
48
49
505k
    Status add(const uint8_t* vals, size_t* count) override {
50
505k
        if (is_page_full() || *count == 0) {
51
0
            *count = 0;
52
0
            return Status::OK();
53
0
        }
54
505k
        size_t old_size = _buffer.size();
55
505k
        size_t to_add = std::min(_remain_element_capacity, *count);
56
        // This may need a large memory, should return error if could not allocated
57
        // successfully, to avoid BE OOM.
58
505k
        RETURN_IF_CATCH_EXCEPTION(_buffer.resize(old_size + to_add * SIZE_OF_TYPE));
59
505k
        memcpy(&_buffer[old_size], vals, to_add * SIZE_OF_TYPE);
60
505k
        _count += to_add;
61
505k
        _raw_data_size += to_add * SIZE_OF_TYPE;
62
63
505k
        *count = to_add;
64
505k
        _remain_element_capacity -= to_add;
65
505k
        return Status::OK();
66
505k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE1EE3addEPKhPm
Line
Count
Source
49
35.5k
    Status add(const uint8_t* vals, size_t* count) override {
50
35.5k
        if (is_page_full() || *count == 0) {
51
0
            *count = 0;
52
0
            return Status::OK();
53
0
        }
54
35.5k
        size_t old_size = _buffer.size();
55
35.5k
        size_t to_add = std::min(_remain_element_capacity, *count);
56
        // This may need a large memory, should return error if could not allocated
57
        // successfully, to avoid BE OOM.
58
35.5k
        RETURN_IF_CATCH_EXCEPTION(_buffer.resize(old_size + to_add * SIZE_OF_TYPE));
59
35.5k
        memcpy(&_buffer[old_size], vals, to_add * SIZE_OF_TYPE);
60
35.5k
        _count += to_add;
61
35.5k
        _raw_data_size += to_add * SIZE_OF_TYPE;
62
63
35.5k
        *count = to_add;
64
35.5k
        _remain_element_capacity -= to_add;
65
35.5k
        return Status::OK();
66
35.5k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE3EE3addEPKhPm
Line
Count
Source
49
10.8k
    Status add(const uint8_t* vals, size_t* count) override {
50
10.8k
        if (is_page_full() || *count == 0) {
51
0
            *count = 0;
52
0
            return Status::OK();
53
0
        }
54
10.8k
        size_t old_size = _buffer.size();
55
10.8k
        size_t to_add = std::min(_remain_element_capacity, *count);
56
        // This may need a large memory, should return error if could not allocated
57
        // successfully, to avoid BE OOM.
58
10.8k
        RETURN_IF_CATCH_EXCEPTION(_buffer.resize(old_size + to_add * SIZE_OF_TYPE));
59
10.8k
        memcpy(&_buffer[old_size], vals, to_add * SIZE_OF_TYPE);
60
10.8k
        _count += to_add;
61
10.8k
        _raw_data_size += to_add * SIZE_OF_TYPE;
62
63
10.8k
        *count = to_add;
64
10.8k
        _remain_element_capacity -= to_add;
65
10.8k
        return Status::OK();
66
10.8k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE5EE3addEPKhPm
Line
Count
Source
49
150k
    Status add(const uint8_t* vals, size_t* count) override {
50
150k
        if (is_page_full() || *count == 0) {
51
0
            *count = 0;
52
0
            return Status::OK();
53
0
        }
54
150k
        size_t old_size = _buffer.size();
55
150k
        size_t to_add = std::min(_remain_element_capacity, *count);
56
        // This may need a large memory, should return error if could not allocated
57
        // successfully, to avoid BE OOM.
58
150k
        RETURN_IF_CATCH_EXCEPTION(_buffer.resize(old_size + to_add * SIZE_OF_TYPE));
59
150k
        memcpy(&_buffer[old_size], vals, to_add * SIZE_OF_TYPE);
60
150k
        _count += to_add;
61
150k
        _raw_data_size += to_add * SIZE_OF_TYPE;
62
63
150k
        *count = to_add;
64
150k
        _remain_element_capacity -= to_add;
65
150k
        return Status::OK();
66
150k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE7EE3addEPKhPm
Line
Count
Source
49
281k
    Status add(const uint8_t* vals, size_t* count) override {
50
281k
        if (is_page_full() || *count == 0) {
51
0
            *count = 0;
52
0
            return Status::OK();
53
0
        }
54
281k
        size_t old_size = _buffer.size();
55
281k
        size_t to_add = std::min(_remain_element_capacity, *count);
56
        // This may need a large memory, should return error if could not allocated
57
        // successfully, to avoid BE OOM.
58
281k
        RETURN_IF_CATCH_EXCEPTION(_buffer.resize(old_size + to_add * SIZE_OF_TYPE));
59
281k
        memcpy(&_buffer[old_size], vals, to_add * SIZE_OF_TYPE);
60
281k
        _count += to_add;
61
281k
        _raw_data_size += to_add * SIZE_OF_TYPE;
62
63
281k
        *count = to_add;
64
281k
        _remain_element_capacity -= to_add;
65
281k
        return Status::OK();
66
281k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE9EE3addEPKhPm
Line
Count
Source
49
10.9k
    Status add(const uint8_t* vals, size_t* count) override {
50
10.9k
        if (is_page_full() || *count == 0) {
51
0
            *count = 0;
52
0
            return Status::OK();
53
0
        }
54
10.9k
        size_t old_size = _buffer.size();
55
10.9k
        size_t to_add = std::min(_remain_element_capacity, *count);
56
        // This may need a large memory, should return error if could not allocated
57
        // successfully, to avoid BE OOM.
58
10.9k
        RETURN_IF_CATCH_EXCEPTION(_buffer.resize(old_size + to_add * SIZE_OF_TYPE));
59
10.9k
        memcpy(&_buffer[old_size], vals, to_add * SIZE_OF_TYPE);
60
10.9k
        _count += to_add;
61
10.9k
        _raw_data_size += to_add * SIZE_OF_TYPE;
62
63
10.9k
        *count = to_add;
64
10.9k
        _remain_element_capacity -= to_add;
65
10.9k
        return Status::OK();
66
10.9k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE10EE3addEPKhPm
Line
Count
Source
49
6.86k
    Status add(const uint8_t* vals, size_t* count) override {
50
6.86k
        if (is_page_full() || *count == 0) {
51
0
            *count = 0;
52
0
            return Status::OK();
53
0
        }
54
6.86k
        size_t old_size = _buffer.size();
55
6.86k
        size_t to_add = std::min(_remain_element_capacity, *count);
56
        // This may need a large memory, should return error if could not allocated
57
        // successfully, to avoid BE OOM.
58
6.86k
        RETURN_IF_CATCH_EXCEPTION(_buffer.resize(old_size + to_add * SIZE_OF_TYPE));
59
6.86k
        memcpy(&_buffer[old_size], vals, to_add * SIZE_OF_TYPE);
60
6.86k
        _count += to_add;
61
6.86k
        _raw_data_size += to_add * SIZE_OF_TYPE;
62
63
6.86k
        *count = to_add;
64
6.86k
        _remain_element_capacity -= to_add;
65
6.86k
        return Status::OK();
66
6.86k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE11EE3addEPKhPm
Line
Count
Source
49
9.57k
    Status add(const uint8_t* vals, size_t* count) override {
50
9.57k
        if (is_page_full() || *count == 0) {
51
0
            *count = 0;
52
0
            return Status::OK();
53
0
        }
54
9.57k
        size_t old_size = _buffer.size();
55
9.57k
        size_t to_add = std::min(_remain_element_capacity, *count);
56
        // This may need a large memory, should return error if could not allocated
57
        // successfully, to avoid BE OOM.
58
9.57k
        RETURN_IF_CATCH_EXCEPTION(_buffer.resize(old_size + to_add * SIZE_OF_TYPE));
59
9.57k
        memcpy(&_buffer[old_size], vals, to_add * SIZE_OF_TYPE);
60
9.57k
        _count += to_add;
61
9.57k
        _raw_data_size += to_add * SIZE_OF_TYPE;
62
63
9.57k
        *count = to_add;
64
9.57k
        _remain_element_capacity -= to_add;
65
9.57k
        return Status::OK();
66
9.57k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE24EE3addEPKhPm
Line
Count
Source
49
3
    Status add(const uint8_t* vals, size_t* count) override {
50
3
        if (is_page_full() || *count == 0) {
51
0
            *count = 0;
52
0
            return Status::OK();
53
0
        }
54
3
        size_t old_size = _buffer.size();
55
3
        size_t to_add = std::min(_remain_element_capacity, *count);
56
        // This may need a large memory, should return error if could not allocated
57
        // successfully, to avoid BE OOM.
58
3
        RETURN_IF_CATCH_EXCEPTION(_buffer.resize(old_size + to_add * SIZE_OF_TYPE));
59
3
        memcpy(&_buffer[old_size], vals, to_add * SIZE_OF_TYPE);
60
3
        _count += to_add;
61
3
        _raw_data_size += to_add * SIZE_OF_TYPE;
62
63
3
        *count = to_add;
64
3
        _remain_element_capacity -= to_add;
65
3
        return Status::OK();
66
3
    }
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE14EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE28EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE29EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE41EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE15EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE40EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE16EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE31EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE32EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE33EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE37EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE38EE3addEPKhPm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE39EE3addEPKhPm
67
68
157k
    Status finish(OwnedSlice* slice) override {
69
157k
        encode_fixed32_le((uint8_t*)&_buffer[0], cast_set<uint32_t>(_count));
70
157k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _buffer.build(); });
71
157k
        return Status::OK();
72
157k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE
Line
Count
Source
68
34.6k
    Status finish(OwnedSlice* slice) override {
69
34.6k
        encode_fixed32_le((uint8_t*)&_buffer[0], cast_set<uint32_t>(_count));
70
34.6k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _buffer.build(); });
71
34.6k
        return Status::OK();
72
34.6k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE
Line
Count
Source
68
7.71k
    Status finish(OwnedSlice* slice) override {
69
7.71k
        encode_fixed32_le((uint8_t*)&_buffer[0], cast_set<uint32_t>(_count));
70
7.71k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _buffer.build(); });
71
7.71k
        return Status::OK();
72
7.71k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE
Line
Count
Source
68
48.6k
    Status finish(OwnedSlice* slice) override {
69
48.6k
        encode_fixed32_le((uint8_t*)&_buffer[0], cast_set<uint32_t>(_count));
70
48.6k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _buffer.build(); });
71
48.6k
        return Status::OK();
72
48.6k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE
Line
Count
Source
68
41.4k
    Status finish(OwnedSlice* slice) override {
69
41.4k
        encode_fixed32_le((uint8_t*)&_buffer[0], cast_set<uint32_t>(_count));
70
41.4k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _buffer.build(); });
71
41.4k
        return Status::OK();
72
41.4k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE
Line
Count
Source
68
10.8k
    Status finish(OwnedSlice* slice) override {
69
10.8k
        encode_fixed32_le((uint8_t*)&_buffer[0], cast_set<uint32_t>(_count));
70
10.8k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _buffer.build(); });
71
10.8k
        return Status::OK();
72
10.8k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE
Line
Count
Source
68
6.28k
    Status finish(OwnedSlice* slice) override {
69
6.28k
        encode_fixed32_le((uint8_t*)&_buffer[0], cast_set<uint32_t>(_count));
70
6.28k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _buffer.build(); });
71
6.28k
        return Status::OK();
72
6.28k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE
Line
Count
Source
68
8.24k
    Status finish(OwnedSlice* slice) override {
69
8.24k
        encode_fixed32_le((uint8_t*)&_buffer[0], cast_set<uint32_t>(_count));
70
8.24k
        RETURN_IF_CATCH_EXCEPTION({ *slice = _buffer.build(); });
71
8.24k
        return Status::OK();
72
8.24k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE
Line
Count
Source
68
3
    Status finish(OwnedSlice* slice) override {
69
3
        encode_fixed32_le((uint8_t*)&_buffer[0], cast_set<uint32_t>(_count));
70
3
        RETURN_IF_CATCH_EXCEPTION({ *slice = _buffer.build(); });
71
3
        return Status::OK();
72
3
    }
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE29EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE41EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE15EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE40EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE16EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE31EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE32EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE33EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE37EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE38EE6finishEPNS_10OwnedSliceE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE39EE6finishEPNS_10OwnedSliceE
73
74
311k
    Status reset() override {
75
311k
        RETURN_IF_CATCH_EXCEPTION({
76
311k
            _buffer.reserve(_options.data_page_size);
77
311k
            _count = 0;
78
311k
            _raw_data_size = 0;
79
311k
            _buffer.clear();
80
311k
            _buffer.resize(PLAIN_PAGE_HEADER_SIZE);
81
311k
            _remain_element_capacity = _options.data_page_size / SIZE_OF_TYPE;
82
311k
        });
83
312k
        return Status::OK();
84
311k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE1EE5resetEv
Line
Count
Source
74
70.2k
    Status reset() override {
75
70.2k
        RETURN_IF_CATCH_EXCEPTION({
76
70.2k
            _buffer.reserve(_options.data_page_size);
77
70.2k
            _count = 0;
78
70.2k
            _raw_data_size = 0;
79
70.2k
            _buffer.clear();
80
70.2k
            _buffer.resize(PLAIN_PAGE_HEADER_SIZE);
81
70.2k
            _remain_element_capacity = _options.data_page_size / SIZE_OF_TYPE;
82
70.2k
        });
83
70.3k
        return Status::OK();
84
70.2k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE3EE5resetEv
Line
Count
Source
74
15.8k
    Status reset() override {
75
15.8k
        RETURN_IF_CATCH_EXCEPTION({
76
15.8k
            _buffer.reserve(_options.data_page_size);
77
15.8k
            _count = 0;
78
15.8k
            _raw_data_size = 0;
79
15.8k
            _buffer.clear();
80
15.8k
            _buffer.resize(PLAIN_PAGE_HEADER_SIZE);
81
15.8k
            _remain_element_capacity = _options.data_page_size / SIZE_OF_TYPE;
82
15.8k
        });
83
15.8k
        return Status::OK();
84
15.8k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE5EE5resetEv
Line
Count
Source
74
95.5k
    Status reset() override {
75
95.5k
        RETURN_IF_CATCH_EXCEPTION({
76
95.5k
            _buffer.reserve(_options.data_page_size);
77
95.5k
            _count = 0;
78
95.5k
            _raw_data_size = 0;
79
95.5k
            _buffer.clear();
80
95.5k
            _buffer.resize(PLAIN_PAGE_HEADER_SIZE);
81
95.5k
            _remain_element_capacity = _options.data_page_size / SIZE_OF_TYPE;
82
95.5k
        });
83
96.1k
        return Status::OK();
84
95.5k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE7EE5resetEv
Line
Count
Source
74
79.2k
    Status reset() override {
75
79.2k
        RETURN_IF_CATCH_EXCEPTION({
76
79.2k
            _buffer.reserve(_options.data_page_size);
77
79.2k
            _count = 0;
78
79.2k
            _raw_data_size = 0;
79
79.2k
            _buffer.clear();
80
79.2k
            _buffer.resize(PLAIN_PAGE_HEADER_SIZE);
81
79.2k
            _remain_element_capacity = _options.data_page_size / SIZE_OF_TYPE;
82
79.2k
        });
83
79.5k
        return Status::OK();
84
79.2k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE9EE5resetEv
Line
Count
Source
74
21.3k
    Status reset() override {
75
21.3k
        RETURN_IF_CATCH_EXCEPTION({
76
21.3k
            _buffer.reserve(_options.data_page_size);
77
21.3k
            _count = 0;
78
21.3k
            _raw_data_size = 0;
79
21.3k
            _buffer.clear();
80
21.3k
            _buffer.resize(PLAIN_PAGE_HEADER_SIZE);
81
21.3k
            _remain_element_capacity = _options.data_page_size / SIZE_OF_TYPE;
82
21.3k
        });
83
21.4k
        return Status::OK();
84
21.3k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE10EE5resetEv
Line
Count
Source
74
12.9k
    Status reset() override {
75
12.9k
        RETURN_IF_CATCH_EXCEPTION({
76
12.9k
            _buffer.reserve(_options.data_page_size);
77
12.9k
            _count = 0;
78
12.9k
            _raw_data_size = 0;
79
12.9k
            _buffer.clear();
80
12.9k
            _buffer.resize(PLAIN_PAGE_HEADER_SIZE);
81
12.9k
            _remain_element_capacity = _options.data_page_size / SIZE_OF_TYPE;
82
12.9k
        });
83
12.9k
        return Status::OK();
84
12.9k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE11EE5resetEv
Line
Count
Source
74
16.2k
    Status reset() override {
75
16.2k
        RETURN_IF_CATCH_EXCEPTION({
76
16.2k
            _buffer.reserve(_options.data_page_size);
77
16.2k
            _count = 0;
78
16.2k
            _raw_data_size = 0;
79
16.2k
            _buffer.clear();
80
16.2k
            _buffer.resize(PLAIN_PAGE_HEADER_SIZE);
81
16.2k
            _remain_element_capacity = _options.data_page_size / SIZE_OF_TYPE;
82
16.2k
        });
83
16.2k
        return Status::OK();
84
16.2k
    }
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE24EE5resetEv
Line
Count
Source
74
3
    Status reset() override {
75
3
        RETURN_IF_CATCH_EXCEPTION({
76
3
            _buffer.reserve(_options.data_page_size);
77
3
            _count = 0;
78
3
            _raw_data_size = 0;
79
3
            _buffer.clear();
80
3
            _buffer.resize(PLAIN_PAGE_HEADER_SIZE);
81
3
            _remain_element_capacity = _options.data_page_size / SIZE_OF_TYPE;
82
3
        });
83
3
        return Status::OK();
84
3
    }
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE14EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE28EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE29EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE41EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE15EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE40EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE16EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE31EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE32EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE33EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE37EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE38EE5resetEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE39EE5resetEv
85
86
0
    size_t count() const override { return _count; }
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE5EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE41EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE39EE5countEv
87
88
9.43k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE1EE4sizeEv
Line
Count
Source
88
1.45k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE3EE4sizeEv
Line
Count
Source
88
800
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE5EE4sizeEv
Line
Count
Source
88
2.99k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE7EE4sizeEv
Line
Count
Source
88
2.02k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE9EE4sizeEv
Line
Count
Source
88
1.14k
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE10EE4sizeEv
Line
Count
Source
88
525
    uint64_t size() const override { return _buffer.size(); }
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE11EE4sizeEv
Line
Count
Source
88
501
    uint64_t size() const override { return _buffer.size(); }
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE24EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE14EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE28EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE29EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE41EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE15EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE40EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE16EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE31EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE32EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE33EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE37EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE38EE4sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE39EE4sizeEv
89
90
157k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv
Line
Count
Source
90
34.6k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv
Line
Count
Source
90
7.71k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv
Line
Count
Source
90
48.6k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv
Line
Count
Source
90
41.4k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv
Line
Count
Source
90
10.8k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv
Line
Count
Source
90
6.28k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv
Line
Count
Source
90
8.24k
    uint64_t get_raw_data_size() const override { return _raw_data_size; }
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE24EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE14EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE28EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE29EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE41EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE15EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE40EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE16EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE31EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE32EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE33EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE37EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE38EE17get_raw_data_sizeEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE39EE17get_raw_data_sizeEv
91
92
private:
93
153k
    PlainPageBuilder(const PageBuilderOptions& options) : _options(options) {}
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
93
35.6k
    PlainPageBuilder(const PageBuilderOptions& options) : _options(options) {}
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
93
8.16k
    PlainPageBuilder(const PageBuilderOptions& options) : _options(options) {}
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
93
46.8k
    PlainPageBuilder(const PageBuilderOptions& options) : _options(options) {}
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
93
37.7k
    PlainPageBuilder(const PageBuilderOptions& options) : _options(options) {}
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
93
10.5k
    PlainPageBuilder(const PageBuilderOptions& options) : _options(options) {}
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
93
6.67k
    PlainPageBuilder(const PageBuilderOptions& options) : _options(options) {}
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
93
7.98k
    PlainPageBuilder(const PageBuilderOptions& options) : _options(options) {}
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE
Line
Count
Source
93
3
    PlainPageBuilder(const PageBuilderOptions& options) : _options(options) {}
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE29EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE41EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE15EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE40EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE16EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE31EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE32EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE33EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE37EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE38EEC2ERKNS0_18PageBuilderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE39EEC2ERKNS0_18PageBuilderOptionsE
94
95
    faststring _buffer;
96
    PageBuilderOptions _options;
97
    size_t _count;
98
    size_t _remain_element_capacity {0};
99
    uint64_t _raw_data_size = 0;
100
    typedef typename TypeTraits<Type>::CppType CppType;
101
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
102
};
103
104
template <FieldType Type>
105
class PlainPageDecoder : public PageDecoder {
106
public:
107
    PlainPageDecoder(Slice data, const PageDecoderOptions& options)
108
319k
            : _data(data), _options(options), _parsed(false), _num_elems(0), _cur_idx(0) {}
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
108
74.8k
            : _data(data), _options(options), _parsed(false), _num_elems(0), _cur_idx(0) {}
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
108
12.9k
            : _data(data), _options(options), _parsed(false), _num_elems(0), _cur_idx(0) {}
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
108
123k
            : _data(data), _options(options), _parsed(false), _num_elems(0), _cur_idx(0) {}
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
108
60.6k
            : _data(data), _options(options), _parsed(false), _num_elems(0), _cur_idx(0) {}
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
108
16.7k
            : _data(data), _options(options), _parsed(false), _num_elems(0), _cur_idx(0) {}
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
108
12.0k
            : _data(data), _options(options), _parsed(false), _num_elems(0), _cur_idx(0) {}
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
108
18.7k
            : _data(data), _options(options), _parsed(false), _num_elems(0), _cur_idx(0) {}
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Line
Count
Source
108
3
            : _data(data), _options(options), _parsed(false), _num_elems(0), _cur_idx(0) {}
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE14EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE28EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE29EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE41EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE15EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE40EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE16EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE31EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE32EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE33EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE37EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE38EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE39EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE
109
110
319k
    Status init() override {
111
319k
        CHECK(!_parsed);
112
113
319k
        if (_data.size < PLAIN_PAGE_HEADER_SIZE) {
114
0
            return Status::InternalError(
115
0
                    "file corruption: not enough bytes for header in PlainPageDecoder ."
116
0
                    "invalid data size:{}, header size:{}",
117
0
                    _data.size, PLAIN_PAGE_HEADER_SIZE);
118
0
        }
119
120
319k
        _num_elems = decode_fixed32_le((const uint8_t*)&_data[0]);
121
122
319k
        if (_data.size != PLAIN_PAGE_HEADER_SIZE + _num_elems * SIZE_OF_TYPE) {
123
0
            return Status::InternalError("file corruption: unexpected data size.");
124
0
        }
125
126
319k
        _parsed = true;
127
128
319k
        RETURN_IF_ERROR(seek_to_position_in_page(0));
129
319k
        return Status::OK();
130
319k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE1EE4initEv
Line
Count
Source
110
74.7k
    Status init() override {
111
74.7k
        CHECK(!_parsed);
112
113
74.7k
        if (_data.size < PLAIN_PAGE_HEADER_SIZE) {
114
0
            return Status::InternalError(
115
0
                    "file corruption: not enough bytes for header in PlainPageDecoder ."
116
0
                    "invalid data size:{}, header size:{}",
117
0
                    _data.size, PLAIN_PAGE_HEADER_SIZE);
118
0
        }
119
120
74.7k
        _num_elems = decode_fixed32_le((const uint8_t*)&_data[0]);
121
122
74.7k
        if (_data.size != PLAIN_PAGE_HEADER_SIZE + _num_elems * SIZE_OF_TYPE) {
123
0
            return Status::InternalError("file corruption: unexpected data size.");
124
0
        }
125
126
74.7k
        _parsed = true;
127
128
74.7k
        RETURN_IF_ERROR(seek_to_position_in_page(0));
129
74.7k
        return Status::OK();
130
74.7k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE3EE4initEv
Line
Count
Source
110
12.9k
    Status init() override {
111
12.9k
        CHECK(!_parsed);
112
113
12.9k
        if (_data.size < PLAIN_PAGE_HEADER_SIZE) {
114
0
            return Status::InternalError(
115
0
                    "file corruption: not enough bytes for header in PlainPageDecoder ."
116
0
                    "invalid data size:{}, header size:{}",
117
0
                    _data.size, PLAIN_PAGE_HEADER_SIZE);
118
0
        }
119
120
12.9k
        _num_elems = decode_fixed32_le((const uint8_t*)&_data[0]);
121
122
12.9k
        if (_data.size != PLAIN_PAGE_HEADER_SIZE + _num_elems * SIZE_OF_TYPE) {
123
0
            return Status::InternalError("file corruption: unexpected data size.");
124
0
        }
125
126
12.9k
        _parsed = true;
127
128
12.9k
        RETURN_IF_ERROR(seek_to_position_in_page(0));
129
12.9k
        return Status::OK();
130
12.9k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE5EE4initEv
Line
Count
Source
110
123k
    Status init() override {
111
123k
        CHECK(!_parsed);
112
113
123k
        if (_data.size < PLAIN_PAGE_HEADER_SIZE) {
114
0
            return Status::InternalError(
115
0
                    "file corruption: not enough bytes for header in PlainPageDecoder ."
116
0
                    "invalid data size:{}, header size:{}",
117
0
                    _data.size, PLAIN_PAGE_HEADER_SIZE);
118
0
        }
119
120
123k
        _num_elems = decode_fixed32_le((const uint8_t*)&_data[0]);
121
122
123k
        if (_data.size != PLAIN_PAGE_HEADER_SIZE + _num_elems * SIZE_OF_TYPE) {
123
0
            return Status::InternalError("file corruption: unexpected data size.");
124
0
        }
125
126
123k
        _parsed = true;
127
128
123k
        RETURN_IF_ERROR(seek_to_position_in_page(0));
129
123k
        return Status::OK();
130
123k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE7EE4initEv
Line
Count
Source
110
60.6k
    Status init() override {
111
60.6k
        CHECK(!_parsed);
112
113
60.6k
        if (_data.size < PLAIN_PAGE_HEADER_SIZE) {
114
0
            return Status::InternalError(
115
0
                    "file corruption: not enough bytes for header in PlainPageDecoder ."
116
0
                    "invalid data size:{}, header size:{}",
117
0
                    _data.size, PLAIN_PAGE_HEADER_SIZE);
118
0
        }
119
120
60.6k
        _num_elems = decode_fixed32_le((const uint8_t*)&_data[0]);
121
122
60.6k
        if (_data.size != PLAIN_PAGE_HEADER_SIZE + _num_elems * SIZE_OF_TYPE) {
123
0
            return Status::InternalError("file corruption: unexpected data size.");
124
0
        }
125
126
60.6k
        _parsed = true;
127
128
60.6k
        RETURN_IF_ERROR(seek_to_position_in_page(0));
129
60.6k
        return Status::OK();
130
60.6k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE9EE4initEv
Line
Count
Source
110
16.7k
    Status init() override {
111
16.7k
        CHECK(!_parsed);
112
113
16.7k
        if (_data.size < PLAIN_PAGE_HEADER_SIZE) {
114
0
            return Status::InternalError(
115
0
                    "file corruption: not enough bytes for header in PlainPageDecoder ."
116
0
                    "invalid data size:{}, header size:{}",
117
0
                    _data.size, PLAIN_PAGE_HEADER_SIZE);
118
0
        }
119
120
16.7k
        _num_elems = decode_fixed32_le((const uint8_t*)&_data[0]);
121
122
16.7k
        if (_data.size != PLAIN_PAGE_HEADER_SIZE + _num_elems * SIZE_OF_TYPE) {
123
0
            return Status::InternalError("file corruption: unexpected data size.");
124
0
        }
125
126
16.7k
        _parsed = true;
127
128
16.7k
        RETURN_IF_ERROR(seek_to_position_in_page(0));
129
16.7k
        return Status::OK();
130
16.7k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE10EE4initEv
Line
Count
Source
110
12.0k
    Status init() override {
111
12.0k
        CHECK(!_parsed);
112
113
12.0k
        if (_data.size < PLAIN_PAGE_HEADER_SIZE) {
114
0
            return Status::InternalError(
115
0
                    "file corruption: not enough bytes for header in PlainPageDecoder ."
116
0
                    "invalid data size:{}, header size:{}",
117
0
                    _data.size, PLAIN_PAGE_HEADER_SIZE);
118
0
        }
119
120
12.0k
        _num_elems = decode_fixed32_le((const uint8_t*)&_data[0]);
121
122
12.0k
        if (_data.size != PLAIN_PAGE_HEADER_SIZE + _num_elems * SIZE_OF_TYPE) {
123
0
            return Status::InternalError("file corruption: unexpected data size.");
124
0
        }
125
126
12.0k
        _parsed = true;
127
128
12.0k
        RETURN_IF_ERROR(seek_to_position_in_page(0));
129
12.0k
        return Status::OK();
130
12.0k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE11EE4initEv
Line
Count
Source
110
18.7k
    Status init() override {
111
18.7k
        CHECK(!_parsed);
112
113
18.7k
        if (_data.size < PLAIN_PAGE_HEADER_SIZE) {
114
0
            return Status::InternalError(
115
0
                    "file corruption: not enough bytes for header in PlainPageDecoder ."
116
0
                    "invalid data size:{}, header size:{}",
117
0
                    _data.size, PLAIN_PAGE_HEADER_SIZE);
118
0
        }
119
120
18.7k
        _num_elems = decode_fixed32_le((const uint8_t*)&_data[0]);
121
122
18.7k
        if (_data.size != PLAIN_PAGE_HEADER_SIZE + _num_elems * SIZE_OF_TYPE) {
123
0
            return Status::InternalError("file corruption: unexpected data size.");
124
0
        }
125
126
18.7k
        _parsed = true;
127
128
18.7k
        RETURN_IF_ERROR(seek_to_position_in_page(0));
129
18.7k
        return Status::OK();
130
18.7k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE24EE4initEv
Line
Count
Source
110
3
    Status init() override {
111
3
        CHECK(!_parsed);
112
113
3
        if (_data.size < PLAIN_PAGE_HEADER_SIZE) {
114
0
            return Status::InternalError(
115
0
                    "file corruption: not enough bytes for header in PlainPageDecoder ."
116
0
                    "invalid data size:{}, header size:{}",
117
0
                    _data.size, PLAIN_PAGE_HEADER_SIZE);
118
0
        }
119
120
3
        _num_elems = decode_fixed32_le((const uint8_t*)&_data[0]);
121
122
3
        if (_data.size != PLAIN_PAGE_HEADER_SIZE + _num_elems * SIZE_OF_TYPE) {
123
0
            return Status::InternalError("file corruption: unexpected data size.");
124
0
        }
125
126
3
        _parsed = true;
127
128
3
        RETURN_IF_ERROR(seek_to_position_in_page(0));
129
3
        return Status::OK();
130
3
    }
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE14EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE28EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE29EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE41EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE15EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE40EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE16EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE31EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE32EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE33EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE37EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE38EE4initEv
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE39EE4initEv
131
132
2.02M
    Status seek_to_position_in_page(size_t pos) override {
133
18.4E
        CHECK(_parsed) << "Must call init()";
134
2.02M
        if (_num_elems == 0) [[unlikely]] {
135
7.10k
            if (pos != 0) {
136
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
137
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elems);
138
0
            }
139
7.10k
        }
140
141
2.02M
        DCHECK_LE(pos, _num_elems);
142
143
2.02M
        _cur_idx = cast_set<uint32_t>(pos);
144
2.02M
        return Status::OK();
145
2.02M
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm
Line
Count
Source
132
335k
    Status seek_to_position_in_page(size_t pos) override {
133
18.4E
        CHECK(_parsed) << "Must call init()";
134
335k
        if (_num_elems == 0) [[unlikely]] {
135
485
            if (pos != 0) {
136
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
137
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elems);
138
0
            }
139
485
        }
140
141
335k
        DCHECK_LE(pos, _num_elems);
142
143
335k
        _cur_idx = cast_set<uint32_t>(pos);
144
335k
        return Status::OK();
145
335k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm
Line
Count
Source
132
246k
    Status seek_to_position_in_page(size_t pos) override {
133
246k
        CHECK(_parsed) << "Must call init()";
134
246k
        if (_num_elems == 0) [[unlikely]] {
135
141
            if (pos != 0) {
136
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
137
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elems);
138
0
            }
139
141
        }
140
141
246k
        DCHECK_LE(pos, _num_elems);
142
143
246k
        _cur_idx = cast_set<uint32_t>(pos);
144
246k
        return Status::OK();
145
246k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm
Line
Count
Source
132
505k
    Status seek_to_position_in_page(size_t pos) override {
133
18.4E
        CHECK(_parsed) << "Must call init()";
134
505k
        if (_num_elems == 0) [[unlikely]] {
135
3.41k
            if (pos != 0) {
136
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
137
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elems);
138
0
            }
139
3.41k
        }
140
141
505k
        DCHECK_LE(pos, _num_elems);
142
143
505k
        _cur_idx = cast_set<uint32_t>(pos);
144
505k
        return Status::OK();
145
505k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm
Line
Count
Source
132
308k
    Status seek_to_position_in_page(size_t pos) override {
133
308k
        CHECK(_parsed) << "Must call init()";
134
308k
        if (_num_elems == 0) [[unlikely]] {
135
2.16k
            if (pos != 0) {
136
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
137
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elems);
138
0
            }
139
2.16k
        }
140
141
308k
        DCHECK_LE(pos, _num_elems);
142
143
308k
        _cur_idx = cast_set<uint32_t>(pos);
144
308k
        return Status::OK();
145
308k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm
Line
Count
Source
132
148k
    Status seek_to_position_in_page(size_t pos) override {
133
18.4E
        CHECK(_parsed) << "Must call init()";
134
148k
        if (_num_elems == 0) [[unlikely]] {
135
395
            if (pos != 0) {
136
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
137
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elems);
138
0
            }
139
395
        }
140
141
148k
        DCHECK_LE(pos, _num_elems);
142
143
148k
        _cur_idx = cast_set<uint32_t>(pos);
144
148k
        return Status::OK();
145
148k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm
Line
Count
Source
132
249k
    Status seek_to_position_in_page(size_t pos) override {
133
249k
        CHECK(_parsed) << "Must call init()";
134
249k
        if (_num_elems == 0) [[unlikely]] {
135
183
            if (pos != 0) {
136
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
137
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elems);
138
0
            }
139
183
        }
140
141
249k
        DCHECK_LE(pos, _num_elems);
142
143
249k
        _cur_idx = cast_set<uint32_t>(pos);
144
249k
        return Status::OK();
145
249k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm
Line
Count
Source
132
229k
    Status seek_to_position_in_page(size_t pos) override {
133
18.4E
        CHECK(_parsed) << "Must call init()";
134
229k
        if (_num_elems == 0) [[unlikely]] {
135
321
            if (pos != 0) {
136
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
137
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elems);
138
0
            }
139
321
        }
140
141
229k
        DCHECK_LE(pos, _num_elems);
142
143
229k
        _cur_idx = cast_set<uint32_t>(pos);
144
229k
        return Status::OK();
145
229k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm
Line
Count
Source
132
3
    Status seek_to_position_in_page(size_t pos) override {
133
3
        CHECK(_parsed) << "Must call init()";
134
3
        if (_num_elems == 0) [[unlikely]] {
135
0
            if (pos != 0) {
136
0
                return Status::Error<ErrorCode::INTERNAL_ERROR, false>(
137
0
                        "seek pos {} is larger than total elements  {}", pos, _num_elems);
138
0
            }
139
0
        }
140
141
3
        DCHECK_LE(pos, _num_elems);
142
143
3
        _cur_idx = cast_set<uint32_t>(pos);
144
3
        return Status::OK();
145
3
    }
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE14EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE28EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE29EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE41EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE15EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE40EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE16EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE31EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE32EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE33EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE37EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE38EE24seek_to_position_in_pageEm
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE39EE24seek_to_position_in_pageEm
146
147
21
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
148
21
        DCHECK(_parsed) << "Must call init() firstly";
149
150
21
        if (_num_elems == 0) {
151
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
152
0
        }
153
154
21
        uint32_t left = 0;
155
21
        uint32_t right = _num_elems;
156
157
21
        const void* mid_value = nullptr;
158
159
        // find the first value >= target. after loop,
160
        // - left == index of first value >= target when found
161
        // - left == _num_elems when not found (all values < target)
162
133
        while (left < right) {
163
112
            uint32_t mid = left + (right - left) / 2;
164
112
            mid_value = &_data[PLAIN_PAGE_HEADER_SIZE + mid * SIZE_OF_TYPE];
165
112
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
166
50
                left = mid + 1;
167
62
            } else {
168
62
                right = mid;
169
62
            }
170
112
        }
171
21
        if (left >= _num_elems) {
172
3
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
173
3
        }
174
18
        const void* find_value = &_data[PLAIN_PAGE_HEADER_SIZE + left * SIZE_OF_TYPE];
175
18
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
176
15
            *exact_match = true;
177
15
        } else {
178
3
            *exact_match = false;
179
3
        }
180
181
18
        _cur_idx = left;
182
18
        return Status::OK();
183
21
    }
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE1EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE3EE22seek_at_or_after_valueEPKvPb
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE5EE22seek_at_or_after_valueEPKvPb
Line
Count
Source
147
5
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
148
5
        DCHECK(_parsed) << "Must call init() firstly";
149
150
5
        if (_num_elems == 0) {
151
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
152
0
        }
153
154
5
        uint32_t left = 0;
155
5
        uint32_t right = _num_elems;
156
157
5
        const void* mid_value = nullptr;
158
159
        // find the first value >= target. after loop,
160
        // - left == index of first value >= target when found
161
        // - left == _num_elems when not found (all values < target)
162
54
        while (left < right) {
163
49
            uint32_t mid = left + (right - left) / 2;
164
49
            mid_value = &_data[PLAIN_PAGE_HEADER_SIZE + mid * SIZE_OF_TYPE];
165
49
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
166
23
                left = mid + 1;
167
26
            } else {
168
26
                right = mid;
169
26
            }
170
49
        }
171
5
        if (left >= _num_elems) {
172
1
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
173
1
        }
174
4
        const void* find_value = &_data[PLAIN_PAGE_HEADER_SIZE + left * SIZE_OF_TYPE];
175
4
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
176
3
            *exact_match = true;
177
3
        } else {
178
1
            *exact_match = false;
179
1
        }
180
181
4
        _cur_idx = left;
182
4
        return Status::OK();
183
5
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE7EE22seek_at_or_after_valueEPKvPb
Line
Count
Source
147
5
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
148
5
        DCHECK(_parsed) << "Must call init() firstly";
149
150
5
        if (_num_elems == 0) {
151
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
152
0
        }
153
154
5
        uint32_t left = 0;
155
5
        uint32_t right = _num_elems;
156
157
5
        const void* mid_value = nullptr;
158
159
        // find the first value >= target. after loop,
160
        // - left == index of first value >= target when found
161
        // - left == _num_elems when not found (all values < target)
162
54
        while (left < right) {
163
49
            uint32_t mid = left + (right - left) / 2;
164
49
            mid_value = &_data[PLAIN_PAGE_HEADER_SIZE + mid * SIZE_OF_TYPE];
165
49
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
166
24
                left = mid + 1;
167
25
            } else {
168
25
                right = mid;
169
25
            }
170
49
        }
171
5
        if (left >= _num_elems) {
172
1
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
173
1
        }
174
4
        const void* find_value = &_data[PLAIN_PAGE_HEADER_SIZE + left * SIZE_OF_TYPE];
175
4
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
176
3
            *exact_match = true;
177
3
        } else {
178
1
            *exact_match = false;
179
1
        }
180
181
4
        _cur_idx = left;
182
4
        return Status::OK();
183
5
    }
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE9EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE10EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE11EE22seek_at_or_after_valueEPKvPb
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE24EE22seek_at_or_after_valueEPKvPb
Line
Count
Source
147
11
    Status seek_at_or_after_value(const void* value, bool* exact_match) override {
148
11
        DCHECK(_parsed) << "Must call init() firstly";
149
150
11
        if (_num_elems == 0) {
151
0
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty");
152
0
        }
153
154
11
        uint32_t left = 0;
155
11
        uint32_t right = _num_elems;
156
157
11
        const void* mid_value = nullptr;
158
159
        // find the first value >= target. after loop,
160
        // - left == index of first value >= target when found
161
        // - left == _num_elems when not found (all values < target)
162
25
        while (left < right) {
163
14
            uint32_t mid = left + (right - left) / 2;
164
14
            mid_value = &_data[PLAIN_PAGE_HEADER_SIZE + mid * SIZE_OF_TYPE];
165
14
            if (TypeTraits<Type>::cmp(mid_value, value) < 0) {
166
3
                left = mid + 1;
167
11
            } else {
168
11
                right = mid;
169
11
            }
170
14
        }
171
11
        if (left >= _num_elems) {
172
1
            return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value");
173
1
        }
174
10
        const void* find_value = &_data[PLAIN_PAGE_HEADER_SIZE + left * SIZE_OF_TYPE];
175
10
        if (TypeTraits<Type>::cmp(find_value, value) == 0) {
176
9
            *exact_match = true;
177
9
        } else {
178
1
            *exact_match = false;
179
1
        }
180
181
10
        _cur_idx = left;
182
10
        return Status::OK();
183
11
    }
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE14EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE28EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE29EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE41EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE15EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE40EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE16EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE31EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE32EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE33EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE37EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE38EE22seek_at_or_after_valueEPKvPb
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE39EE22seek_at_or_after_valueEPKvPb
184
185
430k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override {
186
430k
        DCHECK(_parsed);
187
430k
        if (*n == 0 || _cur_idx >= _num_elems) [[unlikely]] {
188
0
            return Status::OK();
189
0
        }
190
191
430k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elems - _cur_idx));
192
430k
        const void* src_data = &_data[PLAIN_PAGE_HEADER_SIZE + _cur_idx * SIZE_OF_TYPE];
193
194
430k
        dst->insert_many_fix_len_data((const char*)src_data, max_fetch);
195
196
430k
        *n = max_fetch;
197
430k
        _cur_idx += max_fetch;
198
199
430k
        return Status::OK();
200
430k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE1EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
185
105k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override {
186
105k
        DCHECK(_parsed);
187
105k
        if (*n == 0 || _cur_idx >= _num_elems) [[unlikely]] {
188
0
            return Status::OK();
189
0
        }
190
191
105k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elems - _cur_idx));
192
105k
        const void* src_data = &_data[PLAIN_PAGE_HEADER_SIZE + _cur_idx * SIZE_OF_TYPE];
193
194
105k
        dst->insert_many_fix_len_data((const char*)src_data, max_fetch);
195
196
105k
        *n = max_fetch;
197
105k
        _cur_idx += max_fetch;
198
199
105k
        return Status::OK();
200
105k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE3EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
185
13.9k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override {
186
13.9k
        DCHECK(_parsed);
187
13.9k
        if (*n == 0 || _cur_idx >= _num_elems) [[unlikely]] {
188
0
            return Status::OK();
189
0
        }
190
191
13.9k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elems - _cur_idx));
192
13.9k
        const void* src_data = &_data[PLAIN_PAGE_HEADER_SIZE + _cur_idx * SIZE_OF_TYPE];
193
194
13.9k
        dst->insert_many_fix_len_data((const char*)src_data, max_fetch);
195
196
13.9k
        *n = max_fetch;
197
13.9k
        _cur_idx += max_fetch;
198
199
13.9k
        return Status::OK();
200
13.9k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE5EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
185
204k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override {
186
204k
        DCHECK(_parsed);
187
204k
        if (*n == 0 || _cur_idx >= _num_elems) [[unlikely]] {
188
0
            return Status::OK();
189
0
        }
190
191
204k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elems - _cur_idx));
192
204k
        const void* src_data = &_data[PLAIN_PAGE_HEADER_SIZE + _cur_idx * SIZE_OF_TYPE];
193
194
204k
        dst->insert_many_fix_len_data((const char*)src_data, max_fetch);
195
196
204k
        *n = max_fetch;
197
204k
        _cur_idx += max_fetch;
198
199
204k
        return Status::OK();
200
204k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE7EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
185
66.3k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override {
186
66.3k
        DCHECK(_parsed);
187
66.3k
        if (*n == 0 || _cur_idx >= _num_elems) [[unlikely]] {
188
0
            return Status::OK();
189
0
        }
190
191
66.3k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elems - _cur_idx));
192
66.3k
        const void* src_data = &_data[PLAIN_PAGE_HEADER_SIZE + _cur_idx * SIZE_OF_TYPE];
193
194
66.3k
        dst->insert_many_fix_len_data((const char*)src_data, max_fetch);
195
196
66.3k
        *n = max_fetch;
197
66.3k
        _cur_idx += max_fetch;
198
199
66.3k
        return Status::OK();
200
66.3k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE9EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
185
14.3k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override {
186
14.3k
        DCHECK(_parsed);
187
14.3k
        if (*n == 0 || _cur_idx >= _num_elems) [[unlikely]] {
188
0
            return Status::OK();
189
0
        }
190
191
14.3k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elems - _cur_idx));
192
14.3k
        const void* src_data = &_data[PLAIN_PAGE_HEADER_SIZE + _cur_idx * SIZE_OF_TYPE];
193
194
14.3k
        dst->insert_many_fix_len_data((const char*)src_data, max_fetch);
195
196
14.3k
        *n = max_fetch;
197
14.3k
        _cur_idx += max_fetch;
198
199
14.3k
        return Status::OK();
200
14.3k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE10EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
185
9.68k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override {
186
9.68k
        DCHECK(_parsed);
187
9.69k
        if (*n == 0 || _cur_idx >= _num_elems) [[unlikely]] {
188
0
            return Status::OK();
189
0
        }
190
191
9.68k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elems - _cur_idx));
192
9.68k
        const void* src_data = &_data[PLAIN_PAGE_HEADER_SIZE + _cur_idx * SIZE_OF_TYPE];
193
194
9.68k
        dst->insert_many_fix_len_data((const char*)src_data, max_fetch);
195
196
9.68k
        *n = max_fetch;
197
9.68k
        _cur_idx += max_fetch;
198
199
9.68k
        return Status::OK();
200
9.68k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE11EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Line
Count
Source
185
15.4k
    Status next_batch(size_t* n, MutableColumnPtr& dst) override {
186
15.4k
        DCHECK(_parsed);
187
15.4k
        if (*n == 0 || _cur_idx >= _num_elems) [[unlikely]] {
188
0
            return Status::OK();
189
0
        }
190
191
15.4k
        size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elems - _cur_idx));
192
15.4k
        const void* src_data = &_data[PLAIN_PAGE_HEADER_SIZE + _cur_idx * SIZE_OF_TYPE];
193
194
15.4k
        dst->insert_many_fix_len_data((const char*)src_data, max_fetch);
195
196
15.4k
        *n = max_fetch;
197
15.4k
        _cur_idx += max_fetch;
198
199
15.4k
        return Status::OK();
200
15.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE24EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE14EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE28EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE29EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE41EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE15EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE40EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE16EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE31EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE32EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE33EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE37EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE38EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE39EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE
201
202
    Status read_by_rowids(const rowid_t* rowids, ordinal_t page_first_ordinal, size_t* n,
203
225k
                          MutableColumnPtr& dst) override {
204
225k
        DCHECK(_parsed);
205
225k
        if (*n == 0) [[unlikely]] {
206
0
            return Status::OK();
207
0
        }
208
209
225k
        auto total = *n;
210
225k
        auto read_count = 0;
211
225k
        _buffer.resize(total);
212
38.2M
        for (size_t i = 0; i < total; ++i) {
213
38.0M
            ordinal_t ord = rowids[i] - page_first_ordinal;
214
38.0M
            if (UNLIKELY(ord >= _num_elems)) {
215
4.91k
                break;
216
4.91k
            }
217
218
38.0M
            _buffer[read_count++] =
219
38.0M
                    unaligned_load<CppType>(&_data[PLAIN_PAGE_HEADER_SIZE + ord * SIZE_OF_TYPE]);
220
38.0M
        }
221
222
225k
        if (LIKELY(read_count > 0)) {
223
225k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
224
225k
        }
225
226
225k
        *n = read_count;
227
225k
        return Status::OK();
228
225k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
203
17.2k
                          MutableColumnPtr& dst) override {
204
17.2k
        DCHECK(_parsed);
205
17.2k
        if (*n == 0) [[unlikely]] {
206
0
            return Status::OK();
207
0
        }
208
209
17.2k
        auto total = *n;
210
17.2k
        auto read_count = 0;
211
17.2k
        _buffer.resize(total);
212
1.12M
        for (size_t i = 0; i < total; ++i) {
213
1.10M
            ordinal_t ord = rowids[i] - page_first_ordinal;
214
1.10M
            if (UNLIKELY(ord >= _num_elems)) {
215
33
                break;
216
33
            }
217
218
1.10M
            _buffer[read_count++] =
219
1.10M
                    unaligned_load<CppType>(&_data[PLAIN_PAGE_HEADER_SIZE + ord * SIZE_OF_TYPE]);
220
1.10M
        }
221
222
17.2k
        if (LIKELY(read_count > 0)) {
223
17.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
224
17.2k
        }
225
226
17.2k
        *n = read_count;
227
17.2k
        return Status::OK();
228
17.2k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
203
5.88k
                          MutableColumnPtr& dst) override {
204
5.88k
        DCHECK(_parsed);
205
5.88k
        if (*n == 0) [[unlikely]] {
206
0
            return Status::OK();
207
0
        }
208
209
5.88k
        auto total = *n;
210
5.88k
        auto read_count = 0;
211
5.88k
        _buffer.resize(total);
212
615k
        for (size_t i = 0; i < total; ++i) {
213
609k
            ordinal_t ord = rowids[i] - page_first_ordinal;
214
609k
            if (UNLIKELY(ord >= _num_elems)) {
215
14
                break;
216
14
            }
217
218
609k
            _buffer[read_count++] =
219
609k
                    unaligned_load<CppType>(&_data[PLAIN_PAGE_HEADER_SIZE + ord * SIZE_OF_TYPE]);
220
609k
        }
221
222
5.88k
        if (LIKELY(read_count > 0)) {
223
5.88k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
224
5.88k
        }
225
226
5.88k
        *n = read_count;
227
5.88k
        return Status::OK();
228
5.88k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
203
62.2k
                          MutableColumnPtr& dst) override {
204
62.2k
        DCHECK(_parsed);
205
62.2k
        if (*n == 0) [[unlikely]] {
206
0
            return Status::OK();
207
0
        }
208
209
62.2k
        auto total = *n;
210
62.2k
        auto read_count = 0;
211
62.2k
        _buffer.resize(total);
212
9.24M
        for (size_t i = 0; i < total; ++i) {
213
9.17M
            ordinal_t ord = rowids[i] - page_first_ordinal;
214
9.17M
            if (UNLIKELY(ord >= _num_elems)) {
215
525
                break;
216
525
            }
217
218
9.17M
            _buffer[read_count++] =
219
9.17M
                    unaligned_load<CppType>(&_data[PLAIN_PAGE_HEADER_SIZE + ord * SIZE_OF_TYPE]);
220
9.17M
        }
221
222
62.2k
        if (LIKELY(read_count > 0)) {
223
62.2k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
224
62.2k
        }
225
226
62.2k
        *n = read_count;
227
62.2k
        return Status::OK();
228
62.2k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
203
115k
                          MutableColumnPtr& dst) override {
204
115k
        DCHECK(_parsed);
205
115k
        if (*n == 0) [[unlikely]] {
206
0
            return Status::OK();
207
0
        }
208
209
115k
        auto total = *n;
210
115k
        auto read_count = 0;
211
115k
        _buffer.resize(total);
212
17.4M
        for (size_t i = 0; i < total; ++i) {
213
17.2M
            ordinal_t ord = rowids[i] - page_first_ordinal;
214
17.2M
            if (UNLIKELY(ord >= _num_elems)) {
215
2.31k
                break;
216
2.31k
            }
217
218
17.2M
            _buffer[read_count++] =
219
17.2M
                    unaligned_load<CppType>(&_data[PLAIN_PAGE_HEADER_SIZE + ord * SIZE_OF_TYPE]);
220
17.2M
        }
221
222
115k
        if (LIKELY(read_count > 0)) {
223
115k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
224
115k
        }
225
226
115k
        *n = read_count;
227
115k
        return Status::OK();
228
115k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
203
7.98k
                          MutableColumnPtr& dst) override {
204
7.98k
        DCHECK(_parsed);
205
7.98k
        if (*n == 0) [[unlikely]] {
206
0
            return Status::OK();
207
0
        }
208
209
7.98k
        auto total = *n;
210
7.98k
        auto read_count = 0;
211
7.98k
        _buffer.resize(total);
212
1.25M
        for (size_t i = 0; i < total; ++i) {
213
1.24M
            ordinal_t ord = rowids[i] - page_first_ordinal;
214
1.24M
            if (UNLIKELY(ord >= _num_elems)) {
215
565
                break;
216
565
            }
217
218
1.24M
            _buffer[read_count++] =
219
1.24M
                    unaligned_load<CppType>(&_data[PLAIN_PAGE_HEADER_SIZE + ord * SIZE_OF_TYPE]);
220
1.24M
        }
221
222
7.98k
        if (LIKELY(read_count > 0)) {
223
7.98k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
224
7.98k
        }
225
226
7.98k
        *n = read_count;
227
7.98k
        return Status::OK();
228
7.98k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
203
6.02k
                          MutableColumnPtr& dst) override {
204
6.02k
        DCHECK(_parsed);
205
6.02k
        if (*n == 0) [[unlikely]] {
206
0
            return Status::OK();
207
0
        }
208
209
6.02k
        auto total = *n;
210
6.02k
        auto read_count = 0;
211
6.02k
        _buffer.resize(total);
212
1.20M
        for (size_t i = 0; i < total; ++i) {
213
1.20M
            ordinal_t ord = rowids[i] - page_first_ordinal;
214
1.20M
            if (UNLIKELY(ord >= _num_elems)) {
215
32
                break;
216
32
            }
217
218
1.20M
            _buffer[read_count++] =
219
1.20M
                    unaligned_load<CppType>(&_data[PLAIN_PAGE_HEADER_SIZE + ord * SIZE_OF_TYPE]);
220
1.20M
        }
221
222
6.02k
        if (LIKELY(read_count > 0)) {
223
6.02k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
224
6.02k
        }
225
226
6.02k
        *n = read_count;
227
6.02k
        return Status::OK();
228
6.02k
    }
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Line
Count
Source
203
10.5k
                          MutableColumnPtr& dst) override {
204
10.5k
        DCHECK(_parsed);
205
10.5k
        if (*n == 0) [[unlikely]] {
206
0
            return Status::OK();
207
0
        }
208
209
10.5k
        auto total = *n;
210
10.5k
        auto read_count = 0;
211
10.5k
        _buffer.resize(total);
212
7.40M
        for (size_t i = 0; i < total; ++i) {
213
7.39M
            ordinal_t ord = rowids[i] - page_first_ordinal;
214
7.39M
            if (UNLIKELY(ord >= _num_elems)) {
215
1.43k
                break;
216
1.43k
            }
217
218
7.39M
            _buffer[read_count++] =
219
7.39M
                    unaligned_load<CppType>(&_data[PLAIN_PAGE_HEADER_SIZE + ord * SIZE_OF_TYPE]);
220
7.39M
        }
221
222
10.5k
        if (LIKELY(read_count > 0)) {
223
10.5k
            dst->insert_many_fix_len_data((char*)_buffer.data(), read_count);
224
10.5k
        }
225
226
10.5k
        *n = read_count;
227
10.5k
        return Status::OK();
228
10.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE24EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE14EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE28EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE29EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE41EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE15EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE40EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE16EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE31EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE32EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE33EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE37EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE38EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE39EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE
229
230
0
    size_t count() const override {
231
0
        DCHECK(_parsed);
232
0
        return _num_elems;
233
0
    }
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE1EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE3EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE5EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE7EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE9EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE10EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE11EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE24EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE14EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE28EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE29EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE41EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE15EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE40EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE16EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE31EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE32EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE33EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE37EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE38EE5countEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE39EE5countEv
234
235
1.54M
    size_t current_index() const override {
236
        DCHECK(_parsed);
237
1.54M
        return _cur_idx;
238
1.54M
    }
_ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE1EE13current_indexEv
Line
Count
Source
235
229k
    size_t current_index() const override {
236
        DCHECK(_parsed);
237
229k
        return _cur_idx;
238
229k
    }
_ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE3EE13current_indexEv
Line
Count
Source
235
228k
    size_t current_index() const override {
236
        DCHECK(_parsed);
237
228k
        return _cur_idx;
238
228k
    }
_ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE5EE13current_indexEv
Line
Count
Source
235
238k
    size_t current_index() const override {
236
        DCHECK(_parsed);
237
238k
        return _cur_idx;
238
238k
    }
_ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE7EE13current_indexEv
Line
Count
Source
235
277k
    size_t current_index() const override {
236
        DCHECK(_parsed);
237
277k
        return _cur_idx;
238
277k
    }
_ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE9EE13current_indexEv
Line
Count
Source
235
126k
    size_t current_index() const override {
236
        DCHECK(_parsed);
237
126k
        return _cur_idx;
238
126k
    }
_ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE10EE13current_indexEv
Line
Count
Source
235
235k
    size_t current_index() const override {
236
        DCHECK(_parsed);
237
235k
        return _cur_idx;
238
235k
    }
_ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE11EE13current_indexEv
Line
Count
Source
235
205k
    size_t current_index() const override {
236
        DCHECK(_parsed);
237
205k
        return _cur_idx;
238
205k
    }
_ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE24EE13current_indexEv
Line
Count
Source
235
13
    size_t current_index() const override {
236
        DCHECK(_parsed);
237
13
        return _cur_idx;
238
13
    }
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE14EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE28EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE29EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE41EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE15EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE40EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE16EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE31EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE32EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE33EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE37EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE38EE13current_indexEv
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE39EE13current_indexEv
239
240
private:
241
    Slice _data;
242
    PageDecoderOptions _options;
243
    bool _parsed;
244
    uint32_t _num_elems;
245
    uint32_t _cur_idx;
246
    typedef typename TypeTraits<Type>::CppType CppType;
247
    enum { SIZE_OF_TYPE = TypeTraits<Type>::size };
248
249
    std::vector<std::conditional_t<std::is_same_v<CppType, bool>, uint8_t, CppType>> _buffer;
250
};
251
252
} // namespace segment_v2
253
} // namespace doris