Coverage Report

Created: 2026-06-01 21:29

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
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_prefix_page.h"
40
#include "storage/segment/bitshuffle_page.h"
41
#include "storage/segment/bitshuffle_page_pre_decoder.h"
42
#include "storage/segment/frame_of_reference_page.h"
43
#include "storage/segment/options.h"
44
#include "storage/segment/plain_page.h"
45
#include "storage/segment/rle_page.h"
46
#include "storage/tablet/tablet_schema.h"
47
#include "storage/types.h"
48
49
namespace doris {
50
namespace segment_v2 {
51
52
template <FieldType type, typename CppType>
53
struct TypeEncodingTraits<type, PLAIN_ENCODING, CppType> {
54
239k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
239k
        return PlainPageBuilder<type>::create(builder, opts);
56
239k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE2EavE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
40.1k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
40.1k
        return PlainPageBuilder<type>::create(builder, opts);
56
40.1k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE2EsvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
8.55k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
8.55k
        return PlainPageBuilder<type>::create(builder, opts);
56
8.55k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE2EivE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
49.4k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
49.4k
        return PlainPageBuilder<type>::create(builder, opts);
56
49.4k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE2ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
129k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
129k
        return PlainPageBuilder<type>::create(builder, opts);
56
129k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE2EnvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
11.5k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
11.5k
        return PlainPageBuilder<type>::create(builder, opts);
56
11.5k
    }
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
57
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
58
322k
                                      PageDecoder** decoder) {
59
322k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
322k
        return Status::OK();
61
322k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE2EavE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
58
73.9k
                                      PageDecoder** decoder) {
59
73.9k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
73.9k
        return Status::OK();
61
73.9k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE2EsvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
58
11.3k
                                      PageDecoder** decoder) {
59
11.3k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
11.3k
        return Status::OK();
61
11.3k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE2EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
58
116k
                                      PageDecoder** decoder) {
59
116k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
116k
        return Status::OK();
61
116k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE2ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
58
103k
                                      PageDecoder** decoder) {
59
103k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
103k
        return Status::OK();
61
103k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE2EnvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
58
16.8k
                                      PageDecoder** decoder) {
59
16.8k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
16.8k
        return Status::OK();
61
16.8k
    }
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
62
};
63
64
template <FieldType type>
65
struct TypeEncodingTraits<type, PLAIN_ENCODING, Slice> {
66
943k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
943k
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
943k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
185k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
185k
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
185k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
760
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
760
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
760
    }
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
66
441
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
441
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
441
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
756k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
756k
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
756k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
323
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
323
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
323
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
265
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
265
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
265
    }
69
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
70
295k
                                      PageDecoder** decoder) {
71
295k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
295k
        return Status::OK();
73
295k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
15.9k
                                      PageDecoder** decoder) {
71
15.9k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
15.9k
        return Status::OK();
73
15.9k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
138k
                                      PageDecoder** decoder) {
71
138k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
138k
        return Status::OK();
73
138k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
53.4k
                                      PageDecoder** decoder) {
71
53.4k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
53.4k
        return Status::OK();
73
53.4k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
11.0k
                                      PageDecoder** decoder) {
71
11.0k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
11.0k
        return Status::OK();
73
11.0k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
2.91k
                                      PageDecoder** decoder) {
71
2.91k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
2.91k
        return Status::OK();
73
2.91k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
385
                                      PageDecoder** decoder) {
71
385
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
385
        return Status::OK();
73
385
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
73.1k
                                      PageDecoder** decoder) {
71
73.1k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
73.1k
        return Status::OK();
73
73.1k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
231
                                      PageDecoder** decoder) {
71
231
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
231
        return Status::OK();
73
231
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
290
                                      PageDecoder** decoder) {
71
290
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
290
        return Status::OK();
73
290
    }
74
};
75
76
template <FieldType type, typename CppType>
77
struct TypeEncodingTraits<type, PLAIN_ENCODING_V2, CppType> {
78
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
79
        return PlainPageBuilder<type>::create(builder, opts);
80
    }
81
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
82
                                      PageDecoder** decoder) {
83
        *decoder = new PlainPageDecoder<type>(data, opts);
84
        return Status::OK();
85
    }
86
};
87
88
template <FieldType type>
89
struct TypeEncodingTraits<type, PLAIN_ENCODING_V2, Slice> {
90
195k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
195k
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
195k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
191k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
191k
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
191k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
563
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
563
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
563
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
811
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
811
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
811
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
1.04k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
1.04k
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
1.04k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
609
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
609
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
609
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
932
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
932
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
932
    }
93
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
94
245k
                                      PageDecoder** decoder) {
95
245k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
245k
        return Status::OK();
97
245k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
15.3k
                                      PageDecoder** decoder) {
95
15.3k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
15.3k
        return Status::OK();
97
15.3k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
139k
                                      PageDecoder** decoder) {
95
139k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
139k
        return Status::OK();
97
139k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
70.5k
                                      PageDecoder** decoder) {
95
70.5k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
70.5k
        return Status::OK();
97
70.5k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
15.1k
                                      PageDecoder** decoder) {
95
15.1k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
15.1k
        return Status::OK();
97
15.1k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
3.07k
                                      PageDecoder** decoder) {
95
3.07k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
3.07k
        return Status::OK();
97
3.07k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
504
                                      PageDecoder** decoder) {
95
504
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
504
        return Status::OK();
97
504
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
960
                                      PageDecoder** decoder) {
95
960
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
960
        return Status::OK();
97
960
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
239
                                      PageDecoder** decoder) {
95
239
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
239
        return Status::OK();
97
239
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
551
                                      PageDecoder** decoder) {
95
551
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
551
        return Status::OK();
97
551
    }
98
};
99
100
template <FieldType type, typename CppType>
101
struct TypeEncodingTraits<type, BIT_SHUFFLE, CppType,
102
                          typename std::enable_if<!std::is_same<CppType, Slice>::value>::type> {
103
433k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
433k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
433k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE6EavE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
56.6k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
56.6k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
56.6k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE6EsvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
8.82k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
8.82k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
8.82k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE6EivE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
71.7k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
71.7k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
71.7k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE6ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
59.4k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
59.4k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
59.4k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE6EnvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
10.2k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
10.2k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
10.2k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE8ELNS0_14EncodingTypePBE6EmvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
69.4k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
69.4k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
69.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE6ELNS0_14EncodingTypePBE6EjvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE6EfvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
12.3k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
12.3k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
12.3k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE6EdvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
14.7k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
14.7k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
14.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE6EhvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE6ENS_8uint24_tEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
546
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
546
        return BitshufflePageBuilder<type>::create(builder, opts);
105
546
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE6EjvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
36.6k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
36.6k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
36.6k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE6EmvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
44.7k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
44.7k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
44.7k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE6ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
282
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
282
        return BitshufflePageBuilder<type>::create(builder, opts);
105
282
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE6EmvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
7.10k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
7.10k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
7.10k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE6ENS_11decimal12_tEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
187
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
187
        return BitshufflePageBuilder<type>::create(builder, opts);
105
187
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE6EivE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
9.74k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
9.74k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
9.74k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE6ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
11.8k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
11.8k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
11.8k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE6EnvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
16.2k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
16.2k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
16.2k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE6EN4wide7integerILm256EiEEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
1.15k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
1.15k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
1.15k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE6EjvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
776
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
776
        return BitshufflePageBuilder<type>::create(builder, opts);
105
776
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE6EovE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
691
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
691
        return BitshufflePageBuilder<type>::create(builder, opts);
105
691
    }
106
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
107
787k
                                      PageDecoder** decoder) {
108
787k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
787k
        return Status::OK();
110
787k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE6EavE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
129k
                                      PageDecoder** decoder) {
108
129k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
129k
        return Status::OK();
110
129k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE6EsvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
18.2k
                                      PageDecoder** decoder) {
108
18.2k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
18.2k
        return Status::OK();
110
18.2k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE6EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
185k
                                      PageDecoder** decoder) {
108
185k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
185k
        return Status::OK();
110
185k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE6ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
70.7k
                                      PageDecoder** decoder) {
108
70.7k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
70.7k
        return Status::OK();
110
70.7k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE6EnvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
13.4k
                                      PageDecoder** decoder) {
108
13.4k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
13.4k
        return Status::OK();
110
13.4k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE8ELNS0_14EncodingTypePBE6EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
86.5k
                                      PageDecoder** decoder) {
108
86.5k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
86.5k
        return Status::OK();
110
86.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE6ELNS0_14EncodingTypePBE6EjvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE6EfvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
19.6k
                                      PageDecoder** decoder) {
108
19.6k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
19.6k
        return Status::OK();
110
19.6k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE6EdvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
29.9k
                                      PageDecoder** decoder) {
108
29.9k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
29.9k
        return Status::OK();
110
29.9k
    }
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
107
2.08k
                                      PageDecoder** decoder) {
108
2.08k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
2.08k
        return Status::OK();
110
2.08k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE6EjvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
58.2k
                                      PageDecoder** decoder) {
108
58.2k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
58.2k
        return Status::OK();
110
58.2k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE6EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
67.9k
                                      PageDecoder** decoder) {
108
67.9k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
67.9k
        return Status::OK();
110
67.9k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE6ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
2.37k
                                      PageDecoder** decoder) {
108
2.37k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
2.37k
        return Status::OK();
110
2.37k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE6EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
14.7k
                                      PageDecoder** decoder) {
108
14.7k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
14.7k
        return Status::OK();
110
14.7k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE6ENS_11decimal12_tEvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
1.45k
                                      PageDecoder** decoder) {
108
1.45k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
1.45k
        return Status::OK();
110
1.45k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE6EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
15.0k
                                      PageDecoder** decoder) {
108
15.0k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
15.0k
        return Status::OK();
110
15.0k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE6ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
38.1k
                                      PageDecoder** decoder) {
108
38.1k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
38.1k
        return Status::OK();
110
38.1k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE6EnvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
29.7k
                                      PageDecoder** decoder) {
108
29.7k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
29.7k
        return Status::OK();
110
29.7k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE6EN4wide7integerILm256EiEEvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
1.75k
                                      PageDecoder** decoder) {
108
1.75k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
1.75k
        return Status::OK();
110
1.75k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE6EjvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
1.19k
                                      PageDecoder** decoder) {
108
1.19k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
1.19k
        return Status::OK();
110
1.19k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE6EovE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
1.14k
                                      PageDecoder** decoder) {
108
1.14k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
1.14k
        return Status::OK();
110
1.14k
    }
111
};
112
113
template <>
114
struct TypeEncodingTraits<FieldType::OLAP_FIELD_TYPE_BOOL, RLE, uint8_t> {
115
13.2k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
116
13.2k
        return RlePageBuilder<FieldType::OLAP_FIELD_TYPE_BOOL>::create(builder, opts);
117
13.2k
    }
118
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
119
19.3k
                                      PageDecoder** decoder) {
120
19.3k
        *decoder = new RlePageDecoder<FieldType::OLAP_FIELD_TYPE_BOOL>(data, opts);
121
19.3k
        return Status::OK();
122
19.3k
    }
123
};
124
125
template <FieldType type>
126
struct TypeEncodingTraits<type, DICT_ENCODING, Slice> {
127
331k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
331k
        return BinaryDictPageBuilder::create(builder, opts);
129
331k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
127
18.0k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
18.0k
        return BinaryDictPageBuilder::create(builder, opts);
129
18.0k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
127
189k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
189k
        return BinaryDictPageBuilder::create(builder, opts);
129
189k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
127
110k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
110k
        return BinaryDictPageBuilder::create(builder, opts);
129
110k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
127
8.11k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
8.11k
        return BinaryDictPageBuilder::create(builder, opts);
129
8.11k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
127
5.93k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
5.93k
        return BinaryDictPageBuilder::create(builder, opts);
129
5.93k
    }
130
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
131
417k
                                      PageDecoder** decoder) {
132
417k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
417k
        return Status::OK();
134
417k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
35.8k
                                      PageDecoder** decoder) {
132
35.8k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
35.8k
        return Status::OK();
134
35.8k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
231k
                                      PageDecoder** decoder) {
132
231k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
231k
        return Status::OK();
134
231k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
117k
                                      PageDecoder** decoder) {
132
117k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
117k
        return Status::OK();
134
117k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
26.3k
                                      PageDecoder** decoder) {
132
26.3k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
26.3k
        return Status::OK();
134
26.3k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
5.98k
                                      PageDecoder** decoder) {
132
5.98k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
5.98k
        return Status::OK();
134
5.98k
    }
135
};
136
137
template <>
138
struct TypeEncodingTraits<FieldType::OLAP_FIELD_TYPE_DATE, FOR_ENCODING,
139
                          typename CppTypeTraits<FieldType::OLAP_FIELD_TYPE_DATE>::CppType> {
140
0
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
141
0
        return FrameOfReferencePageBuilder<FieldType::OLAP_FIELD_TYPE_DATE>::create(builder, opts);
142
0
    }
143
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
144
0
                                      PageDecoder** decoder) {
145
0
        *decoder = new FrameOfReferencePageDecoder<FieldType::OLAP_FIELD_TYPE_DATE>(data, opts);
146
0
        return Status::OK();
147
0
    }
148
};
149
150
template <>
151
struct TypeEncodingTraits<FieldType::OLAP_FIELD_TYPE_DATEV2, FOR_ENCODING,
152
                          typename CppTypeTraits<FieldType::OLAP_FIELD_TYPE_DATEV2>::CppType> {
153
0
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
154
0
        return FrameOfReferencePageBuilder<FieldType::OLAP_FIELD_TYPE_DATEV2>::create(builder,
155
0
                                                                                      opts);
156
0
    }
157
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
158
0
                                      PageDecoder** decoder) {
159
0
        *decoder = new FrameOfReferencePageDecoder<FieldType::OLAP_FIELD_TYPE_DATEV2>(data, opts);
160
0
        return Status::OK();
161
0
    }
162
};
163
164
template <>
165
struct TypeEncodingTraits<FieldType::OLAP_FIELD_TYPE_DATETIMEV2, FOR_ENCODING,
166
                          typename CppTypeTraits<FieldType::OLAP_FIELD_TYPE_DATETIMEV2>::CppType> {
167
0
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
168
0
        return FrameOfReferencePageBuilder<FieldType::OLAP_FIELD_TYPE_DATETIMEV2>::create(builder,
169
0
                                                                                          opts);
170
0
    }
171
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
172
0
                                      PageDecoder** decoder) {
173
0
        *decoder =
174
0
                new FrameOfReferencePageDecoder<FieldType::OLAP_FIELD_TYPE_DATETIMEV2>(data, opts);
175
0
        return Status::OK();
176
0
    }
177
};
178
179
template <>
180
struct TypeEncodingTraits<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ, FOR_ENCODING,
181
                          typename CppTypeTraits<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ>::CppType> {
182
0
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
183
0
        return FrameOfReferencePageBuilder<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ>::create(builder,
184
0
                                                                                           opts);
185
0
    }
186
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
187
0
                                      PageDecoder** decoder) {
188
0
        *decoder =
189
0
                new FrameOfReferencePageDecoder<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ>(data, opts);
190
0
        return Status::OK();
191
0
    }
192
};
193
194
template <FieldType type, typename CppType>
195
struct TypeEncodingTraits<type, FOR_ENCODING, CppType,
196
                          typename std::enable_if<IsIntegral<CppType>::value>::type> {
197
0
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
198
0
        return FrameOfReferencePageBuilder<type>::create(builder, opts);
199
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
200
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
201
0
                                      PageDecoder** decoder) {
202
0
        *decoder = new FrameOfReferencePageDecoder<type>(data, opts);
203
0
        return Status::OK();
204
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
205
};
206
207
template <FieldType type>
208
struct TypeEncodingTraits<type, PREFIX_ENCODING, Slice> {
209
38.7k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
210
38.7k
        return BinaryPrefixPageBuilder::create(builder, opts);
211
38.7k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE3ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE3ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
209
38.7k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
210
38.7k
        return BinaryPrefixPageBuilder::create(builder, opts);
211
38.7k
    }
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
212
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
213
4.61M
                                      PageDecoder** decoder) {
214
4.61M
        *decoder = new BinaryPrefixPageDecoder(data, opts);
215
4.61M
        return Status::OK();
216
4.61M
    }
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
213
4.61M
                                      PageDecoder** decoder) {
214
4.61M
        *decoder = new BinaryPrefixPageDecoder(data, opts);
215
4.61M
        return Status::OK();
216
4.61M
    }
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
217
};
218
219
18
EncodingInfoResolver::EncodingInfoResolver() {
220
    // ===== Phase 1: register every supported (type, encoding) combination exactly once =====
221
    // _register_supported_encoding CHECKs against duplicates; the Phase 2 calls below do not insert into _encoding_map,
222
    // so every (type, encoding) used as a default must appear here first.
223
224
    // signed integers
225
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_TINYINT, BIT_SHUFFLE>();
226
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_TINYINT, PLAIN_ENCODING>();
227
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_TINYINT, FOR_ENCODING>();
228
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_SMALLINT, BIT_SHUFFLE>();
229
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_SMALLINT, PLAIN_ENCODING>();
230
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_SMALLINT, FOR_ENCODING>();
231
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_INT, BIT_SHUFFLE>();
232
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_INT, PLAIN_ENCODING>();
233
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_INT, FOR_ENCODING>();
234
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BIGINT, BIT_SHUFFLE>();
235
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BIGINT, PLAIN_ENCODING>();
236
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BIGINT, FOR_ENCODING>();
237
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_LARGEINT, BIT_SHUFFLE>();
238
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_LARGEINT, PLAIN_ENCODING>();
239
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_LARGEINT, FOR_ENCODING>();
240
241
    // unsigned integers
242
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_UNSIGNED_BIGINT, BIT_SHUFFLE>();
243
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT, BIT_SHUFFLE>();
244
245
    // FLOAT / DOUBLE
246
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_FLOAT, BIT_SHUFFLE>();
247
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_FLOAT, PLAIN_ENCODING>();
248
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DOUBLE, BIT_SHUFFLE>();
249
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DOUBLE, PLAIN_ENCODING>();
250
251
    // binary types (CHAR/VARCHAR/STRING/JSONB/VARIANT)
252
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_CHAR, DICT_ENCODING>();
253
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_CHAR, PLAIN_ENCODING>();
254
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_CHAR, PLAIN_ENCODING_V2>();
255
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_CHAR, PREFIX_ENCODING>();
256
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARCHAR, DICT_ENCODING>();
257
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARCHAR, PLAIN_ENCODING>();
258
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARCHAR, PLAIN_ENCODING_V2>();
259
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARCHAR, PREFIX_ENCODING>();
260
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_STRING, DICT_ENCODING>();
261
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_STRING, PLAIN_ENCODING>();
262
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_STRING, PLAIN_ENCODING_V2>();
263
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_STRING, PREFIX_ENCODING>();
264
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_JSONB, DICT_ENCODING>();
265
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_JSONB, PLAIN_ENCODING>();
266
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_JSONB, PLAIN_ENCODING_V2>();
267
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_JSONB, PREFIX_ENCODING>();
268
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARIANT, DICT_ENCODING>();
269
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARIANT, PLAIN_ENCODING>();
270
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARIANT, PLAIN_ENCODING_V2>();
271
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARIANT, PREFIX_ENCODING>();
272
273
    // BOOL
274
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BOOL, RLE>();
275
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BOOL, BIT_SHUFFLE>();
276
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BOOL, PLAIN_ENCODING>();
277
278
    // date / datetime
279
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATE, BIT_SHUFFLE>();
280
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATE, PLAIN_ENCODING>();
281
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATE, FOR_ENCODING>();
282
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATEV2, BIT_SHUFFLE>();
283
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATEV2, PLAIN_ENCODING>();
284
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATEV2, FOR_ENCODING>();
285
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATETIMEV2, BIT_SHUFFLE>();
286
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATETIMEV2, PLAIN_ENCODING>();
287
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATETIMEV2, FOR_ENCODING>();
288
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATETIME, BIT_SHUFFLE>();
289
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATETIME, PLAIN_ENCODING>();
290
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATETIME, FOR_ENCODING>();
291
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ, BIT_SHUFFLE>();
292
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ, PLAIN_ENCODING>();
293
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ, FOR_ENCODING>();
294
295
    // decimal
296
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL, BIT_SHUFFLE>();
297
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL, PLAIN_ENCODING>();
298
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL32, BIT_SHUFFLE>();
299
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL32, PLAIN_ENCODING>();
300
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL64, BIT_SHUFFLE>();
301
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL64, PLAIN_ENCODING>();
302
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL128I, BIT_SHUFFLE>();
303
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL128I, PLAIN_ENCODING>();
304
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL256, BIT_SHUFFLE>();
305
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL256, PLAIN_ENCODING>();
306
307
    // ip
308
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_IPV4, BIT_SHUFFLE>();
309
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_IPV4, PLAIN_ENCODING>();
310
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_IPV6, BIT_SHUFFLE>();
311
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_IPV6, PLAIN_ENCODING>();
312
313
    // aggregate / binary-flavored types
314
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_HLL, PLAIN_ENCODING>();
315
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_HLL, PLAIN_ENCODING_V2>();
316
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BITMAP, PLAIN_ENCODING>();
317
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BITMAP, PLAIN_ENCODING_V2>();
318
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_QUANTILE_STATE, PLAIN_ENCODING>();
319
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_QUANTILE_STATE, PLAIN_ENCODING_V2>();
320
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_AGG_STATE, PLAIN_ENCODING>();
321
18
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_AGG_STATE, PLAIN_ENCODING_V2>();
322
323
    // ===== Phase 2a: V2 defaults (write path, V1/V2 segments) =====
324
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_TINYINT, BIT_SHUFFLE>();
325
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_SMALLINT, BIT_SHUFFLE>();
326
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_INT, BIT_SHUFFLE>();
327
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_BIGINT, BIT_SHUFFLE>();
328
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_LARGEINT, BIT_SHUFFLE>();
329
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_UNSIGNED_BIGINT, BIT_SHUFFLE>();
330
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT, BIT_SHUFFLE>();
331
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_FLOAT, BIT_SHUFFLE>();
332
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_DOUBLE, BIT_SHUFFLE>();
333
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_CHAR, DICT_ENCODING>();
334
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_VARCHAR, DICT_ENCODING>();
335
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_STRING, DICT_ENCODING>();
336
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_JSONB, DICT_ENCODING>();
337
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_VARIANT, DICT_ENCODING>();
338
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_BOOL, RLE>();
339
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_DATE, BIT_SHUFFLE>();
340
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_DATEV2, BIT_SHUFFLE>();
341
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_DATETIMEV2, BIT_SHUFFLE>();
342
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_DATETIME, BIT_SHUFFLE>();
343
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ, BIT_SHUFFLE>();
344
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_DECIMAL, BIT_SHUFFLE>();
345
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_DECIMAL32, BIT_SHUFFLE>();
346
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_DECIMAL64, BIT_SHUFFLE>();
347
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_DECIMAL128I, BIT_SHUFFLE>();
348
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_DECIMAL256, BIT_SHUFFLE>();
349
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_IPV4, BIT_SHUFFLE>();
350
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_IPV6, BIT_SHUFFLE>();
351
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_HLL, PLAIN_ENCODING>();
352
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_BITMAP, PLAIN_ENCODING>();
353
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_QUANTILE_STATE, PLAIN_ENCODING>();
354
18
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_AGG_STATE, PLAIN_ENCODING>();
355
356
    // ===== Phase 2b: V3 defaults (write path, V3 segments) =====
357
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_TINYINT, PLAIN_ENCODING>();
358
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_SMALLINT, PLAIN_ENCODING>();
359
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_INT, PLAIN_ENCODING>();
360
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_BIGINT, PLAIN_ENCODING>();
361
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_LARGEINT, PLAIN_ENCODING>();
362
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_UNSIGNED_BIGINT, BIT_SHUFFLE>();
363
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT, BIT_SHUFFLE>();
364
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_FLOAT, BIT_SHUFFLE>();
365
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_DOUBLE, BIT_SHUFFLE>();
366
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_CHAR, DICT_ENCODING>();
367
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_VARCHAR, DICT_ENCODING>();
368
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_STRING, DICT_ENCODING>();
369
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_JSONB, DICT_ENCODING>();
370
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_VARIANT, DICT_ENCODING>();
371
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_BOOL, RLE>();
372
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_DATE, BIT_SHUFFLE>();
373
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_DATEV2, BIT_SHUFFLE>();
374
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_DATETIMEV2, BIT_SHUFFLE>();
375
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_DATETIME, BIT_SHUFFLE>();
376
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ, BIT_SHUFFLE>();
377
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_DECIMAL, BIT_SHUFFLE>();
378
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_DECIMAL32, BIT_SHUFFLE>();
379
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_DECIMAL64, BIT_SHUFFLE>();
380
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_DECIMAL128I, BIT_SHUFFLE>();
381
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_DECIMAL256, BIT_SHUFFLE>();
382
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_IPV4, BIT_SHUFFLE>();
383
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_IPV6, BIT_SHUFFLE>();
384
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_HLL, PLAIN_ENCODING_V2>();
385
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_BITMAP, PLAIN_ENCODING_V2>();
386
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_QUANTILE_STATE, PLAIN_ENCODING_V2>();
387
18
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_AGG_STATE, PLAIN_ENCODING_V2>();
388
389
    // ===== Phase 2c: IndexedColumn (value-seek) defaults =====
390
    // Only the PrimaryKeyIndexBuilder consults this map, and it hardcodes VARCHAR.
391
    // Other types were registered historically (since #2308, 2019) for a generic
392
    // "any IndexedColumn value-seek caller" use case that never materialized; they
393
    // were removed to keep this map honest about what production actually needs.
394
18
    _set_index_column_encoding<FieldType::OLAP_FIELD_TYPE_VARCHAR, PREFIX_ENCODING>();
395
18
}
396
397
13
EncodingInfoResolver::~EncodingInfoResolver() {
398
1.05k
    for (auto& it : _encoding_map) {
399
1.05k
        delete it.second;
400
1.05k
    }
401
13
    _encoding_map.clear();
402
13
}
403
404
530k
EncodingTypePB EncodingInfoResolver::get_v2_default_encoding(FieldType type) const {
405
530k
    return _lookup(_v2_default_map, type);
406
530k
}
407
408
582k
EncodingTypePB EncodingInfoResolver::get_v3_default_encoding(FieldType type) const {
409
582k
    return _lookup(_v3_default_map, type);
410
582k
}
411
412
36.9k
EncodingTypePB EncodingInfoResolver::get_index_column_encoding(FieldType type) const {
413
36.9k
    return _lookup(_index_column_encoding_map, type);
414
36.9k
}
415
416
Status EncodingInfoResolver::get(FieldType data_type, EncodingTypePB encoding_type,
417
13.1M
                                 const EncodingInfo** out) {
418
13.1M
    auto key = std::make_pair(data_type, encoding_type);
419
13.1M
    auto it = _encoding_map.find(key);
420
13.1M
    if (it == std::end(_encoding_map)) {
421
16
        return Status::InternalError("fail to find valid type encoding, type:{}, encoding:{}",
422
16
                                     data_type, encoding_type);
423
16
    }
424
13.1M
    *out = it->second;
425
13.1M
    return Status::OK();
426
13.1M
}
427
428
template <typename TraitsClass>
429
EncodingInfo::EncodingInfo(TraitsClass traits)
430
1.45k
        : _create_builder_func(TraitsClass::create_page_builder),
431
1.45k
          _create_decoder_func(TraitsClass::create_page_decoder),
432
1.45k
          _type(TraitsClass::type),
433
1.45k
          _encoding(TraitsClass::encoding) {
434
1.45k
    if (_encoding == BIT_SHUFFLE) {
435
396
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
1.06k
    } else if (_encoding == DICT_ENCODING) {
437
90
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
18
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
72
        } else {
440
72
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
72
        }
442
972
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
522
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
18
        }
448
522
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
162
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
144
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
144
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
144
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
162
    }
467
1.45k
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE8ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE6ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE5EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
18
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
18
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
        } else {
440
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
0
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
0
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
0
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
0
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
        } else {
440
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
18
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
18
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
0
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
0
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
        } else {
440
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
0
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
0
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
18
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
18
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE3EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
0
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
        } else {
440
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
0
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
0
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
0
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE5EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
18
        } else {
440
18
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
18
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
18
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
18
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE3EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE5EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
18
        } else {
440
18
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
18
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
18
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
18
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE3EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE5EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
18
        } else {
440
18
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
18
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
18
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
18
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE3EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE5EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
18
        } else {
440
18
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
18
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
18
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
18
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE3EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE4EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
18
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
18
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
18
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
18
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
18
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
18
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
18
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
18
    }
467
18
}
468
469
#ifdef BE_TEST
470
static EncodingInfoResolver s_encoding_info_resolver;
471
#endif
472
473
13.1M
Status EncodingInfo::get(FieldType type, EncodingTypePB encoding_type, const EncodingInfo** out) {
474
#ifdef BE_TEST
475
    return s_encoding_info_resolver.get(type, encoding_type, out);
476
#else
477
13.1M
    auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver();
478
13.1M
    if (resolver == nullptr) {
479
0
        return Status::InternalError("EncodingInfoResolver not initialized");
480
0
    }
481
13.1M
    return resolver->get(type, encoding_type, out);
482
13.1M
#endif
483
13.1M
}
484
485
519k
EncodingTypePB EncodingInfo::get_v2_default_encoding(FieldType type) {
486
#ifdef BE_TEST
487
    return s_encoding_info_resolver.get_v2_default_encoding(type);
488
#else
489
519k
    auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver();
490
519k
    if (resolver == nullptr) {
491
0
        return UNKNOWN_ENCODING;
492
0
    }
493
519k
    return resolver->get_v2_default_encoding(type);
494
519k
#endif
495
519k
}
496
497
580k
EncodingTypePB EncodingInfo::get_v3_default_encoding(FieldType type) {
498
#ifdef BE_TEST
499
    return s_encoding_info_resolver.get_v3_default_encoding(type);
500
#else
501
580k
    auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver();
502
580k
    if (resolver == nullptr) {
503
0
        return UNKNOWN_ENCODING;
504
0
    }
505
580k
    return resolver->get_v3_default_encoding(type);
506
580k
#endif
507
580k
}
508
509
37.0k
EncodingTypePB EncodingInfo::get_index_column_encoding(FieldType type) {
510
#ifdef BE_TEST
511
    return s_encoding_info_resolver.get_index_column_encoding(type);
512
#else
513
37.0k
    auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver();
514
37.0k
    if (resolver == nullptr) {
515
0
        return UNKNOWN_ENCODING;
516
0
    }
517
37.0k
    return resolver->get_index_column_encoding(type);
518
37.0k
#endif
519
37.0k
}
520
521
EncodingTypePB EncodingInfo::resolve_default_encoding(TabletStorageFormatPB storage_format,
522
1.11M
                                                      const TabletColumn& column) {
523
1.11M
    const bool is_v3 = (storage_format == TabletStorageFormatPB::TABLET_STORAGE_FORMAT_V3);
524
525
    // Row store data is already serialized as a single blob. Keep it on plain pages to
526
    // avoid introducing dictionary pages for the hidden row store column.
527
1.11M
    if (column.is_row_store_column()) {
528
1.32k
        return is_v3 ? PLAIN_ENCODING_V2 : PLAIN_ENCODING;
529
1.32k
    }
530
1.11M
    return is_v3 ? get_v3_default_encoding(column.type()) : get_v2_default_encoding(column.type());
531
1.11M
}
532
533
Status EncodingInfo::create_page_builder(const PageBuilderOptions& opts,
534
334k
                                         std::unique_ptr<PageBuilder>& builder) const {
535
334k
    PageBuilder* raw_builder = nullptr;
536
334k
    RETURN_IF_ERROR(_create_builder_func(opts, &raw_builder));
537
334k
    builder.reset(raw_builder);
538
334k
    return Status::OK();
539
334k
}
540
541
Status EncodingInfo::create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
542
399k
                                         std::unique_ptr<PageDecoder>& decoder) const {
543
399k
    PageDecoder* raw_decoder = nullptr;
544
399k
    RETURN_IF_ERROR(_create_decoder_func(data, opts, &raw_decoder));
545
399k
    decoder.reset(raw_decoder);
546
399k
    return Status::OK();
547
399k
}
548
549
} // namespace segment_v2
550
} // namespace doris