Coverage Report

Created: 2026-06-01 13:10

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
220k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
220k
        return PlainPageBuilder<type>::create(builder, opts);
56
220k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE2EavE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
50.6k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
50.6k
        return PlainPageBuilder<type>::create(builder, opts);
56
50.6k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE2EsvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
10.1k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
10.1k
        return PlainPageBuilder<type>::create(builder, opts);
56
10.1k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE2EivE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
55.0k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
55.0k
        return PlainPageBuilder<type>::create(builder, opts);
56
55.0k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE2ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
93.1k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
93.1k
        return PlainPageBuilder<type>::create(builder, opts);
56
93.1k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE2EnvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
11.9k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
11.9k
        return PlainPageBuilder<type>::create(builder, opts);
56
11.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
349k
                                      PageDecoder** decoder) {
59
349k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
349k
        return Status::OK();
61
349k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE2EavE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
58
76.1k
                                      PageDecoder** decoder) {
59
76.1k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
76.1k
        return Status::OK();
61
76.1k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE2EsvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
58
17.4k
                                      PageDecoder** decoder) {
59
17.4k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
17.4k
        return Status::OK();
61
17.4k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE2EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
58
131k
                                      PageDecoder** decoder) {
59
131k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
131k
        return Status::OK();
61
131k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE2ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
58
106k
                                      PageDecoder** decoder) {
59
106k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
106k
        return Status::OK();
61
106k
    }
_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
748k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
748k
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
748k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
113k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
113k
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
113k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
747
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
747
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
747
    }
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
164
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
164
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
164
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
632k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
632k
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
632k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
13
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
13
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
13
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
1.01k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
1.01k
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
1.01k
    }
69
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
70
184k
                                      PageDecoder** decoder) {
71
184k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
184k
        return Status::OK();
73
184k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
13.9k
                                      PageDecoder** decoder) {
71
13.9k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
13.9k
        return Status::OK();
73
13.9k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
83.4k
                                      PageDecoder** decoder) {
71
83.4k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
83.4k
        return Status::OK();
73
83.4k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
43.3k
                                      PageDecoder** decoder) {
71
43.3k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
43.3k
        return Status::OK();
73
43.3k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
6.00k
                                      PageDecoder** decoder) {
71
6.00k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
6.00k
        return Status::OK();
73
6.00k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
3.33k
                                      PageDecoder** decoder) {
71
3.33k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
3.33k
        return Status::OK();
73
3.33k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
216
                                      PageDecoder** decoder) {
71
216
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
216
        return Status::OK();
73
216
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
33.6k
                                      PageDecoder** decoder) {
71
33.6k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
33.6k
        return Status::OK();
73
33.6k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
29
                                      PageDecoder** decoder) {
71
29
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
29
        return Status::OK();
73
29
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
524
                                      PageDecoder** decoder) {
71
524
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
524
        return Status::OK();
73
524
    }
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
199k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
199k
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
199k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
195k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
195k
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
195k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
584
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
584
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
584
    }
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
1.04k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
1.04k
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
1.04k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
1.31k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
1.31k
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
1.31k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
912
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
912
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
912
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
211
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
211
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
211
    }
93
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
94
243k
                                      PageDecoder** decoder) {
95
243k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
243k
        return Status::OK();
97
243k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
17.3k
                                      PageDecoder** decoder) {
95
17.3k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
17.3k
        return Status::OK();
97
17.3k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
137k
                                      PageDecoder** decoder) {
95
137k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
137k
        return Status::OK();
97
137k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
64.4k
                                      PageDecoder** decoder) {
95
64.4k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
64.4k
        return Status::OK();
97
64.4k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
18.9k
                                      PageDecoder** decoder) {
95
18.9k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
18.9k
        return Status::OK();
97
18.9k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
2.56k
                                      PageDecoder** decoder) {
95
2.56k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
2.56k
        return Status::OK();
97
2.56k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
591
                                      PageDecoder** decoder) {
95
591
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
591
        return Status::OK();
97
591
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
854
                                      PageDecoder** decoder) {
95
854
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
854
        return Status::OK();
97
854
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
425
                                      PageDecoder** decoder) {
95
425
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
425
        return Status::OK();
97
425
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
353
                                      PageDecoder** decoder) {
95
353
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
353
        return Status::OK();
97
353
    }
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
376k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
376k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
376k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE6EavE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
29.8k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
29.8k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
29.8k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE6EsvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
6.57k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
6.57k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
6.57k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE6EivE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
45.7k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
45.7k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
45.7k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE6ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
66.0k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
66.0k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
66.0k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE6EnvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
9.61k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
9.61k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
9.61k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE8ELNS0_14EncodingTypePBE6EmvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
67.4k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
67.4k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
67.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE6ELNS0_14EncodingTypePBE6EjvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE6EfvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
11.7k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
11.7k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
11.7k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE6EdvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
14.2k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
14.2k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
14.2k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE6EhvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE6ENS_8uint24_tEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
185
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
185
        return BitshufflePageBuilder<type>::create(builder, opts);
105
185
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE6EjvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
36.0k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
36.0k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
36.0k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE6EmvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
41.3k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
41.3k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
41.3k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE6ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
291
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
291
        return BitshufflePageBuilder<type>::create(builder, opts);
105
291
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE6EmvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
7.04k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
7.04k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
7.04k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE6ENS_11decimal12_tEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
197
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
197
        return BitshufflePageBuilder<type>::create(builder, opts);
105
197
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE6EivE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
9.45k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
9.45k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
9.45k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE6ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
11.7k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
11.7k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
11.7k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE6EnvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
15.7k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
15.7k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
15.7k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE6EN4wide7integerILm256EiEEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
1.15k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
1.15k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
1.15k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE6EjvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
789
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
789
        return BitshufflePageBuilder<type>::create(builder, opts);
105
789
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE6EovE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
703
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
703
        return BitshufflePageBuilder<type>::create(builder, opts);
105
703
    }
106
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
107
674k
                                      PageDecoder** decoder) {
108
674k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
674k
        return Status::OK();
110
674k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE6EavE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
72.8k
                                      PageDecoder** decoder) {
108
72.8k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
72.8k
        return Status::OK();
110
72.8k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE6EsvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
11.8k
                                      PageDecoder** decoder) {
108
11.8k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
11.8k
        return Status::OK();
110
11.8k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE6EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
140k
                                      PageDecoder** decoder) {
108
140k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
140k
        return Status::OK();
110
140k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE6ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
68.1k
                                      PageDecoder** decoder) {
108
68.1k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
68.1k
        return Status::OK();
110
68.1k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE6EnvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
13.8k
                                      PageDecoder** decoder) {
108
13.8k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
13.8k
        return Status::OK();
110
13.8k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE8ELNS0_14EncodingTypePBE6EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
90.0k
                                      PageDecoder** decoder) {
108
90.0k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
90.0k
        return Status::OK();
110
90.0k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE6ELNS0_14EncodingTypePBE6EjvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE6EfvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
19.4k
                                      PageDecoder** decoder) {
108
19.4k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
19.4k
        return Status::OK();
110
19.4k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE6EdvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
28.4k
                                      PageDecoder** decoder) {
108
28.4k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
28.4k
        return Status::OK();
110
28.4k
    }
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.82k
                                      PageDecoder** decoder) {
108
1.82k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
1.82k
        return Status::OK();
110
1.82k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE6EjvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
57.6k
                                      PageDecoder** decoder) {
108
57.6k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
57.6k
        return Status::OK();
110
57.6k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE6EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
64.2k
                                      PageDecoder** decoder) {
108
64.2k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
64.2k
        return Status::OK();
110
64.2k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE6ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
2.43k
                                      PageDecoder** decoder) {
108
2.43k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
2.43k
        return Status::OK();
110
2.43k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE6EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
14.4k
                                      PageDecoder** decoder) {
108
14.4k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
14.4k
        return Status::OK();
110
14.4k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE6ENS_11decimal12_tEvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
1.45k
                                      PageDecoder** decoder) {
108
1.45k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
1.45k
        return Status::OK();
110
1.45k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE6EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
15.0k
                                      PageDecoder** decoder) {
108
15.0k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
15.0k
        return Status::OK();
110
15.0k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE6ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
38.2k
                                      PageDecoder** decoder) {
108
38.2k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
38.2k
        return Status::OK();
110
38.2k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE6EnvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
29.1k
                                      PageDecoder** decoder) {
108
29.1k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
29.1k
        return Status::OK();
110
29.1k
    }
_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.15k
                                      PageDecoder** decoder) {
108
1.15k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
1.15k
        return Status::OK();
110
1.15k
    }
111
};
112
113
template <>
114
struct TypeEncodingTraits<FieldType::OLAP_FIELD_TYPE_BOOL, RLE, uint8_t> {
115
13.2k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
116
13.2k
        return RlePageBuilder<FieldType::OLAP_FIELD_TYPE_BOOL>::create(builder, opts);
117
13.2k
    }
118
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
119
19.5k
                                      PageDecoder** decoder) {
120
19.5k
        *decoder = new RlePageDecoder<FieldType::OLAP_FIELD_TYPE_BOOL>(data, opts);
121
19.5k
        return Status::OK();
122
19.5k
    }
123
};
124
125
template <FieldType type>
126
struct TypeEncodingTraits<type, DICT_ENCODING, Slice> {
127
276k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
276k
        return BinaryDictPageBuilder::create(builder, opts);
129
276k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
127
17.5k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
17.5k
        return BinaryDictPageBuilder::create(builder, opts);
129
17.5k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
127
149k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
149k
        return BinaryDictPageBuilder::create(builder, opts);
129
149k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
127
95.7k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
95.7k
        return BinaryDictPageBuilder::create(builder, opts);
129
95.7k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
127
7.53k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
7.53k
        return BinaryDictPageBuilder::create(builder, opts);
129
7.53k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
127
5.91k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
5.91k
        return BinaryDictPageBuilder::create(builder, opts);
129
5.91k
    }
130
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
131
375k
                                      PageDecoder** decoder) {
132
375k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
375k
        return Status::OK();
134
375k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
35.9k
                                      PageDecoder** decoder) {
132
35.9k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
35.9k
        return Status::OK();
134
35.9k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
188k
                                      PageDecoder** decoder) {
132
188k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
188k
        return Status::OK();
134
188k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
119k
                                      PageDecoder** decoder) {
132
119k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
119k
        return Status::OK();
134
119k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
24.9k
                                      PageDecoder** decoder) {
132
24.9k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
24.9k
        return Status::OK();
134
24.9k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
5.90k
                                      PageDecoder** decoder) {
132
5.90k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
5.90k
        return Status::OK();
134
5.90k
    }
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
25.9k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
210
25.9k
        return BinaryPrefixPageBuilder::create(builder, opts);
211
25.9k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE3ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE3ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
209
25.9k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
210
25.9k
        return BinaryPrefixPageBuilder::create(builder, opts);
211
25.9k
    }
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
3.97M
                                      PageDecoder** decoder) {
214
3.97M
        *decoder = new BinaryPrefixPageDecoder(data, opts);
215
3.97M
        return Status::OK();
216
3.97M
    }
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
3.97M
                                      PageDecoder** decoder) {
214
3.97M
        *decoder = new BinaryPrefixPageDecoder(data, opts);
215
3.97M
        return Status::OK();
216
3.97M
    }
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
368k
EncodingTypePB EncodingInfoResolver::get_v2_default_encoding(FieldType type) const {
405
368k
    return _lookup(_v2_default_map, type);
406
368k
}
407
408
612k
EncodingTypePB EncodingInfoResolver::get_v3_default_encoding(FieldType type) const {
409
612k
    return _lookup(_v3_default_map, type);
410
612k
}
411
412
23.4k
EncodingTypePB EncodingInfoResolver::get_index_column_encoding(FieldType type) const {
413
23.4k
    return _lookup(_index_column_encoding_map, type);
414
23.4k
}
415
416
Status EncodingInfoResolver::get(FieldType data_type, EncodingTypePB encoding_type,
417
7.05M
                                 const EncodingInfo** out) {
418
7.05M
    auto key = std::make_pair(data_type, encoding_type);
419
7.05M
    auto it = _encoding_map.find(key);
420
7.05M
    if (it == std::end(_encoding_map)) {
421
16
        return Status::InternalError("fail to find valid type encoding, type:{}, encoding:{}",
422
16
                                     data_type, encoding_type);
423
16
    }
424
7.05M
    *out = it->second;
425
7.05M
    return Status::OK();
426
7.05M
}
427
428
template <typename TraitsClass>
429
EncodingInfo::EncodingInfo(TraitsClass traits)
430
1.45k
        : _create_builder_func(TraitsClass::create_page_builder),
431
1.45k
          _create_decoder_func(TraitsClass::create_page_decoder),
432
1.45k
          _type(TraitsClass::type),
433
1.45k
          _encoding(TraitsClass::encoding) {
434
1.45k
    if (_encoding == BIT_SHUFFLE) {
435
396
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
1.06k
    } else if (_encoding == DICT_ENCODING) {
437
90
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
18
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
72
        } else {
440
72
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
72
        }
442
972
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
522
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
18
        }
448
522
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
162
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
144
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
144
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
144
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
162
    }
467
1.45k
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE8ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE6ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE5EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
18
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
18
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
        } else {
440
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
0
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
0
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
0
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
0
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
        } else {
440
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
18
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
18
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
0
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
0
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
        } else {
440
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
0
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
0
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
18
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
18
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE3EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
0
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
        } else {
440
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
0
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
0
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
0
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE5EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
18
        } else {
440
18
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
18
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
18
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
18
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE3EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE5EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
18
        } else {
440
18
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
18
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
18
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
18
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE3EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE5EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
18
        } else {
440
18
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
18
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
18
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
18
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE3EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE5EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
18
        } else {
440
18
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
18
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
18
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
18
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE3EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE4EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
18
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
0
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
0
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
0
        } else {
461
0
            throw Exception(Status::FatalError(
462
0
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
0
                    "non-Slice type {}",
464
0
                    int(TraitsClass::type)));
465
0
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
18
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
18
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
18
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
18
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
18
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
18
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
0
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
0
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
0
    }
467
18
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
18
        : _create_builder_func(TraitsClass::create_page_builder),
431
18
          _create_decoder_func(TraitsClass::create_page_decoder),
432
18
          _type(TraitsClass::type),
433
18
          _encoding(TraitsClass::encoding) {
434
18
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
18
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
18
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
18
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
18
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
18
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
        } else {
461
            throw Exception(Status::FatalError(
462
                    "PLAIN_ENCODING_V2 is only supported for Slice (binary) types, but got "
463
                    "non-Slice type {}",
464
                    int(TraitsClass::type)));
465
        }
466
18
    }
467
18
}
468
469
#ifdef BE_TEST
470
static EncodingInfoResolver s_encoding_info_resolver;
471
#endif
472
473
7.01M
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
7.01M
    auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver();
478
7.01M
    if (resolver == nullptr) {
479
0
        return Status::InternalError("EncodingInfoResolver not initialized");
480
0
    }
481
7.01M
    return resolver->get(type, encoding_type, out);
482
7.01M
#endif
483
7.01M
}
484
485
357k
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
357k
    auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver();
490
357k
    if (resolver == nullptr) {
491
0
        return UNKNOWN_ENCODING;
492
0
    }
493
357k
    return resolver->get_v2_default_encoding(type);
494
357k
#endif
495
357k
}
496
497
610k
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
610k
    auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver();
502
610k
    if (resolver == nullptr) {
503
0
        return UNKNOWN_ENCODING;
504
0
    }
505
610k
    return resolver->get_v3_default_encoding(type);
506
610k
#endif
507
610k
}
508
509
23.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
23.4k
    auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver();
514
23.4k
    if (resolver == nullptr) {
515
0
        return UNKNOWN_ENCODING;
516
0
    }
517
23.4k
    return resolver->get_index_column_encoding(type);
518
23.4k
#endif
519
23.4k
}
520
521
EncodingTypePB EncodingInfo::resolve_default_encoding(TabletStorageFormatPB storage_format,
522
982k
                                                      const TabletColumn& column) {
523
982k
    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
982k
    if (column.is_row_store_column()) {
528
1.33k
        return is_v3 ? PLAIN_ENCODING_V2 : PLAIN_ENCODING;
529
1.33k
    }
530
980k
    return is_v3 ? get_v3_default_encoding(column.type()) : get_v2_default_encoding(column.type());
531
982k
}
532
533
Status EncodingInfo::create_page_builder(const PageBuilderOptions& opts,
534
279k
                                         std::unique_ptr<PageBuilder>& builder) const {
535
279k
    PageBuilder* raw_builder = nullptr;
536
279k
    RETURN_IF_ERROR(_create_builder_func(opts, &raw_builder));
537
279k
    builder.reset(raw_builder);
538
279k
    return Status::OK();
539
279k
}
540
541
Status EncodingInfo::create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
542
338k
                                         std::unique_ptr<PageDecoder>& decoder) const {
543
338k
    PageDecoder* raw_decoder = nullptr;
544
338k
    RETURN_IF_ERROR(_create_decoder_func(data, opts, &raw_decoder));
545
338k
    decoder.reset(raw_decoder);
546
338k
    return Status::OK();
547
338k
}
548
549
} // namespace segment_v2
550
} // namespace doris