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 | 168k | 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 | 168k | return reset(); |
45 | 168k | } _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE1EE4initEv Line | Count | Source | 41 | 38.2k | 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 | 38.2k | return reset(); | 45 | 38.2k | } |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE3EE4initEv Line | Count | Source | 41 | 6.32k | 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.32k | return reset(); | 45 | 6.32k | } |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE5EE4initEv Line | Count | Source | 41 | 38.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 | 38.5k | return reset(); | 45 | 38.5k | } |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE7EE4initEv Line | Count | Source | 41 | 76.2k | 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 | 76.2k | return reset(); | 45 | 76.2k | } |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE9EE4initEv Line | Count | Source | 41 | 8.78k | 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.78k | return reset(); | 45 | 8.78k | } |
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE10EE4initEv Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE11EE4initEv Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE24EE4initEv Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE14EE4initEv Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE28EE4initEv Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE29EE4initEv 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 | 434k | bool is_page_full() override { return _remain_element_capacity == 0; }_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE1EE12is_page_fullEv Line | Count | Source | 47 | 87.6k | bool is_page_full() override { return _remain_element_capacity == 0; } |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE3EE12is_page_fullEv Line | Count | Source | 47 | 23.8k | bool is_page_full() override { return _remain_element_capacity == 0; } |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE5EE12is_page_fullEv Line | Count | Source | 47 | 97.7k | bool is_page_full() override { return _remain_element_capacity == 0; } |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE7EE12is_page_fullEv Line | Count | Source | 47 | 207k | bool is_page_full() override { return _remain_element_capacity == 0; } |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE9EE12is_page_fullEv Line | Count | Source | 47 | 17.8k | bool is_page_full() override { return _remain_element_capacity == 0; } |
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE10EE12is_page_fullEv Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE11EE12is_page_fullEv Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE24EE12is_page_fullEv 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_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 | 217k | Status add(const uint8_t* vals, size_t* count) override { |
50 | 217k | if (is_page_full() || *count == 0) { |
51 | 0 | *count = 0; |
52 | 0 | return Status::OK(); |
53 | 0 | } |
54 | 217k | size_t old_size = _buffer.size(); |
55 | 217k | 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 | 217k | RETURN_IF_CATCH_EXCEPTION(_buffer.resize(old_size + to_add * SIZE_OF_TYPE)); |
59 | 217k | memcpy(&_buffer[old_size], vals, to_add * SIZE_OF_TYPE); |
60 | 217k | _count += to_add; |
61 | 217k | _raw_data_size += to_add * SIZE_OF_TYPE; |
62 | | |
63 | 217k | *count = to_add; |
64 | 217k | _remain_element_capacity -= to_add; |
65 | 217k | return Status::OK(); |
66 | 217k | } _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE1EE3addEPKhPm Line | Count | Source | 49 | 43.8k | Status add(const uint8_t* vals, size_t* count) override { | 50 | 43.8k | if (is_page_full() || *count == 0) { | 51 | 0 | *count = 0; | 52 | 0 | return Status::OK(); | 53 | 0 | } | 54 | 43.8k | size_t old_size = _buffer.size(); | 55 | 43.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 | 43.8k | RETURN_IF_CATCH_EXCEPTION(_buffer.resize(old_size + to_add * SIZE_OF_TYPE)); | 59 | 43.8k | memcpy(&_buffer[old_size], vals, to_add * SIZE_OF_TYPE); | 60 | 43.8k | _count += to_add; | 61 | 43.8k | _raw_data_size += to_add * SIZE_OF_TYPE; | 62 | | | 63 | 43.8k | *count = to_add; | 64 | 43.8k | _remain_element_capacity -= to_add; | 65 | 43.8k | return Status::OK(); | 66 | 43.8k | } |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE3EE3addEPKhPm Line | Count | Source | 49 | 11.9k | Status add(const uint8_t* vals, size_t* count) override { | 50 | 11.9k | if (is_page_full() || *count == 0) { | 51 | 0 | *count = 0; | 52 | 0 | return Status::OK(); | 53 | 0 | } | 54 | 11.9k | size_t old_size = _buffer.size(); | 55 | 11.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 | 11.9k | RETURN_IF_CATCH_EXCEPTION(_buffer.resize(old_size + to_add * SIZE_OF_TYPE)); | 59 | 11.9k | memcpy(&_buffer[old_size], vals, to_add * SIZE_OF_TYPE); | 60 | 11.9k | _count += to_add; | 61 | 11.9k | _raw_data_size += to_add * SIZE_OF_TYPE; | 62 | | | 63 | 11.9k | *count = to_add; | 64 | 11.9k | _remain_element_capacity -= to_add; | 65 | 11.9k | return Status::OK(); | 66 | 11.9k | } |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE5EE3addEPKhPm Line | Count | Source | 49 | 48.8k | Status add(const uint8_t* vals, size_t* count) override { | 50 | 48.8k | if (is_page_full() || *count == 0) { | 51 | 0 | *count = 0; | 52 | 0 | return Status::OK(); | 53 | 0 | } | 54 | 48.8k | size_t old_size = _buffer.size(); | 55 | 48.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 | 48.8k | RETURN_IF_CATCH_EXCEPTION(_buffer.resize(old_size + to_add * SIZE_OF_TYPE)); | 59 | 48.8k | memcpy(&_buffer[old_size], vals, to_add * SIZE_OF_TYPE); | 60 | 48.8k | _count += to_add; | 61 | 48.8k | _raw_data_size += to_add * SIZE_OF_TYPE; | 62 | | | 63 | 48.8k | *count = to_add; | 64 | 48.8k | _remain_element_capacity -= to_add; | 65 | 48.8k | return Status::OK(); | 66 | 48.8k | } |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE7EE3addEPKhPm Line | Count | Source | 49 | 103k | Status add(const uint8_t* vals, size_t* count) override { | 50 | 103k | if (is_page_full() || *count == 0) { | 51 | 0 | *count = 0; | 52 | 0 | return Status::OK(); | 53 | 0 | } | 54 | 103k | size_t old_size = _buffer.size(); | 55 | 103k | 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 | 103k | RETURN_IF_CATCH_EXCEPTION(_buffer.resize(old_size + to_add * SIZE_OF_TYPE)); | 59 | 103k | memcpy(&_buffer[old_size], vals, to_add * SIZE_OF_TYPE); | 60 | 103k | _count += to_add; | 61 | 103k | _raw_data_size += to_add * SIZE_OF_TYPE; | 62 | | | 63 | 103k | *count = to_add; | 64 | 103k | _remain_element_capacity -= to_add; | 65 | 103k | return Status::OK(); | 66 | 103k | } |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE9EE3addEPKhPm Line | Count | Source | 49 | 8.92k | Status add(const uint8_t* vals, size_t* count) override { | 50 | 8.92k | if (is_page_full() || *count == 0) { | 51 | 0 | *count = 0; | 52 | 0 | return Status::OK(); | 53 | 0 | } | 54 | 8.92k | size_t old_size = _buffer.size(); | 55 | 8.92k | 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 | 8.92k | RETURN_IF_CATCH_EXCEPTION(_buffer.resize(old_size + to_add * SIZE_OF_TYPE)); | 59 | 8.92k | memcpy(&_buffer[old_size], vals, to_add * SIZE_OF_TYPE); | 60 | 8.92k | _count += to_add; | 61 | 8.92k | _raw_data_size += to_add * SIZE_OF_TYPE; | 62 | | | 63 | 8.92k | *count = to_add; | 64 | 8.92k | _remain_element_capacity -= to_add; | 65 | 8.92k | return Status::OK(); | 66 | 8.92k | } |
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE10EE3addEPKhPm Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE11EE3addEPKhPm Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE24EE3addEPKhPm Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE14EE3addEPKhPm Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE28EE3addEPKhPm Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE29EE3addEPKhPm 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 | 173k | Status finish(OwnedSlice* slice) override { |
69 | 173k | encode_fixed32_le((uint8_t*)&_buffer[0], cast_set<uint32_t>(_count)); |
70 | 173k | RETURN_IF_CATCH_EXCEPTION({ *slice = _buffer.build(); }); |
71 | 173k | return Status::OK(); |
72 | 173k | } _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE1EE6finishEPNS_10OwnedSliceE Line | Count | Source | 68 | 37.3k | Status finish(OwnedSlice* slice) override { | 69 | 37.3k | encode_fixed32_le((uint8_t*)&_buffer[0], cast_set<uint32_t>(_count)); | 70 | 37.3k | RETURN_IF_CATCH_EXCEPTION({ *slice = _buffer.build(); }); | 71 | 37.3k | return Status::OK(); | 72 | 37.3k | } |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE3EE6finishEPNS_10OwnedSliceE Line | Count | Source | 68 | 6.24k | Status finish(OwnedSlice* slice) override { | 69 | 6.24k | encode_fixed32_le((uint8_t*)&_buffer[0], cast_set<uint32_t>(_count)); | 70 | 6.24k | RETURN_IF_CATCH_EXCEPTION({ *slice = _buffer.build(); }); | 71 | 6.24k | return Status::OK(); | 72 | 6.24k | } |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE5EE6finishEPNS_10OwnedSliceE Line | Count | Source | 68 | 41.2k | Status finish(OwnedSlice* slice) override { | 69 | 41.2k | encode_fixed32_le((uint8_t*)&_buffer[0], cast_set<uint32_t>(_count)); | 70 | 41.2k | RETURN_IF_CATCH_EXCEPTION({ *slice = _buffer.build(); }); | 71 | 41.2k | return Status::OK(); | 72 | 41.2k | } |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE7EE6finishEPNS_10OwnedSliceE Line | Count | Source | 68 | 79.5k | Status finish(OwnedSlice* slice) override { | 69 | 79.5k | encode_fixed32_le((uint8_t*)&_buffer[0], cast_set<uint32_t>(_count)); | 70 | 79.5k | RETURN_IF_CATCH_EXCEPTION({ *slice = _buffer.build(); }); | 71 | 79.5k | return Status::OK(); | 72 | 79.5k | } |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE9EE6finishEPNS_10OwnedSliceE Line | Count | Source | 68 | 8.80k | Status finish(OwnedSlice* slice) override { | 69 | 8.80k | encode_fixed32_le((uint8_t*)&_buffer[0], cast_set<uint32_t>(_count)); | 70 | 8.80k | RETURN_IF_CATCH_EXCEPTION({ *slice = _buffer.build(); }); | 71 | 8.80k | return Status::OK(); | 72 | 8.80k | } |
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE10EE6finishEPNS_10OwnedSliceE Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE11EE6finishEPNS_10OwnedSliceE Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE24EE6finishEPNS_10OwnedSliceE Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE14EE6finishEPNS_10OwnedSliceE Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE28EE6finishEPNS_10OwnedSliceE Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE29EE6finishEPNS_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 | 341k | Status reset() override { |
75 | 341k | RETURN_IF_CATCH_EXCEPTION({ |
76 | 341k | _buffer.reserve(_options.data_page_size); |
77 | 341k | _count = 0; |
78 | 341k | _raw_data_size = 0; |
79 | 341k | _buffer.clear(); |
80 | 341k | _buffer.resize(PLAIN_PAGE_HEADER_SIZE); |
81 | 341k | _remain_element_capacity = _options.data_page_size / SIZE_OF_TYPE; |
82 | 341k | }); |
83 | 341k | return Status::OK(); |
84 | 341k | } _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE1EE5resetEv Line | Count | Source | 74 | 75.6k | Status reset() override { | 75 | 75.6k | RETURN_IF_CATCH_EXCEPTION({ | 76 | 75.6k | _buffer.reserve(_options.data_page_size); | 77 | 75.6k | _count = 0; | 78 | 75.6k | _raw_data_size = 0; | 79 | 75.6k | _buffer.clear(); | 80 | 75.6k | _buffer.resize(PLAIN_PAGE_HEADER_SIZE); | 81 | 75.6k | _remain_element_capacity = _options.data_page_size / SIZE_OF_TYPE; | 82 | 75.6k | }); | 83 | 75.6k | return Status::OK(); | 84 | 75.6k | } |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE3EE5resetEv Line | Count | Source | 74 | 12.5k | Status reset() override { | 75 | 12.5k | RETURN_IF_CATCH_EXCEPTION({ | 76 | 12.5k | _buffer.reserve(_options.data_page_size); | 77 | 12.5k | _count = 0; | 78 | 12.5k | _raw_data_size = 0; | 79 | 12.5k | _buffer.clear(); | 80 | 12.5k | _buffer.resize(PLAIN_PAGE_HEADER_SIZE); | 81 | 12.5k | _remain_element_capacity = _options.data_page_size / SIZE_OF_TYPE; | 82 | 12.5k | }); | 83 | 12.5k | return Status::OK(); | 84 | 12.5k | } |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE5EE5resetEv Line | Count | Source | 74 | 79.7k | Status reset() override { | 75 | 79.7k | RETURN_IF_CATCH_EXCEPTION({ | 76 | 79.7k | _buffer.reserve(_options.data_page_size); | 77 | 79.7k | _count = 0; | 78 | 79.7k | _raw_data_size = 0; | 79 | 79.7k | _buffer.clear(); | 80 | 79.7k | _buffer.resize(PLAIN_PAGE_HEADER_SIZE); | 81 | 79.7k | _remain_element_capacity = _options.data_page_size / SIZE_OF_TYPE; | 82 | 79.7k | }); | 83 | 79.8k | return Status::OK(); | 84 | 79.7k | } |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE7EE5resetEv Line | Count | Source | 74 | 155k | Status reset() override { | 75 | 155k | RETURN_IF_CATCH_EXCEPTION({ | 76 | 155k | _buffer.reserve(_options.data_page_size); | 77 | 155k | _count = 0; | 78 | 155k | _raw_data_size = 0; | 79 | 155k | _buffer.clear(); | 80 | 155k | _buffer.resize(PLAIN_PAGE_HEADER_SIZE); | 81 | 155k | _remain_element_capacity = _options.data_page_size / SIZE_OF_TYPE; | 82 | 155k | }); | 83 | 155k | return Status::OK(); | 84 | 155k | } |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE9EE5resetEv Line | Count | Source | 74 | 17.5k | Status reset() override { | 75 | 17.5k | RETURN_IF_CATCH_EXCEPTION({ | 76 | 17.5k | _buffer.reserve(_options.data_page_size); | 77 | 17.5k | _count = 0; | 78 | 17.5k | _raw_data_size = 0; | 79 | 17.5k | _buffer.clear(); | 80 | 17.5k | _buffer.resize(PLAIN_PAGE_HEADER_SIZE); | 81 | 17.5k | _remain_element_capacity = _options.data_page_size / SIZE_OF_TYPE; | 82 | 17.5k | }); | 83 | 17.5k | return Status::OK(); | 84 | 17.5k | } |
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE10EE5resetEv Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE11EE5resetEv Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE24EE5resetEv Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE14EE5resetEv Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE28EE5resetEv Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE29EE5resetEv 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_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 | 10.0k | uint64_t size() const override { return _buffer.size(); }_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE1EE4sizeEv Line | Count | Source | 88 | 1.64k | uint64_t size() const override { return _buffer.size(); } |
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE3EE4sizeEv Line | Count | Source | 88 | 818 | uint64_t size() const override { return _buffer.size(); } |
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE5EE4sizeEv Line | Count | Source | 88 | 4.00k | uint64_t size() const override { return _buffer.size(); } |
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE7EE4sizeEv Line | Count | Source | 88 | 2.22k | uint64_t size() const override { return _buffer.size(); } |
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE9EE4sizeEv Line | Count | Source | 88 | 1.38k | uint64_t size() const override { return _buffer.size(); } |
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE10EE4sizeEv Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE11EE4sizeEv Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE24EE4sizeEv Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE14EE4sizeEv Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE28EE4sizeEv Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE29EE4sizeEv 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 | 173k | uint64_t get_raw_data_size() const override { return _raw_data_size; }_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE1EE17get_raw_data_sizeEv Line | Count | Source | 90 | 37.3k | uint64_t get_raw_data_size() const override { return _raw_data_size; } |
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE3EE17get_raw_data_sizeEv Line | Count | Source | 90 | 6.24k | uint64_t get_raw_data_size() const override { return _raw_data_size; } |
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE5EE17get_raw_data_sizeEv Line | Count | Source | 90 | 41.2k | uint64_t get_raw_data_size() const override { return _raw_data_size; } |
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE7EE17get_raw_data_sizeEv Line | Count | Source | 90 | 79.5k | uint64_t get_raw_data_size() const override { return _raw_data_size; } |
_ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE9EE17get_raw_data_sizeEv Line | Count | Source | 90 | 8.80k | uint64_t get_raw_data_size() const override { return _raw_data_size; } |
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE10EE17get_raw_data_sizeEv Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE11EE17get_raw_data_sizeEv 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_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 | 168k | PlainPageBuilder(const PageBuilderOptions& options) : _options(options) {}_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE1EEC2ERKNS0_18PageBuilderOptionsE Line | Count | Source | 93 | 38.2k | PlainPageBuilder(const PageBuilderOptions& options) : _options(options) {} |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE3EEC2ERKNS0_18PageBuilderOptionsE Line | Count | Source | 93 | 6.32k | PlainPageBuilder(const PageBuilderOptions& options) : _options(options) {} |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE5EEC2ERKNS0_18PageBuilderOptionsE Line | Count | Source | 93 | 38.5k | PlainPageBuilder(const PageBuilderOptions& options) : _options(options) {} |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE7EEC2ERKNS0_18PageBuilderOptionsE Line | Count | Source | 93 | 76.2k | PlainPageBuilder(const PageBuilderOptions& options) : _options(options) {} |
_ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE9EEC2ERKNS0_18PageBuilderOptionsE Line | Count | Source | 93 | 8.78k | PlainPageBuilder(const PageBuilderOptions& options) : _options(options) {} |
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE10EEC2ERKNS0_18PageBuilderOptionsE Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE11EEC2ERKNS0_18PageBuilderOptionsE Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE24EEC2ERKNS0_18PageBuilderOptionsE Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE14EEC2ERKNS0_18PageBuilderOptionsE Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE28EEC2ERKNS0_18PageBuilderOptionsE Unexecuted instantiation: _ZN5doris10segment_v216PlainPageBuilderILNS_9FieldTypeE29EEC2ERKNS0_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 | 284k | : _data(data), _options(options), _parsed(false), _num_elems(0), _cur_idx(0) {}_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE1EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE Line | Count | Source | 108 | 66.2k | : _data(data), _options(options), _parsed(false), _num_elems(0), _cur_idx(0) {} |
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE3EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE Line | Count | Source | 108 | 9.32k | : _data(data), _options(options), _parsed(false), _num_elems(0), _cur_idx(0) {} |
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE5EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE Line | Count | Source | 108 | 107k | : _data(data), _options(options), _parsed(false), _num_elems(0), _cur_idx(0) {} |
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE7EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE Line | Count | Source | 108 | 89.6k | : _data(data), _options(options), _parsed(false), _num_elems(0), _cur_idx(0) {} |
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE9EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE Line | Count | Source | 108 | 11.9k | : _data(data), _options(options), _parsed(false), _num_elems(0), _cur_idx(0) {} |
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE10EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE11EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE24EEC2ENS_5SliceERKNS0_18PageDecoderOptionsE 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_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 | 284k | Status init() override { |
111 | 284k | CHECK(!_parsed); |
112 | | |
113 | 284k | 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 | 284k | _num_elems = decode_fixed32_le((const uint8_t*)&_data[0]); |
121 | | |
122 | 284k | 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 | 284k | _parsed = true; |
127 | | |
128 | 284k | RETURN_IF_ERROR(seek_to_position_in_page(0)); |
129 | 284k | return Status::OK(); |
130 | 284k | } _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE1EE4initEv Line | Count | Source | 110 | 66.2k | Status init() override { | 111 | 66.2k | CHECK(!_parsed); | 112 | | | 113 | 66.2k | 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 | 66.2k | _num_elems = decode_fixed32_le((const uint8_t*)&_data[0]); | 121 | | | 122 | 66.2k | 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 | 66.2k | _parsed = true; | 127 | | | 128 | 66.2k | RETURN_IF_ERROR(seek_to_position_in_page(0)); | 129 | 66.2k | return Status::OK(); | 130 | 66.2k | } |
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE3EE4initEv Line | Count | Source | 110 | 9.32k | Status init() override { | 111 | 9.32k | CHECK(!_parsed); | 112 | | | 113 | 9.32k | 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 | 9.32k | _num_elems = decode_fixed32_le((const uint8_t*)&_data[0]); | 121 | | | 122 | 9.32k | 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 | 9.32k | _parsed = true; | 127 | | | 128 | 9.32k | RETURN_IF_ERROR(seek_to_position_in_page(0)); | 129 | 9.32k | return Status::OK(); | 130 | 9.32k | } |
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE5EE4initEv Line | Count | Source | 110 | 107k | Status init() override { | 111 | 107k | CHECK(!_parsed); | 112 | | | 113 | 107k | 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 | 107k | _num_elems = decode_fixed32_le((const uint8_t*)&_data[0]); | 121 | | | 122 | 107k | 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 | 107k | _parsed = true; | 127 | | | 128 | 107k | RETURN_IF_ERROR(seek_to_position_in_page(0)); | 129 | 107k | return Status::OK(); | 130 | 107k | } |
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE7EE4initEv Line | Count | Source | 110 | 89.6k | Status init() override { | 111 | 89.6k | CHECK(!_parsed); | 112 | | | 113 | 89.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 | 89.6k | _num_elems = decode_fixed32_le((const uint8_t*)&_data[0]); | 121 | | | 122 | 89.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 | 89.6k | _parsed = true; | 127 | | | 128 | 89.6k | RETURN_IF_ERROR(seek_to_position_in_page(0)); | 129 | 89.6k | return Status::OK(); | 130 | 89.6k | } |
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE9EE4initEv Line | Count | Source | 110 | 11.9k | Status init() override { | 111 | 11.9k | CHECK(!_parsed); | 112 | | | 113 | 11.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 | 11.9k | _num_elems = decode_fixed32_le((const uint8_t*)&_data[0]); | 121 | | | 122 | 11.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 | 11.9k | _parsed = true; | 127 | | | 128 | 11.9k | RETURN_IF_ERROR(seek_to_position_in_page(0)); | 129 | 11.9k | return Status::OK(); | 130 | 11.9k | } |
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE10EE4initEv Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE11EE4initEv Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE24EE4initEv Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE14EE4initEv Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE28EE4initEv Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE29EE4initEv 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 | 614k | Status seek_to_position_in_page(size_t pos) override { |
133 | 18.4E | CHECK(_parsed) << "Must call init()"; |
134 | 614k | if (_num_elems == 0) [[unlikely]] { |
135 | 7.19k | 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.19k | } |
140 | | |
141 | 614k | DCHECK_LE(pos, _num_elems); |
142 | | |
143 | 614k | _cur_idx = cast_set<uint32_t>(pos); |
144 | 614k | return Status::OK(); |
145 | 614k | } _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE1EE24seek_to_position_in_pageEm Line | Count | Source | 132 | 80.5k | Status seek_to_position_in_page(size_t pos) override { | 133 | 80.5k | CHECK(_parsed) << "Must call init()"; | 134 | 80.5k | if (_num_elems == 0) [[unlikely]] { | 135 | 650 | 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 | 650 | } | 140 | | | 141 | 80.5k | DCHECK_LE(pos, _num_elems); | 142 | | | 143 | 80.5k | _cur_idx = cast_set<uint32_t>(pos); | 144 | 80.5k | return Status::OK(); | 145 | 80.5k | } |
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE3EE24seek_to_position_in_pageEm Line | Count | Source | 132 | 11.4k | Status seek_to_position_in_page(size_t pos) override { | 133 | 11.4k | CHECK(_parsed) << "Must call init()"; | 134 | 11.4k | if (_num_elems == 0) [[unlikely]] { | 135 | 120 | 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 | 120 | } | 140 | | | 141 | 11.4k | DCHECK_LE(pos, _num_elems); | 142 | | | 143 | 11.4k | _cur_idx = cast_set<uint32_t>(pos); | 144 | 11.4k | return Status::OK(); | 145 | 11.4k | } |
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE5EE24seek_to_position_in_pageEm Line | Count | Source | 132 | 385k | Status seek_to_position_in_page(size_t pos) override { | 133 | 18.4E | CHECK(_parsed) << "Must call init()"; | 134 | 385k | if (_num_elems == 0) [[unlikely]] { | 135 | 3.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 | 3.10k | } | 140 | | | 141 | 385k | DCHECK_LE(pos, _num_elems); | 142 | | | 143 | 385k | _cur_idx = cast_set<uint32_t>(pos); | 144 | 385k | return Status::OK(); | 145 | 385k | } |
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE7EE24seek_to_position_in_pageEm Line | Count | Source | 132 | 121k | Status seek_to_position_in_page(size_t pos) override { | 133 | 18.4E | CHECK(_parsed) << "Must call init()"; | 134 | 121k | if (_num_elems == 0) [[unlikely]] { | 135 | 3.00k | 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.00k | } | 140 | | | 141 | 121k | DCHECK_LE(pos, _num_elems); | 142 | | | 143 | 121k | _cur_idx = cast_set<uint32_t>(pos); | 144 | 121k | return Status::OK(); | 145 | 121k | } |
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE9EE24seek_to_position_in_pageEm Line | Count | Source | 132 | 15.3k | Status seek_to_position_in_page(size_t pos) override { | 133 | 15.3k | CHECK(_parsed) << "Must call init()"; | 134 | 15.3k | if (_num_elems == 0) [[unlikely]] { | 135 | 323 | 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 | 323 | } | 140 | | | 141 | 15.3k | DCHECK_LE(pos, _num_elems); | 142 | | | 143 | 15.3k | _cur_idx = cast_set<uint32_t>(pos); | 144 | 15.3k | return Status::OK(); | 145 | 15.3k | } |
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE10EE24seek_to_position_in_pageEm Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE11EE24seek_to_position_in_pageEm Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE24EE24seek_to_position_in_pageEm 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_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 | 0 | Status seek_at_or_after_value(const void* value, bool* exact_match) override { |
148 | 0 | DCHECK(_parsed) << "Must call init() firstly"; |
149 | |
|
150 | 0 | if (_num_elems == 0) { |
151 | 0 | return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("page is empty"); |
152 | 0 | } |
153 | | |
154 | 0 | uint32_t left = 0; |
155 | 0 | uint32_t right = _num_elems; |
156 | |
|
157 | 0 | 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 | 0 | while (left < right) { |
163 | 0 | uint32_t mid = left + (right - left) / 2; |
164 | 0 | mid_value = &_data[PLAIN_PAGE_HEADER_SIZE + mid * SIZE_OF_TYPE]; |
165 | 0 | if (TypeTraits<Type>::cmp(mid_value, value) < 0) { |
166 | 0 | left = mid + 1; |
167 | 0 | } else { |
168 | 0 | right = mid; |
169 | 0 | } |
170 | 0 | } |
171 | 0 | if (left >= _num_elems) { |
172 | 0 | return Status::Error<ErrorCode::ENTRY_NOT_FOUND>("all value small than the value"); |
173 | 0 | } |
174 | 0 | const void* find_value = &_data[PLAIN_PAGE_HEADER_SIZE + left * SIZE_OF_TYPE]; |
175 | 0 | if (TypeTraits<Type>::cmp(find_value, value) == 0) { |
176 | 0 | *exact_match = true; |
177 | 0 | } else { |
178 | 0 | *exact_match = false; |
179 | 0 | } |
180 | |
|
181 | 0 | _cur_idx = left; |
182 | 0 | return Status::OK(); |
183 | 0 | } Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE1EE22seek_at_or_after_valueEPKvPb Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE3EE22seek_at_or_after_valueEPKvPb Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE5EE22seek_at_or_after_valueEPKvPb Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE7EE22seek_at_or_after_valueEPKvPb 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 Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE24EE22seek_at_or_after_valueEPKvPb 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_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 | 528k | Status next_batch(size_t* n, MutableColumnPtr& dst) override { |
186 | 528k | DCHECK(_parsed); |
187 | 528k | if (*n == 0 || _cur_idx >= _num_elems) [[unlikely]] { |
188 | 0 | return Status::OK(); |
189 | 0 | } |
190 | | |
191 | 528k | size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elems - _cur_idx)); |
192 | 528k | const void* src_data = &_data[PLAIN_PAGE_HEADER_SIZE + _cur_idx * SIZE_OF_TYPE]; |
193 | | |
194 | 528k | dst->insert_many_fix_len_data((const char*)src_data, max_fetch); |
195 | | |
196 | 528k | *n = max_fetch; |
197 | 528k | _cur_idx += max_fetch; |
198 | | |
199 | 528k | return Status::OK(); |
200 | 528k | } _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE1EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE Line | Count | Source | 185 | 84.6k | Status next_batch(size_t* n, MutableColumnPtr& dst) override { | 186 | 84.6k | DCHECK(_parsed); | 187 | 84.6k | if (*n == 0 || _cur_idx >= _num_elems) [[unlikely]] { | 188 | 0 | return Status::OK(); | 189 | 0 | } | 190 | | | 191 | 84.6k | size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elems - _cur_idx)); | 192 | 84.6k | const void* src_data = &_data[PLAIN_PAGE_HEADER_SIZE + _cur_idx * SIZE_OF_TYPE]; | 193 | | | 194 | 84.6k | dst->insert_many_fix_len_data((const char*)src_data, max_fetch); | 195 | | | 196 | 84.6k | *n = max_fetch; | 197 | 84.6k | _cur_idx += max_fetch; | 198 | | | 199 | 84.6k | return Status::OK(); | 200 | 84.6k | } |
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE3EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE Line | Count | Source | 185 | 11.3k | Status next_batch(size_t* n, MutableColumnPtr& dst) override { | 186 | 11.3k | DCHECK(_parsed); | 187 | 11.3k | if (*n == 0 || _cur_idx >= _num_elems) [[unlikely]] { | 188 | 0 | return Status::OK(); | 189 | 0 | } | 190 | | | 191 | 11.3k | size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elems - _cur_idx)); | 192 | 11.3k | const void* src_data = &_data[PLAIN_PAGE_HEADER_SIZE + _cur_idx * SIZE_OF_TYPE]; | 193 | | | 194 | 11.3k | dst->insert_many_fix_len_data((const char*)src_data, max_fetch); | 195 | | | 196 | 11.3k | *n = max_fetch; | 197 | 11.3k | _cur_idx += max_fetch; | 198 | | | 199 | 11.3k | return Status::OK(); | 200 | 11.3k | } |
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE5EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE Line | Count | Source | 185 | 343k | Status next_batch(size_t* n, MutableColumnPtr& dst) override { | 186 | 343k | DCHECK(_parsed); | 187 | 343k | if (*n == 0 || _cur_idx >= _num_elems) [[unlikely]] { | 188 | 0 | return Status::OK(); | 189 | 0 | } | 190 | | | 191 | 343k | size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elems - _cur_idx)); | 192 | 343k | const void* src_data = &_data[PLAIN_PAGE_HEADER_SIZE + _cur_idx * SIZE_OF_TYPE]; | 193 | | | 194 | 343k | dst->insert_many_fix_len_data((const char*)src_data, max_fetch); | 195 | | | 196 | 343k | *n = max_fetch; | 197 | 343k | _cur_idx += max_fetch; | 198 | | | 199 | 343k | return Status::OK(); | 200 | 343k | } |
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE7EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE Line | Count | Source | 185 | 75.9k | Status next_batch(size_t* n, MutableColumnPtr& dst) override { | 186 | 75.9k | DCHECK(_parsed); | 187 | 75.9k | if (*n == 0 || _cur_idx >= _num_elems) [[unlikely]] { | 188 | 0 | return Status::OK(); | 189 | 0 | } | 190 | | | 191 | 75.9k | size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elems - _cur_idx)); | 192 | 75.9k | const void* src_data = &_data[PLAIN_PAGE_HEADER_SIZE + _cur_idx * SIZE_OF_TYPE]; | 193 | | | 194 | 75.9k | dst->insert_many_fix_len_data((const char*)src_data, max_fetch); | 195 | | | 196 | 75.9k | *n = max_fetch; | 197 | 75.9k | _cur_idx += max_fetch; | 198 | | | 199 | 75.9k | return Status::OK(); | 200 | 75.9k | } |
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE9EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE Line | Count | Source | 185 | 13.4k | Status next_batch(size_t* n, MutableColumnPtr& dst) override { | 186 | 13.4k | DCHECK(_parsed); | 187 | 13.4k | if (*n == 0 || _cur_idx >= _num_elems) [[unlikely]] { | 188 | 0 | return Status::OK(); | 189 | 0 | } | 190 | | | 191 | 13.4k | size_t max_fetch = std::min(*n, static_cast<size_t>(_num_elems - _cur_idx)); | 192 | 13.4k | const void* src_data = &_data[PLAIN_PAGE_HEADER_SIZE + _cur_idx * SIZE_OF_TYPE]; | 193 | | | 194 | 13.4k | dst->insert_many_fix_len_data((const char*)src_data, max_fetch); | 195 | | | 196 | 13.4k | *n = max_fetch; | 197 | 13.4k | _cur_idx += max_fetch; | 198 | | | 199 | 13.4k | return Status::OK(); | 200 | 13.4k | } |
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE10EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE11EE10next_batchEPmRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EE 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_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 | 134k | MutableColumnPtr& dst) override { |
204 | 134k | DCHECK(_parsed); |
205 | 134k | if (*n == 0) [[unlikely]] { |
206 | 0 | return Status::OK(); |
207 | 0 | } |
208 | | |
209 | 134k | auto total = *n; |
210 | 134k | auto read_count = 0; |
211 | 134k | _buffer.resize(total); |
212 | 5.64M | for (size_t i = 0; i < total; ++i) { |
213 | 5.51M | ordinal_t ord = rowids[i] - page_first_ordinal; |
214 | 5.51M | if (UNLIKELY(ord >= _num_elems)) { |
215 | 3.24k | break; |
216 | 3.24k | } |
217 | | |
218 | 5.51M | _buffer[read_count++] = |
219 | 5.51M | unaligned_load<CppType>(&_data[PLAIN_PAGE_HEADER_SIZE + ord * SIZE_OF_TYPE]); |
220 | 5.51M | } |
221 | | |
222 | 134k | if (LIKELY(read_count > 0)) { |
223 | 134k | dst->insert_many_fix_len_data((char*)_buffer.data(), read_count); |
224 | 134k | } |
225 | | |
226 | 134k | *n = read_count; |
227 | 134k | return Status::OK(); |
228 | 134k | } _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE1EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE Line | Count | Source | 203 | 19.7k | MutableColumnPtr& dst) override { | 204 | 19.7k | DCHECK(_parsed); | 205 | 19.7k | if (*n == 0) [[unlikely]] { | 206 | 0 | return Status::OK(); | 207 | 0 | } | 208 | | | 209 | 19.7k | auto total = *n; | 210 | 19.7k | auto read_count = 0; | 211 | 19.7k | _buffer.resize(total); | 212 | 279k | for (size_t i = 0; i < total; ++i) { | 213 | 260k | ordinal_t ord = rowids[i] - page_first_ordinal; | 214 | 260k | if (UNLIKELY(ord >= _num_elems)) { | 215 | 115 | break; | 216 | 115 | } | 217 | | | 218 | 260k | _buffer[read_count++] = | 219 | 260k | unaligned_load<CppType>(&_data[PLAIN_PAGE_HEADER_SIZE + ord * SIZE_OF_TYPE]); | 220 | 260k | } | 221 | | | 222 | 19.7k | if (LIKELY(read_count > 0)) { | 223 | 19.7k | dst->insert_many_fix_len_data((char*)_buffer.data(), read_count); | 224 | 19.7k | } | 225 | | | 226 | 19.7k | *n = read_count; | 227 | 19.7k | return Status::OK(); | 228 | 19.7k | } |
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE3EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE Line | Count | Source | 203 | 3.85k | MutableColumnPtr& dst) override { | 204 | 3.85k | DCHECK(_parsed); | 205 | 3.85k | if (*n == 0) [[unlikely]] { | 206 | 0 | return Status::OK(); | 207 | 0 | } | 208 | | | 209 | 3.85k | auto total = *n; | 210 | 3.85k | auto read_count = 0; | 211 | 3.85k | _buffer.resize(total); | 212 | 45.2k | for (size_t i = 0; i < total; ++i) { | 213 | 41.3k | ordinal_t ord = rowids[i] - page_first_ordinal; | 214 | 41.3k | if (UNLIKELY(ord >= _num_elems)) { | 215 | 0 | break; | 216 | 0 | } | 217 | | | 218 | 41.3k | _buffer[read_count++] = | 219 | 41.3k | unaligned_load<CppType>(&_data[PLAIN_PAGE_HEADER_SIZE + ord * SIZE_OF_TYPE]); | 220 | 41.3k | } | 221 | | | 222 | 3.85k | if (LIKELY(read_count > 0)) { | 223 | 3.85k | dst->insert_many_fix_len_data((char*)_buffer.data(), read_count); | 224 | 3.85k | } | 225 | | | 226 | 3.85k | *n = read_count; | 227 | 3.85k | return Status::OK(); | 228 | 3.85k | } |
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE5EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE Line | Count | Source | 203 | 53.7k | MutableColumnPtr& dst) override { | 204 | 53.7k | DCHECK(_parsed); | 205 | 53.7k | if (*n == 0) [[unlikely]] { | 206 | 0 | return Status::OK(); | 207 | 0 | } | 208 | | | 209 | 53.7k | auto total = *n; | 210 | 53.7k | auto read_count = 0; | 211 | 53.7k | _buffer.resize(total); | 212 | 2.88M | for (size_t i = 0; i < total; ++i) { | 213 | 2.83M | ordinal_t ord = rowids[i] - page_first_ordinal; | 214 | 2.83M | if (UNLIKELY(ord >= _num_elems)) { | 215 | 1.27k | break; | 216 | 1.27k | } | 217 | | | 218 | 2.83M | _buffer[read_count++] = | 219 | 2.83M | unaligned_load<CppType>(&_data[PLAIN_PAGE_HEADER_SIZE + ord * SIZE_OF_TYPE]); | 220 | 2.83M | } | 221 | | | 222 | 53.7k | if (LIKELY(read_count > 0)) { | 223 | 53.7k | dst->insert_many_fix_len_data((char*)_buffer.data(), read_count); | 224 | 53.7k | } | 225 | | | 226 | 53.7k | *n = read_count; | 227 | 53.7k | return Status::OK(); | 228 | 53.7k | } |
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE7EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE Line | Count | Source | 203 | 52.7k | MutableColumnPtr& dst) override { | 204 | 52.7k | DCHECK(_parsed); | 205 | 52.7k | if (*n == 0) [[unlikely]] { | 206 | 0 | return Status::OK(); | 207 | 0 | } | 208 | | | 209 | 52.7k | auto total = *n; | 210 | 52.7k | auto read_count = 0; | 211 | 52.7k | _buffer.resize(total); | 212 | 2.42M | for (size_t i = 0; i < total; ++i) { | 213 | 2.37M | ordinal_t ord = rowids[i] - page_first_ordinal; | 214 | 2.37M | if (UNLIKELY(ord >= _num_elems)) { | 215 | 1.85k | break; | 216 | 1.85k | } | 217 | | | 218 | 2.36M | _buffer[read_count++] = | 219 | 2.36M | unaligned_load<CppType>(&_data[PLAIN_PAGE_HEADER_SIZE + ord * SIZE_OF_TYPE]); | 220 | 2.36M | } | 221 | | | 222 | 52.7k | if (LIKELY(read_count > 0)) { | 223 | 52.7k | dst->insert_many_fix_len_data((char*)_buffer.data(), read_count); | 224 | 52.7k | } | 225 | | | 226 | 52.7k | *n = read_count; | 227 | 52.7k | return Status::OK(); | 228 | 52.7k | } |
_ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE9EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE Line | Count | Source | 203 | 4.71k | MutableColumnPtr& dst) override { | 204 | 4.71k | DCHECK(_parsed); | 205 | 4.71k | if (*n == 0) [[unlikely]] { | 206 | 0 | return Status::OK(); | 207 | 0 | } | 208 | | | 209 | 4.71k | auto total = *n; | 210 | 4.71k | auto read_count = 0; | 211 | 4.71k | _buffer.resize(total); | 212 | 12.1k | for (size_t i = 0; i < total; ++i) { | 213 | 7.38k | ordinal_t ord = rowids[i] - page_first_ordinal; | 214 | 7.38k | if (UNLIKELY(ord >= _num_elems)) { | 215 | 0 | break; | 216 | 0 | } | 217 | | | 218 | 7.38k | _buffer[read_count++] = | 219 | 7.38k | unaligned_load<CppType>(&_data[PLAIN_PAGE_HEADER_SIZE + ord * SIZE_OF_TYPE]); | 220 | 7.38k | } | 221 | | | 222 | 4.71k | if (LIKELY(read_count > 0)) { | 223 | 4.71k | dst->insert_many_fix_len_data((char*)_buffer.data(), read_count); | 224 | 4.71k | } | 225 | | | 226 | 4.71k | *n = read_count; | 227 | 4.71k | return Status::OK(); | 228 | 4.71k | } |
Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE10EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE Unexecuted instantiation: _ZN5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE11EE14read_by_rowidsEPKjmPmRNS_3COWINS_7IColumnEE11mutable_ptrIS8_EE 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_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_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 | 47.0k | size_t current_index() const override { |
236 | | DCHECK(_parsed); |
237 | 47.0k | return _cur_idx; |
238 | 47.0k | } _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE1EE13current_indexEv Line | Count | Source | 235 | 305 | size_t current_index() const override { | 236 | | DCHECK(_parsed); | 237 | 305 | return _cur_idx; | 238 | 305 | } |
_ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE3EE13current_indexEv Line | Count | Source | 235 | 243 | size_t current_index() const override { | 236 | | DCHECK(_parsed); | 237 | 243 | return _cur_idx; | 238 | 243 | } |
_ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE5EE13current_indexEv Line | Count | Source | 235 | 39.6k | size_t current_index() const override { | 236 | | DCHECK(_parsed); | 237 | 39.6k | return _cur_idx; | 238 | 39.6k | } |
_ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE7EE13current_indexEv Line | Count | Source | 235 | 6.57k | size_t current_index() const override { | 236 | | DCHECK(_parsed); | 237 | 6.57k | return _cur_idx; | 238 | 6.57k | } |
_ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE9EE13current_indexEv Line | Count | Source | 235 | 223 | size_t current_index() const override { | 236 | | DCHECK(_parsed); | 237 | 223 | return _cur_idx; | 238 | 223 | } |
Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE10EE13current_indexEv Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE11EE13current_indexEv Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE24EE13current_indexEv Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE14EE13current_indexEv Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE28EE13current_indexEv Unexecuted instantiation: _ZNK5doris10segment_v216PlainPageDecoderILNS_9FieldTypeE29EE13current_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 |