be/src/storage/segment/encoding_info.cpp
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 | | #include "storage/segment/encoding_info.h" |
19 | | |
20 | | #include <gen_cpp/olap_file.pb.h> |
21 | | #include <gen_cpp/segment_v2.pb.h> |
22 | | |
23 | | #include <array> |
24 | | #include <iterator> |
25 | | #include <type_traits> |
26 | | #include <unordered_map> |
27 | | #include <utility> |
28 | | |
29 | | #include "common/config.h" |
30 | | #include "common/exception.h" |
31 | | #include "runtime/exec_env.h" |
32 | | #include "storage/olap_common.h" |
33 | | #include "storage/segment/binary_dict_page.h" |
34 | | #include "storage/segment/binary_dict_page_pre_decoder.h" |
35 | | #include "storage/segment/binary_plain_page.h" |
36 | | #include "storage/segment/binary_plain_page_char_strip_pre_decoder.h" |
37 | | #include "storage/segment/binary_plain_page_v2.h" |
38 | | #include "storage/segment/binary_plain_page_v2_pre_decoder.h" |
39 | | #include "storage/segment/binary_plain_page_v3.h" |
40 | | #include "storage/segment/binary_plain_page_v3_pre_decoder.h" |
41 | | #include "storage/segment/binary_prefix_page.h" |
42 | | #include "storage/segment/bitshuffle_page.h" |
43 | | #include "storage/segment/bitshuffle_page_pre_decoder.h" |
44 | | #include "storage/segment/frame_of_reference_page.h" |
45 | | #include "storage/segment/options.h" |
46 | | #include "storage/segment/plain_page.h" |
47 | | #include "storage/segment/rle_page.h" |
48 | | #include "storage/tablet/tablet_schema.h" |
49 | | #include "storage/types.h" |
50 | | |
51 | | namespace doris { |
52 | | namespace segment_v2 { |
53 | | |
54 | | template <FieldType type, typename CppType> |
55 | | struct TypeEncodingTraits<type, PLAIN_ENCODING, CppType> { |
56 | 216k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { |
57 | 216k | return PlainPageBuilder<type>::create(builder, opts); |
58 | 216k | } _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE2EavE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 56 | 51.6k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 57 | 51.6k | return PlainPageBuilder<type>::create(builder, opts); | 58 | 51.6k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE2EsvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 56 | 10.8k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 57 | 10.8k | return PlainPageBuilder<type>::create(builder, opts); | 58 | 10.8k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE2EivE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 56 | 46.4k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 57 | 46.4k | return PlainPageBuilder<type>::create(builder, opts); | 58 | 46.4k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE2ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 56 | 93.6k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 57 | 93.6k | return PlainPageBuilder<type>::create(builder, opts); | 58 | 93.6k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE2EnvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 56 | 13.6k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 57 | 13.6k | return PlainPageBuilder<type>::create(builder, opts); | 58 | 13.6k | } |
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE2EfvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE2EdvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE2EhvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE2ENS_8uint24_tEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE2EjvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE2EmvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE2ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE2EmvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE2ENS_11decimal12_tEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE2EivE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE2ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE2EnvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE2EN4wide7integerILm256EiEEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE2EjvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE2EovE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE |
59 | | static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts, |
60 | 338k | PageDecoder** decoder) { |
61 | 338k | *decoder = new PlainPageDecoder<type>(data, opts); |
62 | 338k | return Status::OK(); |
63 | 338k | } _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE2EavE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 60 | 70.7k | PageDecoder** decoder) { | 61 | 70.7k | *decoder = new PlainPageDecoder<type>(data, opts); | 62 | 70.7k | return Status::OK(); | 63 | 70.7k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE2EsvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 60 | 12.4k | PageDecoder** decoder) { | 61 | 12.4k | *decoder = new PlainPageDecoder<type>(data, opts); | 62 | 12.4k | return Status::OK(); | 63 | 12.4k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE2EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 60 | 138k | PageDecoder** decoder) { | 61 | 138k | *decoder = new PlainPageDecoder<type>(data, opts); | 62 | 138k | return Status::OK(); | 63 | 138k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE2ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 60 | 100k | PageDecoder** decoder) { | 61 | 100k | *decoder = new PlainPageDecoder<type>(data, opts); | 62 | 100k | return Status::OK(); | 63 | 100k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE2EnvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 60 | 16.6k | PageDecoder** decoder) { | 61 | 16.6k | *decoder = new PlainPageDecoder<type>(data, opts); | 62 | 16.6k | return Status::OK(); | 63 | 16.6k | } |
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE2EfvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE2EdvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE2EhvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE2ENS_8uint24_tEvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE2EjvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE2EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE2ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE2EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE2ENS_11decimal12_tEvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE2EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE2ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE2EnvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE2EN4wide7integerILm256EiEEvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE2EjvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE2EovE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE |
64 | | }; |
65 | | |
66 | | template <FieldType type> |
67 | | struct TypeEncodingTraits<type, PLAIN_ENCODING, Slice> { |
68 | 745k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { |
69 | 745k | return BinaryPlainPageBuilder<type>::create(builder, opts); |
70 | 745k | } Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 68 | 115k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 69 | 115k | return BinaryPlainPageBuilder<type>::create(builder, opts); | 70 | 115k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 68 | 661 | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 69 | 661 | return BinaryPlainPageBuilder<type>::create(builder, opts); | 70 | 661 | } |
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 68 | 191 | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 69 | 191 | return BinaryPlainPageBuilder<type>::create(builder, opts); | 70 | 191 | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 68 | 627k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 69 | 627k | return BinaryPlainPageBuilder<type>::create(builder, opts); | 70 | 627k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 68 | 15 | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 69 | 15 | return BinaryPlainPageBuilder<type>::create(builder, opts); | 70 | 15 | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 68 | 1.14k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 69 | 1.14k | return BinaryPlainPageBuilder<type>::create(builder, opts); | 70 | 1.14k | } |
|
71 | | static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts, |
72 | 183k | PageDecoder** decoder) { |
73 | 183k | *decoder = new BinaryPlainPageDecoder<type>(data, opts); |
74 | 183k | return Status::OK(); |
75 | 183k | } _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 72 | 18.6k | PageDecoder** decoder) { | 73 | 18.6k | *decoder = new BinaryPlainPageDecoder<type>(data, opts); | 74 | 18.6k | return Status::OK(); | 75 | 18.6k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 72 | 78.9k | PageDecoder** decoder) { | 73 | 78.9k | *decoder = new BinaryPlainPageDecoder<type>(data, opts); | 74 | 78.9k | return Status::OK(); | 75 | 78.9k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 72 | 37.3k | PageDecoder** decoder) { | 73 | 37.3k | *decoder = new BinaryPlainPageDecoder<type>(data, opts); | 74 | 37.3k | return Status::OK(); | 75 | 37.3k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 72 | 8.57k | PageDecoder** decoder) { | 73 | 8.57k | *decoder = new BinaryPlainPageDecoder<type>(data, opts); | 74 | 8.57k | return Status::OK(); | 75 | 8.57k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 72 | 2.86k | PageDecoder** decoder) { | 73 | 2.86k | *decoder = new BinaryPlainPageDecoder<type>(data, opts); | 74 | 2.86k | return Status::OK(); | 75 | 2.86k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 72 | 303 | PageDecoder** decoder) { | 73 | 303 | *decoder = new BinaryPlainPageDecoder<type>(data, opts); | 74 | 303 | return Status::OK(); | 75 | 303 | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 72 | 36.2k | PageDecoder** decoder) { | 73 | 36.2k | *decoder = new BinaryPlainPageDecoder<type>(data, opts); | 74 | 36.2k | return Status::OK(); | 75 | 36.2k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 72 | 47 | PageDecoder** decoder) { | 73 | 47 | *decoder = new BinaryPlainPageDecoder<type>(data, opts); | 74 | 47 | return Status::OK(); | 75 | 47 | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 72 | 728 | PageDecoder** decoder) { | 73 | 728 | *decoder = new BinaryPlainPageDecoder<type>(data, opts); | 74 | 728 | return Status::OK(); | 75 | 728 | } |
|
76 | | }; |
77 | | |
78 | | template <FieldType type, typename CppType> |
79 | | struct TypeEncodingTraits<type, PLAIN_ENCODING_V2, CppType> { |
80 | | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { |
81 | | return PlainPageBuilder<type>::create(builder, opts); |
82 | | } |
83 | | static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts, |
84 | | PageDecoder** decoder) { |
85 | | *decoder = new PlainPageDecoder<type>(data, opts); |
86 | | return Status::OK(); |
87 | | } |
88 | | }; |
89 | | |
90 | | template <FieldType type> |
91 | | struct TypeEncodingTraits<type, PLAIN_ENCODING_V2, Slice> { |
92 | 8 | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { |
93 | 8 | return BinaryPlainPageV2Builder<type>::create(builder, opts); |
94 | 8 | } Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 92 | 8 | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 93 | 8 | return BinaryPlainPageV2Builder<type>::create(builder, opts); | 94 | 8 | } |
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE |
95 | | static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts, |
96 | 0 | PageDecoder** decoder) { |
97 | 0 | *decoder = new BinaryPlainPageV2Decoder<type>(data, opts); |
98 | 0 | return Status::OK(); |
99 | 0 | } Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE |
100 | | }; |
101 | | |
102 | | // PLAIN_ENCODING_V3 is a binary plain page, only registered for Slice (binary) types, so it |
103 | | // has no non-Slice specialization (unlike PLAIN_ENCODING, which also serves numeric types). |
104 | | template <FieldType type> |
105 | | struct TypeEncodingTraits<type, PLAIN_ENCODING_V3, Slice> { |
106 | 189k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { |
107 | 189k | return BinaryPlainPageV3Builder<type>::create(builder, opts); |
108 | 189k | } Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE9ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE9ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 106 | 185k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 107 | 185k | return BinaryPlainPageV3Builder<type>::create(builder, opts); | 108 | 185k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE9ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 106 | 656 | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 107 | 656 | return BinaryPlainPageV3Builder<type>::create(builder, opts); | 108 | 656 | } |
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE9ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE9ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE9ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 106 | 1.00k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 107 | 1.00k | return BinaryPlainPageV3Builder<type>::create(builder, opts); | 108 | 1.00k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE9ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 106 | 1.42k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 107 | 1.42k | return BinaryPlainPageV3Builder<type>::create(builder, opts); | 108 | 1.42k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE9ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 106 | 910 | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 107 | 910 | return BinaryPlainPageV3Builder<type>::create(builder, opts); | 108 | 910 | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE9ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 106 | 65 | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 107 | 65 | return BinaryPlainPageV3Builder<type>::create(builder, opts); | 108 | 65 | } |
|
109 | | static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts, |
110 | 229k | PageDecoder** decoder) { |
111 | 229k | *decoder = new BinaryPlainPageV3Decoder<type>(data, opts); |
112 | 229k | return Status::OK(); |
113 | 229k | } _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE9ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 110 | 12.6k | PageDecoder** decoder) { | 111 | 12.6k | *decoder = new BinaryPlainPageV3Decoder<type>(data, opts); | 112 | 12.6k | return Status::OK(); | 113 | 12.6k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE9ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 110 | 139k | PageDecoder** decoder) { | 111 | 139k | *decoder = new BinaryPlainPageV3Decoder<type>(data, opts); | 112 | 139k | return Status::OK(); | 113 | 139k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE9ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 110 | 56.4k | PageDecoder** decoder) { | 111 | 56.4k | *decoder = new BinaryPlainPageV3Decoder<type>(data, opts); | 112 | 56.4k | return Status::OK(); | 113 | 56.4k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE9ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 110 | 16.3k | PageDecoder** decoder) { | 111 | 16.3k | *decoder = new BinaryPlainPageV3Decoder<type>(data, opts); | 112 | 16.3k | return Status::OK(); | 113 | 16.3k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE9ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 110 | 3.02k | PageDecoder** decoder) { | 111 | 3.02k | *decoder = new BinaryPlainPageV3Decoder<type>(data, opts); | 112 | 3.02k | return Status::OK(); | 113 | 3.02k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE9ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 110 | 503 | PageDecoder** decoder) { | 111 | 503 | *decoder = new BinaryPlainPageV3Decoder<type>(data, opts); | 112 | 503 | return Status::OK(); | 113 | 503 | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE9ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 110 | 971 | PageDecoder** decoder) { | 111 | 971 | *decoder = new BinaryPlainPageV3Decoder<type>(data, opts); | 112 | 971 | return Status::OK(); | 113 | 971 | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE9ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 110 | 407 | PageDecoder** decoder) { | 111 | 407 | *decoder = new BinaryPlainPageV3Decoder<type>(data, opts); | 112 | 407 | return Status::OK(); | 113 | 407 | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE9ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 110 | 123 | PageDecoder** decoder) { | 111 | 123 | *decoder = new BinaryPlainPageV3Decoder<type>(data, opts); | 112 | 123 | return Status::OK(); | 113 | 123 | } |
|
114 | | }; |
115 | | |
116 | | template <FieldType type, typename CppType> |
117 | | struct TypeEncodingTraits<type, BIT_SHUFFLE, CppType, |
118 | | typename std::enable_if<!std::is_same<CppType, Slice>::value>::type> { |
119 | 380k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { |
120 | 380k | return BitshufflePageBuilder<type>::create(builder, opts); |
121 | 380k | } _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE6EavE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 119 | 28.2k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 120 | 28.2k | return BitshufflePageBuilder<type>::create(builder, opts); | 121 | 28.2k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE6EsvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 119 | 5.84k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 120 | 5.84k | return BitshufflePageBuilder<type>::create(builder, opts); | 121 | 5.84k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE6EivE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 119 | 54.2k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 120 | 54.2k | return BitshufflePageBuilder<type>::create(builder, opts); | 121 | 54.2k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE6ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 119 | 66.9k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 120 | 66.9k | return BitshufflePageBuilder<type>::create(builder, opts); | 121 | 66.9k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE6EnvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 119 | 7.92k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 120 | 7.92k | return BitshufflePageBuilder<type>::create(builder, opts); | 121 | 7.92k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE8ELNS0_14EncodingTypePBE6EmvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 119 | 66.4k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 120 | 66.4k | return BitshufflePageBuilder<type>::create(builder, opts); | 121 | 66.4k | } |
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE6ELNS0_14EncodingTypePBE6EjvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE6EfvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 119 | 11.7k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 120 | 11.7k | return BitshufflePageBuilder<type>::create(builder, opts); | 121 | 11.7k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE6EdvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 119 | 14.1k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 120 | 14.1k | return BitshufflePageBuilder<type>::create(builder, opts); | 121 | 14.1k | } |
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE6EhvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE6ENS_8uint24_tEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 119 | 189 | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 120 | 189 | return BitshufflePageBuilder<type>::create(builder, opts); | 121 | 189 | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE6EjvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 119 | 36.0k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 120 | 36.0k | return BitshufflePageBuilder<type>::create(builder, opts); | 121 | 36.0k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE6EmvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 119 | 41.2k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 120 | 41.2k | return BitshufflePageBuilder<type>::create(builder, opts); | 121 | 41.2k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE6ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 119 | 284 | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 120 | 284 | return BitshufflePageBuilder<type>::create(builder, opts); | 121 | 284 | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE6EmvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 119 | 6.97k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 120 | 6.97k | return BitshufflePageBuilder<type>::create(builder, opts); | 121 | 6.97k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE6ENS_11decimal12_tEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 119 | 196 | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 120 | 196 | return BitshufflePageBuilder<type>::create(builder, opts); | 121 | 196 | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE6EivE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 119 | 9.44k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 120 | 9.44k | return BitshufflePageBuilder<type>::create(builder, opts); | 121 | 9.44k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE6ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 119 | 11.8k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 120 | 11.8k | return BitshufflePageBuilder<type>::create(builder, opts); | 121 | 11.8k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE6EnvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 119 | 15.7k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 120 | 15.7k | return BitshufflePageBuilder<type>::create(builder, opts); | 121 | 15.7k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE6EN4wide7integerILm256EiEEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 119 | 1.15k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 120 | 1.15k | return BitshufflePageBuilder<type>::create(builder, opts); | 121 | 1.15k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE6EjvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 119 | 783 | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 120 | 783 | return BitshufflePageBuilder<type>::create(builder, opts); | 121 | 783 | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE6EovE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 119 | 696 | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 120 | 696 | return BitshufflePageBuilder<type>::create(builder, opts); | 121 | 696 | } |
|
122 | | static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts, |
123 | 662k | PageDecoder** decoder) { |
124 | 662k | *decoder = new BitShufflePageDecoder<type>(data, opts); |
125 | 662k | return Status::OK(); |
126 | 662k | } _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE6EavE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 123 | 78.2k | PageDecoder** decoder) { | 124 | 78.2k | *decoder = new BitShufflePageDecoder<type>(data, opts); | 125 | 78.2k | return Status::OK(); | 126 | 78.2k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE6EsvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 123 | 16.0k | PageDecoder** decoder) { | 124 | 16.0k | *decoder = new BitShufflePageDecoder<type>(data, opts); | 125 | 16.0k | return Status::OK(); | 126 | 16.0k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE6EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 123 | 136k | PageDecoder** decoder) { | 124 | 136k | *decoder = new BitShufflePageDecoder<type>(data, opts); | 125 | 136k | return Status::OK(); | 126 | 136k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE6ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 123 | 49.7k | PageDecoder** decoder) { | 124 | 49.7k | *decoder = new BitShufflePageDecoder<type>(data, opts); | 125 | 49.7k | return Status::OK(); | 126 | 49.7k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE6EnvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 123 | 14.1k | PageDecoder** decoder) { | 124 | 14.1k | *decoder = new BitShufflePageDecoder<type>(data, opts); | 125 | 14.1k | return Status::OK(); | 126 | 14.1k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE8ELNS0_14EncodingTypePBE6EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 123 | 89.2k | PageDecoder** decoder) { | 124 | 89.2k | *decoder = new BitShufflePageDecoder<type>(data, opts); | 125 | 89.2k | return Status::OK(); | 126 | 89.2k | } |
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE6ELNS0_14EncodingTypePBE6EjvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE6EfvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 123 | 19.0k | PageDecoder** decoder) { | 124 | 19.0k | *decoder = new BitShufflePageDecoder<type>(data, opts); | 125 | 19.0k | return Status::OK(); | 126 | 19.0k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE6EdvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 123 | 29.2k | PageDecoder** decoder) { | 124 | 29.2k | *decoder = new BitShufflePageDecoder<type>(data, opts); | 125 | 29.2k | return Status::OK(); | 126 | 29.2k | } |
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE6EhvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE6ENS_8uint24_tEvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 123 | 1.69k | PageDecoder** decoder) { | 124 | 1.69k | *decoder = new BitShufflePageDecoder<type>(data, opts); | 125 | 1.69k | return Status::OK(); | 126 | 1.69k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE6EjvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 123 | 57.7k | PageDecoder** decoder) { | 124 | 57.7k | *decoder = new BitShufflePageDecoder<type>(data, opts); | 125 | 57.7k | return Status::OK(); | 126 | 57.7k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE6EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 123 | 64.2k | PageDecoder** decoder) { | 124 | 64.2k | *decoder = new BitShufflePageDecoder<type>(data, opts); | 125 | 64.2k | return Status::OK(); | 126 | 64.2k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE6ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 123 | 2.18k | PageDecoder** decoder) { | 124 | 2.18k | *decoder = new BitShufflePageDecoder<type>(data, opts); | 125 | 2.18k | return Status::OK(); | 126 | 2.18k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE6EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 123 | 14.7k | PageDecoder** decoder) { | 124 | 14.7k | *decoder = new BitShufflePageDecoder<type>(data, opts); | 125 | 14.7k | return Status::OK(); | 126 | 14.7k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE6ENS_11decimal12_tEvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 123 | 1.38k | PageDecoder** decoder) { | 124 | 1.38k | *decoder = new BitShufflePageDecoder<type>(data, opts); | 125 | 1.38k | return Status::OK(); | 126 | 1.38k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE6EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 123 | 14.7k | PageDecoder** decoder) { | 124 | 14.7k | *decoder = new BitShufflePageDecoder<type>(data, opts); | 125 | 14.7k | return Status::OK(); | 126 | 14.7k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE6ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 123 | 40.3k | PageDecoder** decoder) { | 124 | 40.3k | *decoder = new BitShufflePageDecoder<type>(data, opts); | 125 | 40.3k | return Status::OK(); | 126 | 40.3k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE6EnvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 123 | 29.3k | PageDecoder** decoder) { | 124 | 29.3k | *decoder = new BitShufflePageDecoder<type>(data, opts); | 125 | 29.3k | return Status::OK(); | 126 | 29.3k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE6EN4wide7integerILm256EiEEvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 123 | 1.75k | PageDecoder** decoder) { | 124 | 1.75k | *decoder = new BitShufflePageDecoder<type>(data, opts); | 125 | 1.75k | return Status::OK(); | 126 | 1.75k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE6EjvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 123 | 1.18k | PageDecoder** decoder) { | 124 | 1.18k | *decoder = new BitShufflePageDecoder<type>(data, opts); | 125 | 1.18k | return Status::OK(); | 126 | 1.18k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE6EovE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 123 | 1.13k | PageDecoder** decoder) { | 124 | 1.13k | *decoder = new BitShufflePageDecoder<type>(data, opts); | 125 | 1.13k | return Status::OK(); | 126 | 1.13k | } |
|
127 | | }; |
128 | | |
129 | | template <> |
130 | | struct TypeEncodingTraits<FieldType::OLAP_FIELD_TYPE_BOOL, RLE, uint8_t> { |
131 | 12.2k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { |
132 | 12.2k | return RlePageBuilder<FieldType::OLAP_FIELD_TYPE_BOOL>::create(builder, opts); |
133 | 12.2k | } |
134 | | static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts, |
135 | 16.8k | PageDecoder** decoder) { |
136 | 16.8k | *decoder = new RlePageDecoder<FieldType::OLAP_FIELD_TYPE_BOOL>(data, opts); |
137 | 16.8k | return Status::OK(); |
138 | 16.8k | } |
139 | | }; |
140 | | |
141 | | template <FieldType type> |
142 | | struct TypeEncodingTraits<type, DICT_ENCODING, Slice> { |
143 | 269k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { |
144 | 269k | return BinaryDictPageBuilder::create(builder, opts); |
145 | 269k | } _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 143 | 17.6k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 144 | 17.6k | return BinaryDictPageBuilder::create(builder, opts); | 145 | 17.6k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 143 | 149k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 144 | 149k | return BinaryDictPageBuilder::create(builder, opts); | 145 | 149k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 143 | 88.7k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 144 | 88.7k | return BinaryDictPageBuilder::create(builder, opts); | 145 | 88.7k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 143 | 7.54k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 144 | 7.54k | return BinaryDictPageBuilder::create(builder, opts); | 145 | 7.54k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 143 | 5.90k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 144 | 5.90k | return BinaryDictPageBuilder::create(builder, opts); | 145 | 5.90k | } |
|
146 | | static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts, |
147 | 344k | PageDecoder** decoder) { |
148 | 344k | *decoder = new BinaryDictPageDecoder(data, opts); |
149 | 344k | return Status::OK(); |
150 | 344k | } _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 147 | 36.3k | PageDecoder** decoder) { | 148 | 36.3k | *decoder = new BinaryDictPageDecoder(data, opts); | 149 | 36.3k | return Status::OK(); | 150 | 36.3k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 147 | 187k | PageDecoder** decoder) { | 148 | 187k | *decoder = new BinaryDictPageDecoder(data, opts); | 149 | 187k | return Status::OK(); | 150 | 187k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 147 | 89.8k | PageDecoder** decoder) { | 148 | 89.8k | *decoder = new BinaryDictPageDecoder(data, opts); | 149 | 89.8k | return Status::OK(); | 150 | 89.8k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 147 | 24.8k | PageDecoder** decoder) { | 148 | 24.8k | *decoder = new BinaryDictPageDecoder(data, opts); | 149 | 24.8k | return Status::OK(); | 150 | 24.8k | } |
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 147 | 5.89k | PageDecoder** decoder) { | 148 | 5.89k | *decoder = new BinaryDictPageDecoder(data, opts); | 149 | 5.89k | return Status::OK(); | 150 | 5.89k | } |
|
151 | | }; |
152 | | |
153 | | template <> |
154 | | struct TypeEncodingTraits<FieldType::OLAP_FIELD_TYPE_DATE, FOR_ENCODING, |
155 | | typename CppTypeTraits<FieldType::OLAP_FIELD_TYPE_DATE>::CppType> { |
156 | 0 | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { |
157 | 0 | return FrameOfReferencePageBuilder<FieldType::OLAP_FIELD_TYPE_DATE>::create(builder, opts); |
158 | 0 | } |
159 | | static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts, |
160 | 0 | PageDecoder** decoder) { |
161 | 0 | *decoder = new FrameOfReferencePageDecoder<FieldType::OLAP_FIELD_TYPE_DATE>(data, opts); |
162 | 0 | return Status::OK(); |
163 | 0 | } |
164 | | }; |
165 | | |
166 | | template <> |
167 | | struct TypeEncodingTraits<FieldType::OLAP_FIELD_TYPE_DATEV2, FOR_ENCODING, |
168 | | typename CppTypeTraits<FieldType::OLAP_FIELD_TYPE_DATEV2>::CppType> { |
169 | 0 | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { |
170 | 0 | return FrameOfReferencePageBuilder<FieldType::OLAP_FIELD_TYPE_DATEV2>::create(builder, |
171 | 0 | opts); |
172 | 0 | } |
173 | | static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts, |
174 | 0 | PageDecoder** decoder) { |
175 | 0 | *decoder = new FrameOfReferencePageDecoder<FieldType::OLAP_FIELD_TYPE_DATEV2>(data, opts); |
176 | 0 | return Status::OK(); |
177 | 0 | } |
178 | | }; |
179 | | |
180 | | template <> |
181 | | struct TypeEncodingTraits<FieldType::OLAP_FIELD_TYPE_DATETIMEV2, FOR_ENCODING, |
182 | | typename CppTypeTraits<FieldType::OLAP_FIELD_TYPE_DATETIMEV2>::CppType> { |
183 | 0 | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { |
184 | 0 | return FrameOfReferencePageBuilder<FieldType::OLAP_FIELD_TYPE_DATETIMEV2>::create(builder, |
185 | 0 | opts); |
186 | 0 | } |
187 | | static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts, |
188 | 0 | PageDecoder** decoder) { |
189 | 0 | *decoder = |
190 | 0 | new FrameOfReferencePageDecoder<FieldType::OLAP_FIELD_TYPE_DATETIMEV2>(data, opts); |
191 | 0 | return Status::OK(); |
192 | 0 | } |
193 | | }; |
194 | | |
195 | | template <> |
196 | | struct TypeEncodingTraits<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ, FOR_ENCODING, |
197 | | typename CppTypeTraits<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ>::CppType> { |
198 | 0 | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { |
199 | 0 | return FrameOfReferencePageBuilder<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ>::create(builder, |
200 | 0 | opts); |
201 | 0 | } |
202 | | static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts, |
203 | 0 | PageDecoder** decoder) { |
204 | 0 | *decoder = |
205 | 0 | new FrameOfReferencePageDecoder<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ>(data, opts); |
206 | 0 | return Status::OK(); |
207 | 0 | } |
208 | | }; |
209 | | |
210 | | template <FieldType type, typename CppType> |
211 | | struct TypeEncodingTraits<type, FOR_ENCODING, CppType, |
212 | | typename std::enable_if<IsIntegral<CppType>::value>::type> { |
213 | 0 | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { |
214 | 0 | return FrameOfReferencePageBuilder<type>::create(builder, opts); |
215 | 0 | } Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE7EavE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE7EsvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE7EivE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE7ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE7EnvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE7ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE |
216 | | static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts, |
217 | 0 | PageDecoder** decoder) { |
218 | 0 | *decoder = new FrameOfReferencePageDecoder<type>(data, opts); |
219 | 0 | return Status::OK(); |
220 | 0 | } Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE7EavE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE7EsvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE7EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE7ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE7EnvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE7ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE |
221 | | }; |
222 | | |
223 | | template <FieldType type> |
224 | | struct TypeEncodingTraits<type, PREFIX_ENCODING, Slice> { |
225 | 25.2k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { |
226 | 25.2k | return BinaryPrefixPageBuilder::create(builder, opts); |
227 | 25.2k | } Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE3ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE3ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Line | Count | Source | 225 | 25.2k | static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) { | 226 | 25.2k | return BinaryPrefixPageBuilder::create(builder, opts); | 227 | 25.2k | } |
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE3ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE3ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE3ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE |
228 | | static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts, |
229 | 3.95M | PageDecoder** decoder) { |
230 | 3.95M | *decoder = new BinaryPrefixPageDecoder(data, opts); |
231 | 3.95M | return Status::OK(); |
232 | 3.95M | } Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE3ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE3ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Line | Count | Source | 229 | 3.95M | PageDecoder** decoder) { | 230 | 3.95M | *decoder = new BinaryPrefixPageDecoder(data, opts); | 231 | 3.95M | return Status::OK(); | 232 | 3.95M | } |
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE3ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE3ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE3ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE |
233 | | }; |
234 | | |
235 | 18 | EncodingInfoResolver::EncodingInfoResolver() { |
236 | | // ===== Phase 1: register every supported (type, encoding) combination exactly once ===== |
237 | | // _register_supported_encoding CHECKs against duplicates; the Phase 2 calls below do not insert into _encoding_map, |
238 | | // so every (type, encoding) used as a default must appear here first. |
239 | | |
240 | | // signed integers |
241 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_TINYINT, BIT_SHUFFLE>(); |
242 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_TINYINT, PLAIN_ENCODING>(); |
243 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_TINYINT, FOR_ENCODING>(); |
244 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_SMALLINT, BIT_SHUFFLE>(); |
245 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_SMALLINT, PLAIN_ENCODING>(); |
246 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_SMALLINT, FOR_ENCODING>(); |
247 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_INT, BIT_SHUFFLE>(); |
248 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_INT, PLAIN_ENCODING>(); |
249 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_INT, FOR_ENCODING>(); |
250 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BIGINT, BIT_SHUFFLE>(); |
251 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BIGINT, PLAIN_ENCODING>(); |
252 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BIGINT, FOR_ENCODING>(); |
253 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_LARGEINT, BIT_SHUFFLE>(); |
254 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_LARGEINT, PLAIN_ENCODING>(); |
255 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_LARGEINT, FOR_ENCODING>(); |
256 | | |
257 | | // unsigned integers |
258 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_UNSIGNED_BIGINT, BIT_SHUFFLE>(); |
259 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT, BIT_SHUFFLE>(); |
260 | | |
261 | | // FLOAT / DOUBLE |
262 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_FLOAT, BIT_SHUFFLE>(); |
263 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_FLOAT, PLAIN_ENCODING>(); |
264 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DOUBLE, BIT_SHUFFLE>(); |
265 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DOUBLE, PLAIN_ENCODING>(); |
266 | | |
267 | | // binary types (CHAR/VARCHAR/STRING/JSONB/VARIANT) |
268 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_CHAR, DICT_ENCODING>(); |
269 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_CHAR, PLAIN_ENCODING>(); |
270 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_CHAR, PLAIN_ENCODING_V2>(); |
271 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_CHAR, PLAIN_ENCODING_V3>(); |
272 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_CHAR, PREFIX_ENCODING>(); |
273 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARCHAR, DICT_ENCODING>(); |
274 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARCHAR, PLAIN_ENCODING>(); |
275 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARCHAR, PLAIN_ENCODING_V2>(); |
276 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARCHAR, PLAIN_ENCODING_V3>(); |
277 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARCHAR, PREFIX_ENCODING>(); |
278 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_STRING, DICT_ENCODING>(); |
279 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_STRING, PLAIN_ENCODING>(); |
280 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_STRING, PLAIN_ENCODING_V2>(); |
281 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_STRING, PLAIN_ENCODING_V3>(); |
282 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_STRING, PREFIX_ENCODING>(); |
283 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_JSONB, DICT_ENCODING>(); |
284 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_JSONB, PLAIN_ENCODING>(); |
285 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_JSONB, PLAIN_ENCODING_V2>(); |
286 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_JSONB, PLAIN_ENCODING_V3>(); |
287 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_JSONB, PREFIX_ENCODING>(); |
288 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARIANT, DICT_ENCODING>(); |
289 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARIANT, PLAIN_ENCODING>(); |
290 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARIANT, PLAIN_ENCODING_V2>(); |
291 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARIANT, PLAIN_ENCODING_V3>(); |
292 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARIANT, PREFIX_ENCODING>(); |
293 | | |
294 | | // BOOL |
295 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BOOL, RLE>(); |
296 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BOOL, BIT_SHUFFLE>(); |
297 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BOOL, PLAIN_ENCODING>(); |
298 | | |
299 | | // date / datetime |
300 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATE, BIT_SHUFFLE>(); |
301 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATE, PLAIN_ENCODING>(); |
302 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATE, FOR_ENCODING>(); |
303 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATEV2, BIT_SHUFFLE>(); |
304 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATEV2, PLAIN_ENCODING>(); |
305 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATEV2, FOR_ENCODING>(); |
306 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATETIMEV2, BIT_SHUFFLE>(); |
307 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATETIMEV2, PLAIN_ENCODING>(); |
308 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATETIMEV2, FOR_ENCODING>(); |
309 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATETIME, BIT_SHUFFLE>(); |
310 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATETIME, PLAIN_ENCODING>(); |
311 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATETIME, FOR_ENCODING>(); |
312 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ, BIT_SHUFFLE>(); |
313 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ, PLAIN_ENCODING>(); |
314 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ, FOR_ENCODING>(); |
315 | | |
316 | | // decimal |
317 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL, BIT_SHUFFLE>(); |
318 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL, PLAIN_ENCODING>(); |
319 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL32, BIT_SHUFFLE>(); |
320 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL32, PLAIN_ENCODING>(); |
321 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL64, BIT_SHUFFLE>(); |
322 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL64, PLAIN_ENCODING>(); |
323 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL128I, BIT_SHUFFLE>(); |
324 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL128I, PLAIN_ENCODING>(); |
325 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL256, BIT_SHUFFLE>(); |
326 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL256, PLAIN_ENCODING>(); |
327 | | |
328 | | // ip |
329 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_IPV4, BIT_SHUFFLE>(); |
330 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_IPV4, PLAIN_ENCODING>(); |
331 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_IPV6, BIT_SHUFFLE>(); |
332 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_IPV6, PLAIN_ENCODING>(); |
333 | | |
334 | | // aggregate / binary-flavored types |
335 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_HLL, PLAIN_ENCODING>(); |
336 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_HLL, PLAIN_ENCODING_V2>(); |
337 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_HLL, PLAIN_ENCODING_V3>(); |
338 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BITMAP, PLAIN_ENCODING>(); |
339 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BITMAP, PLAIN_ENCODING_V2>(); |
340 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BITMAP, PLAIN_ENCODING_V3>(); |
341 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_QUANTILE_STATE, PLAIN_ENCODING>(); |
342 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_QUANTILE_STATE, PLAIN_ENCODING_V2>(); |
343 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_QUANTILE_STATE, PLAIN_ENCODING_V3>(); |
344 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_AGG_STATE, PLAIN_ENCODING>(); |
345 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_AGG_STATE, PLAIN_ENCODING_V2>(); |
346 | 18 | _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_AGG_STATE, PLAIN_ENCODING_V3>(); |
347 | | |
348 | | // ===== Phase 2a: V2 defaults (write path, V1/V2 segments) ===== |
349 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_TINYINT, BIT_SHUFFLE>(); |
350 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_SMALLINT, BIT_SHUFFLE>(); |
351 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_INT, BIT_SHUFFLE>(); |
352 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_BIGINT, BIT_SHUFFLE>(); |
353 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_LARGEINT, BIT_SHUFFLE>(); |
354 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_UNSIGNED_BIGINT, BIT_SHUFFLE>(); |
355 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT, BIT_SHUFFLE>(); |
356 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_FLOAT, BIT_SHUFFLE>(); |
357 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_DOUBLE, BIT_SHUFFLE>(); |
358 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_CHAR, DICT_ENCODING>(); |
359 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_VARCHAR, DICT_ENCODING>(); |
360 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_STRING, DICT_ENCODING>(); |
361 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_JSONB, DICT_ENCODING>(); |
362 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_VARIANT, DICT_ENCODING>(); |
363 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_BOOL, RLE>(); |
364 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_DATE, BIT_SHUFFLE>(); |
365 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_DATEV2, BIT_SHUFFLE>(); |
366 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_DATETIMEV2, BIT_SHUFFLE>(); |
367 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_DATETIME, BIT_SHUFFLE>(); |
368 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ, BIT_SHUFFLE>(); |
369 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_DECIMAL, BIT_SHUFFLE>(); |
370 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_DECIMAL32, BIT_SHUFFLE>(); |
371 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_DECIMAL64, BIT_SHUFFLE>(); |
372 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_DECIMAL128I, BIT_SHUFFLE>(); |
373 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_DECIMAL256, BIT_SHUFFLE>(); |
374 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_IPV4, BIT_SHUFFLE>(); |
375 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_IPV6, BIT_SHUFFLE>(); |
376 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_HLL, PLAIN_ENCODING>(); |
377 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_BITMAP, PLAIN_ENCODING>(); |
378 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_QUANTILE_STATE, PLAIN_ENCODING>(); |
379 | 18 | _set_v2_default<FieldType::OLAP_FIELD_TYPE_AGG_STATE, PLAIN_ENCODING>(); |
380 | | |
381 | | // ===== Phase 2b: V3 defaults (write path, V3 segments) ===== |
382 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_TINYINT, PLAIN_ENCODING>(); |
383 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_SMALLINT, PLAIN_ENCODING>(); |
384 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_INT, PLAIN_ENCODING>(); |
385 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_BIGINT, PLAIN_ENCODING>(); |
386 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_LARGEINT, PLAIN_ENCODING>(); |
387 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_UNSIGNED_BIGINT, BIT_SHUFFLE>(); |
388 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT, BIT_SHUFFLE>(); |
389 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_FLOAT, BIT_SHUFFLE>(); |
390 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_DOUBLE, BIT_SHUFFLE>(); |
391 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_CHAR, DICT_ENCODING>(); |
392 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_VARCHAR, DICT_ENCODING>(); |
393 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_STRING, DICT_ENCODING>(); |
394 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_JSONB, DICT_ENCODING>(); |
395 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_VARIANT, DICT_ENCODING>(); |
396 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_BOOL, RLE>(); |
397 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_DATE, BIT_SHUFFLE>(); |
398 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_DATEV2, BIT_SHUFFLE>(); |
399 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_DATETIMEV2, BIT_SHUFFLE>(); |
400 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_DATETIME, BIT_SHUFFLE>(); |
401 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ, BIT_SHUFFLE>(); |
402 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_DECIMAL, BIT_SHUFFLE>(); |
403 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_DECIMAL32, BIT_SHUFFLE>(); |
404 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_DECIMAL64, BIT_SHUFFLE>(); |
405 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_DECIMAL128I, BIT_SHUFFLE>(); |
406 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_DECIMAL256, BIT_SHUFFLE>(); |
407 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_IPV4, BIT_SHUFFLE>(); |
408 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_IPV6, BIT_SHUFFLE>(); |
409 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_HLL, PLAIN_ENCODING_V3>(); |
410 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_BITMAP, PLAIN_ENCODING_V3>(); |
411 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_QUANTILE_STATE, PLAIN_ENCODING_V3>(); |
412 | 18 | _set_v3_default<FieldType::OLAP_FIELD_TYPE_AGG_STATE, PLAIN_ENCODING_V3>(); |
413 | | |
414 | | // ===== Phase 2c: IndexedColumn (value-seek) defaults ===== |
415 | | // Only the PrimaryKeyIndexBuilder consults this map, and it hardcodes VARCHAR. |
416 | | // Other types were registered historically (since #2308, 2019) for a generic |
417 | | // "any IndexedColumn value-seek caller" use case that never materialized; they |
418 | | // were removed to keep this map honest about what production actually needs. |
419 | 18 | _set_index_column_encoding<FieldType::OLAP_FIELD_TYPE_VARCHAR, PREFIX_ENCODING>(); |
420 | 18 | } |
421 | | |
422 | 13 | EncodingInfoResolver::~EncodingInfoResolver() { |
423 | 1.17k | for (auto& it : _encoding_map) { |
424 | 1.17k | delete it.second; |
425 | 1.17k | } |
426 | 13 | _encoding_map.clear(); |
427 | 13 | } |
428 | | |
429 | 375k | EncodingTypePB EncodingInfoResolver::get_v2_default_encoding(FieldType type) const { |
430 | 375k | return _lookup(_v2_default_map, type); |
431 | 375k | } |
432 | | |
433 | 596k | EncodingTypePB EncodingInfoResolver::get_v3_default_encoding(FieldType type) const { |
434 | 596k | return _lookup(_v3_default_map, type); |
435 | 596k | } |
436 | | |
437 | 22.7k | EncodingTypePB EncodingInfoResolver::get_index_column_encoding(FieldType type) const { |
438 | 22.7k | return _lookup(_index_column_encoding_map, type); |
439 | 22.7k | } |
440 | | |
441 | | Status EncodingInfoResolver::get(FieldType data_type, EncodingTypePB encoding_type, |
442 | 6.26M | const EncodingInfo** out) { |
443 | 6.26M | auto key = std::make_pair(data_type, encoding_type); |
444 | 6.26M | auto it = _encoding_map.find(key); |
445 | 6.26M | if (it == std::end(_encoding_map)) { |
446 | 16 | return Status::InternalError("fail to find valid type encoding, type:{}, encoding:{}", |
447 | 16 | data_type, encoding_type); |
448 | 16 | } |
449 | 6.26M | *out = it->second; |
450 | 6.26M | return Status::OK(); |
451 | 6.26M | } |
452 | | |
453 | | template <typename TraitsClass> |
454 | | EncodingInfo::EncodingInfo(TraitsClass traits) |
455 | 1.62k | : _create_builder_func(TraitsClass::create_page_builder), |
456 | 1.62k | _create_decoder_func(TraitsClass::create_page_decoder), |
457 | 1.62k | _type(TraitsClass::type), |
458 | 1.62k | _encoding(TraitsClass::encoding) { |
459 | 1.62k | if (_encoding == BIT_SHUFFLE) { |
460 | 396 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); |
461 | 1.22k | } else if (_encoding == DICT_ENCODING) { |
462 | 90 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { |
463 | 18 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); |
464 | 72 | } else { |
465 | 72 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); |
466 | 72 | } |
467 | 1.13k | } else if (_encoding == PLAIN_ENCODING) { |
468 | | // CHAR plain pages may contain trailing '\0' padding written by older |
469 | | // BEs; strip it once at page load so the cached page is unpadded. |
470 | 522 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { |
471 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); |
472 | 18 | } |
473 | 612 | } else if (_encoding == PLAIN_ENCODING_V2) { |
474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts |
475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. |
476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other |
477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) |
478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ |
479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly |
480 | | // if a future non-Slice registration is added. |
481 | 162 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { |
482 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); |
483 | 144 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { |
484 | 144 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); |
485 | 144 | } else { |
486 | 0 | throw Exception(Status::FatalError( |
487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " |
488 | 0 | "non-Slice type {}", |
489 | 0 | int(TraitsClass::type))); |
490 | 0 | } |
491 | 450 | } else if (_encoding == PLAIN_ENCODING_V3) { |
492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length |
493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice |
494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of |
495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring |
496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is |
497 | | // also correct for direct CHAR plain V3 pages. |
498 | 162 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { |
499 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); |
500 | 144 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { |
501 | 144 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); |
502 | 144 | } else { |
503 | 0 | throw Exception(Status::FatalError( |
504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " |
505 | 0 | "non-Slice type {}", |
506 | 0 | int(TraitsClass::type))); |
507 | 0 | } |
508 | 162 | } |
509 | 1.62k | } _ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE7EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE7EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE7EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE7EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE7EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE8ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE6ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE5EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | 18 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | 18 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | | } else { | 465 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | 0 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | 0 | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | 0 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | 0 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | 0 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | | } else { | 465 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | 18 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | 18 | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | 0 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | 0 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE8EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | 0 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | | } else { | 465 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | 0 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | 0 | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | 18 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | 0 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE9EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | 0 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | | } else { | 465 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | 0 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | 0 | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | 0 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | 18 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 18 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE3EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | 0 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | | } else { | 465 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | 0 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | 0 | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | 0 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | 0 | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE5EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 18 | } else { | 465 | 18 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 18 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE8EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 18 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE9EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 18 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 18 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE3EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE5EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 18 | } else { | 465 | 18 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 18 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE8EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 18 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE9EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 18 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 18 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE3EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE5EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 18 | } else { | 465 | 18 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 18 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE8EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 18 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE9EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 18 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 18 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE3EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE5EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 18 | } else { | 465 | 18 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 18 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE8EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 18 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE9EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 18 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 18 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE3EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE4EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE7EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE7EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE7EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE7EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE7EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE6EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 18 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 0 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 0 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | 0 | } else { | 486 | 0 | throw Exception(Status::FatalError( | 487 | 0 | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | 0 | "non-Slice type {}", | 489 | 0 | int(TraitsClass::type))); | 490 | 0 | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | 0 | } else { | 503 | 0 | throw Exception(Status::FatalError( | 504 | 0 | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | 0 | "non-Slice type {}", | 506 | 0 | int(TraitsClass::type))); | 507 | 0 | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE8EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 18 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE9EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 18 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 18 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE8EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 18 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE9EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 18 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 18 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE8EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 18 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE9EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 18 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 18 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE2EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 0 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE8EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 18 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 0 | } | 509 | 18 | } |
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE9EEEEET_ Line | Count | Source | 455 | 18 | : _create_builder_func(TraitsClass::create_page_builder), | 456 | 18 | _create_decoder_func(TraitsClass::create_page_decoder), | 457 | 18 | _type(TraitsClass::type), | 458 | 18 | _encoding(TraitsClass::encoding) { | 459 | 18 | if (_encoding == BIT_SHUFFLE) { | 460 | 0 | _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>(); | 461 | 18 | } else if (_encoding == DICT_ENCODING) { | 462 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 463 | | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>(); | 464 | 0 | } else { | 465 | 0 | _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>(); | 466 | 0 | } | 467 | 18 | } else if (_encoding == PLAIN_ENCODING) { | 468 | | // CHAR plain pages may contain trailing '\0' padding written by older | 469 | | // BEs; strip it once at page load so the cached page is unpadded. | 470 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 471 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>(); | 472 | | } | 473 | 18 | } else if (_encoding == PLAIN_ENCODING_V2) { | 474 | | // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts | 475 | | // varint-encoded lengths to an offset-array format that downstream Slice decoders expect. | 476 | | // CHAR pages additionally strip trailing '\0' padding written by the convertor; other | 477 | | // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2) | 478 | | // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/ | 479 | | // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly | 480 | | // if a future non-Slice registration is added. | 481 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 482 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>(); | 483 | 0 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 484 | 0 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>(); | 485 | | } else { | 486 | | throw Exception(Status::FatalError( | 487 | | "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got " | 488 | | "non-Slice type {}", | 489 | | int(TraitsClass::type))); | 490 | | } | 491 | 18 | } else if (_encoding == PLAIN_ENCODING_V3) { | 492 | | // V3 binary plain pages store contiguous data followed by a contiguous varuint length | 493 | | // block; the predecoder rewrites that into the V1 offset-array layout downstream Slice | 494 | | // decoders expect. CHAR uses the IS_CHAR=true variant so the trailing '\0' padding of | 495 | | // CHAR dictionary words (written with the VARCHAR builder) is stripped on read — mirroring | 496 | | // PLAIN_ENCODING_V2. strnlen on a write-stripped CHAR page is a no-op, so the variant is | 497 | | // also correct for direct CHAR plain V3 pages. | 498 | | if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) { | 499 | | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<true>>(); | 500 | 18 | } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) { | 501 | 18 | _data_page_pre_decoder = std::make_unique<BinaryPlainPageV3PreDecoder<false>>(); | 502 | | } else { | 503 | | throw Exception(Status::FatalError( | 504 | | "PLAIN_ENCODING_V3 is only supported for Slice (binary) types, but got " | 505 | | "non-Slice type {}", | 506 | | int(TraitsClass::type))); | 507 | | } | 508 | 18 | } | 509 | 18 | } |
|
510 | | |
511 | | #ifdef BE_TEST |
512 | | static EncodingInfoResolver s_encoding_info_resolver; |
513 | | #endif |
514 | | |
515 | 6.22M | Status EncodingInfo::get(FieldType type, EncodingTypePB encoding_type, const EncodingInfo** out) { |
516 | | #ifdef BE_TEST |
517 | | return s_encoding_info_resolver.get(type, encoding_type, out); |
518 | | #else |
519 | 6.22M | auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver(); |
520 | 6.22M | if (resolver == nullptr) { |
521 | 0 | return Status::InternalError("EncodingInfoResolver not initialized"); |
522 | 0 | } |
523 | 6.22M | return resolver->get(type, encoding_type, out); |
524 | 6.22M | #endif |
525 | 6.22M | } |
526 | | |
527 | 364k | EncodingTypePB EncodingInfo::get_v2_default_encoding(FieldType type) { |
528 | | #ifdef BE_TEST |
529 | | return s_encoding_info_resolver.get_v2_default_encoding(type); |
530 | | #else |
531 | 364k | auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver(); |
532 | 364k | if (resolver == nullptr) { |
533 | 0 | return UNKNOWN_ENCODING; |
534 | 0 | } |
535 | 364k | return resolver->get_v2_default_encoding(type); |
536 | 364k | #endif |
537 | 364k | } |
538 | | |
539 | 594k | EncodingTypePB EncodingInfo::get_v3_default_encoding(FieldType type) { |
540 | | #ifdef BE_TEST |
541 | | return s_encoding_info_resolver.get_v3_default_encoding(type); |
542 | | #else |
543 | 594k | auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver(); |
544 | 594k | if (resolver == nullptr) { |
545 | 0 | return UNKNOWN_ENCODING; |
546 | 0 | } |
547 | 594k | return resolver->get_v3_default_encoding(type); |
548 | 594k | #endif |
549 | 594k | } |
550 | | |
551 | 22.9k | EncodingTypePB EncodingInfo::get_index_column_encoding(FieldType type) { |
552 | | #ifdef BE_TEST |
553 | | return s_encoding_info_resolver.get_index_column_encoding(type); |
554 | | #else |
555 | 22.9k | auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver(); |
556 | 22.9k | if (resolver == nullptr) { |
557 | 0 | return UNKNOWN_ENCODING; |
558 | 0 | } |
559 | 22.9k | return resolver->get_index_column_encoding(type); |
560 | 22.9k | #endif |
561 | 22.9k | } |
562 | | |
563 | | EncodingTypePB EncodingInfo::resolve_default_encoding(TabletStorageFormatPB storage_format, |
564 | 973k | const TabletColumn& column) { |
565 | 973k | const bool is_v3 = (storage_format == TabletStorageFormatPB::TABLET_STORAGE_FORMAT_V3); |
566 | | |
567 | | // Row store data is already serialized as a single blob. Keep it on plain pages to |
568 | | // avoid introducing dictionary pages for the hidden row store column; V3 segments use |
569 | | // the V3 binary plain layout. |
570 | 973k | if (column.is_row_store_column()) { |
571 | 1.31k | return is_v3 ? PLAIN_ENCODING_V3 : PLAIN_ENCODING; |
572 | 1.31k | } |
573 | 972k | return is_v3 ? get_v3_default_encoding(column.type()) : get_v2_default_encoding(column.type()); |
574 | 973k | } |
575 | | |
576 | | Status EncodingInfo::create_page_builder(const PageBuilderOptions& opts, |
577 | 272k | std::unique_ptr<PageBuilder>& builder) const { |
578 | 272k | PageBuilder* raw_builder = nullptr; |
579 | 272k | RETURN_IF_ERROR(_create_builder_func(opts, &raw_builder)); |
580 | 272k | builder.reset(raw_builder); |
581 | 272k | return Status::OK(); |
582 | 272k | } |
583 | | |
584 | | Status EncodingInfo::create_page_decoder(const Slice& data, const PageDecoderOptions& opts, |
585 | 322k | std::unique_ptr<PageDecoder>& decoder) const { |
586 | 322k | PageDecoder* raw_decoder = nullptr; |
587 | 322k | RETURN_IF_ERROR(_create_decoder_func(data, opts, &raw_decoder)); |
588 | 322k | decoder.reset(raw_decoder); |
589 | 322k | return Status::OK(); |
590 | 322k | } |
591 | | |
592 | | } // namespace segment_v2 |
593 | | } // namespace doris |