Coverage Report

Created: 2026-06-01 15:57

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
135k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
135k
        return PlainPageBuilder<type>::create(builder, opts);
56
135k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE2EavE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
35.0k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
35.0k
        return PlainPageBuilder<type>::create(builder, opts);
56
35.0k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE2EsvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
8.95k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
8.95k
        return PlainPageBuilder<type>::create(builder, opts);
56
8.95k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE2EivE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
47.5k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
47.5k
        return PlainPageBuilder<type>::create(builder, opts);
56
47.5k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE2ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
33.0k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
33.0k
        return PlainPageBuilder<type>::create(builder, opts);
56
33.0k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE2EnvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
10.9k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
10.9k
        return PlainPageBuilder<type>::create(builder, opts);
56
10.9k
    }
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
265k
                                      PageDecoder** decoder) {
59
265k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
265k
        return Status::OK();
61
265k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE2EavE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
58
56.7k
                                      PageDecoder** decoder) {
59
56.7k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
56.7k
        return Status::OK();
61
56.7k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE2EsvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
58
19.7k
                                      PageDecoder** decoder) {
59
19.7k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
19.7k
        return Status::OK();
61
19.7k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE2EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
58
124k
                                      PageDecoder** decoder) {
59
124k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
124k
        return Status::OK();
61
124k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE2ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
58
47.3k
                                      PageDecoder** decoder) {
59
47.3k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
47.3k
        return Status::OK();
61
47.3k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE2EnvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
58
17.2k
                                      PageDecoder** decoder) {
59
17.2k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
17.2k
        return Status::OK();
61
17.2k
    }
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
1.07M
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
1.07M
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
1.07M
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
303k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
303k
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
303k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
714
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
714
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
714
    }
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
401
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
401
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
401
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
769k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
769k
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
769k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
234
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
234
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
234
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
993
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
993
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
993
    }
69
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
70
385k
                                      PageDecoder** decoder) {
71
385k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
385k
        return Status::OK();
73
385k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
646
                                      PageDecoder** decoder) {
71
646
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
646
        return Status::OK();
73
646
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
321k
                                      PageDecoder** decoder) {
71
321k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
321k
        return Status::OK();
73
321k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
21.7k
                                      PageDecoder** decoder) {
71
21.7k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
21.7k
        return Status::OK();
73
21.7k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
1.23k
                                      PageDecoder** decoder) {
71
1.23k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
1.23k
        return Status::OK();
73
1.23k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
12
                                      PageDecoder** decoder) {
71
12
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
12
        return Status::OK();
73
12
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
309
                                      PageDecoder** decoder) {
71
309
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
309
        return Status::OK();
73
309
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
38.6k
                                      PageDecoder** decoder) {
71
38.6k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
38.6k
        return Status::OK();
73
38.6k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
94
                                      PageDecoder** decoder) {
71
94
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
94
        return Status::OK();
73
94
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
549
                                      PageDecoder** decoder) {
71
549
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
549
        return Status::OK();
73
549
    }
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
76.2k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
76.2k
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
76.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
72.8k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
72.8k
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
72.8k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
588
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
588
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
588
    }
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
844
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
844
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
844
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
1.18k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
1.18k
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
1.18k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
699
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
699
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
699
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
165
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
165
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
165
    }
93
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
94
109k
                                      PageDecoder** decoder) {
95
109k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
109k
        return Status::OK();
97
109k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
97.4k
                                      PageDecoder** decoder) {
95
97.4k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
97.4k
        return Status::OK();
97
97.4k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
9.29k
                                      PageDecoder** decoder) {
95
9.29k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
9.29k
        return Status::OK();
97
9.29k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
574
                                      PageDecoder** decoder) {
95
574
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
574
        return Status::OK();
97
574
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
1.13k
                                      PageDecoder** decoder) {
95
1.13k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
1.13k
        return Status::OK();
97
1.13k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
376
                                      PageDecoder** decoder) {
95
376
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
376
        return Status::OK();
97
376
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
317
                                      PageDecoder** decoder) {
95
317
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
317
        return Status::OK();
97
317
    }
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
555k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
555k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
555k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE6EavE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
65.7k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
65.7k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
65.7k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE6EsvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
8.44k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
8.44k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
8.44k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE6EivE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
74.5k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
74.5k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
74.5k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE6ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
163k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
163k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
163k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE6EnvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
10.9k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
10.9k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
10.9k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE8ELNS0_14EncodingTypePBE6EmvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
68.7k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
68.7k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
68.7k
    }
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
19.6k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
19.6k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
19.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE6EhvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE6ENS_8uint24_tEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
203
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
203
        return BitshufflePageBuilder<type>::create(builder, opts);
105
203
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE6EjvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
37.1k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
37.1k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
37.1k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE6EmvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
44.9k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
44.9k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
44.9k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE6ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
281
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
281
        return BitshufflePageBuilder<type>::create(builder, opts);
105
281
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE6EmvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
6.96k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
6.96k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
6.96k
    }
_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.73k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
9.73k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
9.73k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE6ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
12.2k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
12.2k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
12.2k
    }
_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.14k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
1.14k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
1.14k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE6EjvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
782
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
782
        return BitshufflePageBuilder<type>::create(builder, opts);
105
782
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE6EovE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
696
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
696
        return BitshufflePageBuilder<type>::create(builder, opts);
105
696
    }
106
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
107
862k
                                      PageDecoder** decoder) {
108
862k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
862k
        return Status::OK();
110
862k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE6EavE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
152k
                                      PageDecoder** decoder) {
108
152k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
152k
        return Status::OK();
110
152k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE6EsvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
10.8k
                                      PageDecoder** decoder) {
108
10.8k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
10.8k
        return Status::OK();
110
10.8k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE6EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
175k
                                      PageDecoder** decoder) {
108
175k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
175k
        return Status::OK();
110
175k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE6ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
131k
                                      PageDecoder** decoder) {
108
131k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
131k
        return Status::OK();
110
131k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE6EnvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
14.8k
                                      PageDecoder** decoder) {
108
14.8k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
14.8k
        return Status::OK();
110
14.8k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE8ELNS0_14EncodingTypePBE6EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
87.4k
                                      PageDecoder** decoder) {
108
87.4k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
87.4k
        return Status::OK();
110
87.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE6ELNS0_14EncodingTypePBE6EjvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE6EfvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
20.4k
                                      PageDecoder** decoder) {
108
20.4k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
20.4k
        return Status::OK();
110
20.4k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE6EdvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
30.0k
                                      PageDecoder** decoder) {
108
30.0k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
30.0k
        return Status::OK();
110
30.0k
    }
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
1.85k
                                      PageDecoder** decoder) {
108
1.85k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
1.85k
        return Status::OK();
110
1.85k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE6EjvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
59.6k
                                      PageDecoder** decoder) {
108
59.6k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
59.6k
        return Status::OK();
110
59.6k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE6EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
68.8k
                                      PageDecoder** decoder) {
108
68.8k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
68.8k
        return Status::OK();
110
68.8k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE6ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
2.48k
                                      PageDecoder** decoder) {
108
2.48k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
2.48k
        return Status::OK();
110
2.48k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE6EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
14.8k
                                      PageDecoder** decoder) {
108
14.8k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
14.8k
        return Status::OK();
110
14.8k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE6ENS_11decimal12_tEvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
1.33k
                                      PageDecoder** decoder) {
108
1.33k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
1.33k
        return Status::OK();
110
1.33k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE6EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
15.2k
                                      PageDecoder** decoder) {
108
15.2k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
15.2k
        return Status::OK();
110
15.2k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE6ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
39.6k
                                      PageDecoder** decoder) {
108
39.6k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
39.6k
        return Status::OK();
110
39.6k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE6EnvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
30.6k
                                      PageDecoder** decoder) {
108
30.6k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
30.6k
        return Status::OK();
110
30.6k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE6EN4wide7integerILm256EiEEvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
1.76k
                                      PageDecoder** decoder) {
108
1.76k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
1.76k
        return Status::OK();
110
1.76k
    }
_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
12.4k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
116
12.4k
        return RlePageBuilder<FieldType::OLAP_FIELD_TYPE_BOOL>::create(builder, opts);
117
12.4k
    }
118
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
119
18.2k
                                      PageDecoder** decoder) {
120
18.2k
        *decoder = new RlePageDecoder<FieldType::OLAP_FIELD_TYPE_BOOL>(data, opts);
121
18.2k
        return Status::OK();
122
18.2k
    }
123
};
124
125
template <FieldType type>
126
struct TypeEncodingTraits<type, DICT_ENCODING, Slice> {
127
327k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
327k
        return BinaryDictPageBuilder::create(builder, opts);
129
327k
    }
_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
105k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
105k
        return BinaryDictPageBuilder::create(builder, opts);
129
105k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
127
8.00k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
8.00k
        return BinaryDictPageBuilder::create(builder, opts);
129
8.00k
    }
_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
404k
                                      PageDecoder** decoder) {
132
404k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
404k
        return Status::OK();
134
404k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
36.4k
                                      PageDecoder** decoder) {
132
36.4k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
36.4k
        return Status::OK();
134
36.4k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
232k
                                      PageDecoder** decoder) {
132
232k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
232k
        return Status::OK();
134
232k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
102k
                                      PageDecoder** decoder) {
132
102k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
102k
        return Status::OK();
134
102k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
26.4k
                                      PageDecoder** decoder) {
132
26.4k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
26.4k
        return Status::OK();
134
26.4k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
6.12k
                                      PageDecoder** decoder) {
132
6.12k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
6.12k
        return Status::OK();
134
6.12k
    }
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.33M
                                      PageDecoder** decoder) {
214
4.33M
        *decoder = new BinaryPrefixPageDecoder(data, opts);
215
4.33M
        return Status::OK();
216
4.33M
    }
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.33M
                                      PageDecoder** decoder) {
214
4.33M
        *decoder = new BinaryPrefixPageDecoder(data, opts);
215
4.33M
        return Status::OK();
216
4.33M
    }
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
141k
EncodingTypePB EncodingInfoResolver::get_v2_default_encoding(FieldType type) const {
405
141k
    return _lookup(_v2_default_map, type);
406
141k
}
407
408
1.55k
EncodingTypePB EncodingInfoResolver::get_v3_default_encoding(FieldType type) const {
409
1.55k
    return _lookup(_v3_default_map, type);
410
1.55k
}
411
412
13.3k
EncodingTypePB EncodingInfoResolver::get_index_column_encoding(FieldType type) const {
413
13.3k
    return _lookup(_index_column_encoding_map, type);
414
13.3k
}
415
416
Status EncodingInfoResolver::get(FieldType data_type, EncodingTypePB encoding_type,
417
1.09M
                                 const EncodingInfo** out) {
418
1.09M
    auto key = std::make_pair(data_type, encoding_type);
419
1.09M
    auto it = _encoding_map.find(key);
420
1.09M
    if (it == std::end(_encoding_map)) {
421
0
        return Status::InternalError("fail to find valid type encoding, type:{}, encoding:{}",
422
0
                                     data_type, encoding_type);
423
0
    }
424
1.09M
    *out = it->second;
425
1.09M
    return Status::OK();
426
1.09M
}
427
428
template <typename TraitsClass>
429
EncodingInfo::EncodingInfo(TraitsClass traits)
430
486
        : _create_builder_func(TraitsClass::create_page_builder),
431
486
          _create_decoder_func(TraitsClass::create_page_decoder),
432
486
          _type(TraitsClass::type),
433
486
          _encoding(TraitsClass::encoding) {
434
486
    if (_encoding == BIT_SHUFFLE) {
435
132
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
354
    } else if (_encoding == DICT_ENCODING) {
437
30
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
6
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
24
        } else {
440
24
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
24
        }
442
324
    } 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
174
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
6
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
6
        }
448
174
    } 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
54
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
6
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
48
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
48
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
48
        } 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
54
    }
467
486
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE8ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE6ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE5EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } else if (_encoding == DICT_ENCODING) {
437
6
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
6
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
        } else {
440
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
        }
442
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
6
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
6
        }
448
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
6
            _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
6
    }
467
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE3EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE5EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
        } else {
440
6
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
6
        }
442
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
6
            _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
6
    }
467
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE3EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE5EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
        } else {
440
6
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
6
        }
442
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
6
            _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
6
    }
467
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE3EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE5EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
        } else {
440
6
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
6
        }
442
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
6
            _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
6
    }
467
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE3EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE5EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
        } else {
440
6
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
6
        }
442
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
6
            _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
6
    }
467
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE3EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE4EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
6
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
6
            _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
6
    }
467
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
6
            _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
6
    }
467
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
6
            _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
6
    }
467
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
6
        : _create_builder_func(TraitsClass::create_page_builder),
431
6
          _create_decoder_func(TraitsClass::create_page_decoder),
432
6
          _type(TraitsClass::type),
433
6
          _encoding(TraitsClass::encoding) {
434
6
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
6
    } 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
6
    } 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
6
    } 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
6
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
6
            _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
6
    }
467
6
}
468
469
#ifdef BE_TEST
470
static EncodingInfoResolver s_encoding_info_resolver;
471
#endif
472
473
1.09M
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
1.09M
    auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver();
478
1.09M
    if (resolver == nullptr) {
479
0
        return Status::InternalError("EncodingInfoResolver not initialized");
480
0
    }
481
1.09M
    return resolver->get(type, encoding_type, out);
482
1.09M
#endif
483
1.09M
}
484
485
141k
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
141k
    auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver();
490
141k
    if (resolver == nullptr) {
491
0
        return UNKNOWN_ENCODING;
492
0
    }
493
141k
    return resolver->get_v2_default_encoding(type);
494
141k
#endif
495
141k
}
496
497
1.55k
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
1.55k
    auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver();
502
1.55k
    if (resolver == nullptr) {
503
0
        return UNKNOWN_ENCODING;
504
0
    }
505
1.55k
    return resolver->get_v3_default_encoding(type);
506
1.55k
#endif
507
1.55k
}
508
509
13.4k
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
13.4k
    auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver();
514
13.4k
    if (resolver == nullptr) {
515
0
        return UNKNOWN_ENCODING;
516
0
    }
517
13.4k
    return resolver->get_index_column_encoding(type);
518
13.4k
#endif
519
13.4k
}
520
521
EncodingTypePB EncodingInfo::resolve_default_encoding(TabletStorageFormatPB storage_format,
522
142k
                                                      const TabletColumn& column) {
523
142k
    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
142k
    if (column.is_row_store_column()) {
528
0
        return is_v3 ? PLAIN_ENCODING_V2 : PLAIN_ENCODING;
529
0
    }
530
142k
    return is_v3 ? get_v3_default_encoding(column.type()) : get_v2_default_encoding(column.type());
531
142k
}
532
533
Status EncodingInfo::create_page_builder(const PageBuilderOptions& opts,
534
330k
                                         std::unique_ptr<PageBuilder>& builder) const {
535
330k
    PageBuilder* raw_builder = nullptr;
536
330k
    RETURN_IF_ERROR(_create_builder_func(opts, &raw_builder));
537
330k
    builder.reset(raw_builder);
538
330k
    return Status::OK();
539
330k
}
540
541
Status EncodingInfo::create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
542
385k
                                         std::unique_ptr<PageDecoder>& decoder) const {
543
385k
    PageDecoder* raw_decoder = nullptr;
544
385k
    RETURN_IF_ERROR(_create_decoder_func(data, opts, &raw_decoder));
545
385k
    decoder.reset(raw_decoder);
546
385k
    return Status::OK();
547
385k
}
548
549
} // namespace segment_v2
550
} // namespace doris