Coverage Report

Created: 2026-06-01 18:55

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
225k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
225k
        return PlainPageBuilder<type>::create(builder, opts);
56
225k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE2EavE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
52.7k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
52.7k
        return PlainPageBuilder<type>::create(builder, opts);
56
52.7k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE2EsvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
8.93k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
8.93k
        return PlainPageBuilder<type>::create(builder, opts);
56
8.93k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE2EivE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
49.1k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
49.1k
        return PlainPageBuilder<type>::create(builder, opts);
56
49.1k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE2ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
103k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
103k
        return PlainPageBuilder<type>::create(builder, opts);
56
103k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE2EnvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
11.7k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
11.7k
        return PlainPageBuilder<type>::create(builder, opts);
56
11.7k
    }
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
360k
                                      PageDecoder** decoder) {
59
360k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
360k
        return Status::OK();
61
360k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE2EavE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
58
80.8k
                                      PageDecoder** decoder) {
59
80.8k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
80.8k
        return Status::OK();
61
80.8k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE2EsvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
58
10.3k
                                      PageDecoder** decoder) {
59
10.3k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
10.3k
        return Status::OK();
61
10.3k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE2EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
58
126k
                                      PageDecoder** decoder) {
59
126k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
126k
        return Status::OK();
61
126k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE2ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
58
126k
                                      PageDecoder** decoder) {
59
126k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
126k
        return Status::OK();
61
126k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE2EnvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
58
16.6k
                                      PageDecoder** decoder) {
59
16.6k
        *decoder = new PlainPageDecoder<type>(data, opts);
60
16.6k
        return Status::OK();
61
16.6k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE2EfvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE2EdvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE2EhvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE2ENS_8uint24_tEvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE2EjvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE2EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE2ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE2EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE2ENS_11decimal12_tEvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE2EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE2ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE2EnvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE2EN4wide7integerILm256EiEEvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE2EjvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE2EovE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
62
};
63
64
template <FieldType type>
65
struct TypeEncodingTraits<type, PLAIN_ENCODING, Slice> {
66
807k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
807k
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
807k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
148k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
148k
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
148k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
577
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
577
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
577
    }
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
357
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
357
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
357
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
657k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
657k
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
657k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
217
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
217
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
217
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
938
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
938
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
938
    }
69
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
70
201k
                                      PageDecoder** decoder) {
71
201k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
201k
        return Status::OK();
73
201k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
17.9k
                                      PageDecoder** decoder) {
71
17.9k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
17.9k
        return Status::OK();
73
17.9k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
85.3k
                                      PageDecoder** decoder) {
71
85.3k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
85.3k
        return Status::OK();
73
85.3k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
56.8k
                                      PageDecoder** decoder) {
71
56.8k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
56.8k
        return Status::OK();
73
56.8k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
9.61k
                                      PageDecoder** decoder) {
71
9.61k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
9.61k
        return Status::OK();
73
9.61k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
2.92k
                                      PageDecoder** decoder) {
71
2.92k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
2.92k
        return Status::OK();
73
2.92k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
258
                                      PageDecoder** decoder) {
71
258
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
258
        return Status::OK();
73
258
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
28.2k
                                      PageDecoder** decoder) {
71
28.2k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
28.2k
        return Status::OK();
73
28.2k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
97
                                      PageDecoder** decoder) {
71
97
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
97
        return Status::OK();
73
97
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
446
                                      PageDecoder** decoder) {
71
446
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
446
        return Status::OK();
73
446
    }
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
189k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
189k
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
189k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
185k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
185k
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
185k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
752
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
752
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
752
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
844
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
844
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
844
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
1.20k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
1.20k
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
1.20k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
708
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
708
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
708
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
311
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
311
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
311
    }
93
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
94
248k
                                      PageDecoder** decoder) {
95
248k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
248k
        return Status::OK();
97
248k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
12.7k
                                      PageDecoder** decoder) {
95
12.7k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
12.7k
        return Status::OK();
97
12.7k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
134k
                                      PageDecoder** decoder) {
95
134k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
134k
        return Status::OK();
97
134k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
79.0k
                                      PageDecoder** decoder) {
95
79.0k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
79.0k
        return Status::OK();
97
79.0k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
16.3k
                                      PageDecoder** decoder) {
95
16.3k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
16.3k
        return Status::OK();
97
16.3k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
3.06k
                                      PageDecoder** decoder) {
95
3.06k
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
3.06k
        return Status::OK();
97
3.06k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
550
                                      PageDecoder** decoder) {
95
550
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
550
        return Status::OK();
97
550
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
879
                                      PageDecoder** decoder) {
95
879
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
879
        return Status::OK();
97
879
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
357
                                      PageDecoder** decoder) {
95
357
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
357
        return Status::OK();
97
357
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
94
440
                                      PageDecoder** decoder) {
95
440
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
440
        return Status::OK();
97
440
    }
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
372k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
372k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
372k
    }
_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
7.79k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
7.79k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
7.79k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE6EivE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
52.1k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
52.1k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
52.1k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE6ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
49.0k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
49.0k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
49.0k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE6EnvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
9.91k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
9.91k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
9.91k
    }
_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
19.0k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
19.0k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
19.0k
    }
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.2k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
36.2k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
36.2k
    }
_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
284
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
284
        return BitshufflePageBuilder<type>::create(builder, opts);
105
284
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE6EmvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
7.09k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
7.09k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
7.09k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE6ENS_11decimal12_tEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
194
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
194
        return BitshufflePageBuilder<type>::create(builder, opts);
105
194
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE6EivE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
9.46k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
9.46k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
9.46k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE6ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
11.8k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
11.8k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
11.8k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE6EnvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
15.8k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
15.8k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
15.8k
    }
_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
700
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
700
        return BitshufflePageBuilder<type>::create(builder, opts);
105
700
    }
106
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
107
660k
                                      PageDecoder** decoder) {
108
660k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
660k
        return Status::OK();
110
660k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE6EavE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
68.5k
                                      PageDecoder** decoder) {
108
68.5k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
68.5k
        return Status::OK();
110
68.5k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE6EsvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
17.9k
                                      PageDecoder** decoder) {
108
17.9k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
17.9k
        return Status::OK();
110
17.9k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE6EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
148k
                                      PageDecoder** decoder) {
108
148k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
148k
        return Status::OK();
110
148k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE6ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
48.3k
                                      PageDecoder** decoder) {
108
48.3k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
48.3k
        return Status::OK();
110
48.3k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE6EnvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
14.1k
                                      PageDecoder** decoder) {
108
14.1k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
14.1k
        return Status::OK();
110
14.1k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE8ELNS0_14EncodingTypePBE6EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
87.5k
                                      PageDecoder** decoder) {
108
87.5k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
87.5k
        return Status::OK();
110
87.5k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE6ELNS0_14EncodingTypePBE6EjvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE6EfvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
18.7k
                                      PageDecoder** decoder) {
108
18.7k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
18.7k
        return Status::OK();
110
18.7k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE6EdvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
29.3k
                                      PageDecoder** decoder) {
108
29.3k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
29.3k
        return Status::OK();
110
29.3k
    }
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.87k
                                      PageDecoder** decoder) {
108
1.87k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
1.87k
        return Status::OK();
110
1.87k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE6EjvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
57.3k
                                      PageDecoder** decoder) {
108
57.3k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
57.3k
        return Status::OK();
110
57.3k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE6EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
63.2k
                                      PageDecoder** decoder) {
108
63.2k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
63.2k
        return Status::OK();
110
63.2k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE6ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
2.52k
                                      PageDecoder** decoder) {
108
2.52k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
2.52k
        return Status::OK();
110
2.52k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE6EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
14.7k
                                      PageDecoder** decoder) {
108
14.7k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
14.7k
        return Status::OK();
110
14.7k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE6ENS_11decimal12_tEvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
1.46k
                                      PageDecoder** decoder) {
108
1.46k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
1.46k
        return Status::OK();
110
1.46k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE6EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
14.5k
                                      PageDecoder** decoder) {
108
14.5k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
14.5k
        return Status::OK();
110
14.5k
    }
_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
28.8k
                                      PageDecoder** decoder) {
108
28.8k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
28.8k
        return Status::OK();
110
28.8k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE6EN4wide7integerILm256EiEEvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
1.75k
                                      PageDecoder** decoder) {
108
1.75k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
1.75k
        return Status::OK();
110
1.75k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE6EjvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
1.19k
                                      PageDecoder** decoder) {
108
1.19k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
1.19k
        return Status::OK();
110
1.19k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE6EovE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
1.16k
                                      PageDecoder** decoder) {
108
1.16k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
1.16k
        return Status::OK();
110
1.16k
    }
111
};
112
113
template <>
114
struct TypeEncodingTraits<FieldType::OLAP_FIELD_TYPE_BOOL, RLE, uint8_t> {
115
14.5k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
116
14.5k
        return RlePageBuilder<FieldType::OLAP_FIELD_TYPE_BOOL>::create(builder, opts);
117
14.5k
    }
118
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
119
21.8k
                                      PageDecoder** decoder) {
120
21.8k
        *decoder = new RlePageDecoder<FieldType::OLAP_FIELD_TYPE_BOOL>(data, opts);
121
21.8k
        return Status::OK();
122
21.8k
    }
123
};
124
125
template <FieldType type>
126
struct TypeEncodingTraits<type, DICT_ENCODING, Slice> {
127
298k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
298k
        return BinaryDictPageBuilder::create(builder, opts);
129
298k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
127
17.6k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
17.6k
        return BinaryDictPageBuilder::create(builder, opts);
129
17.6k
    }
_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
117k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
117k
        return BinaryDictPageBuilder::create(builder, opts);
129
117k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
127
7.79k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
7.79k
        return BinaryDictPageBuilder::create(builder, opts);
129
7.79k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
127
5.97k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
5.97k
        return BinaryDictPageBuilder::create(builder, opts);
129
5.97k
    }
130
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
131
385k
                                      PageDecoder** decoder) {
132
385k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
385k
        return Status::OK();
134
385k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
35.2k
                                      PageDecoder** decoder) {
132
35.2k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
35.2k
        return Status::OK();
134
35.2k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
187k
                                      PageDecoder** decoder) {
132
187k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
187k
        return Status::OK();
134
187k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
130k
                                      PageDecoder** decoder) {
132
130k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
130k
        return Status::OK();
134
130k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
26.0k
                                      PageDecoder** decoder) {
132
26.0k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
26.0k
        return Status::OK();
134
26.0k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
5.98k
                                      PageDecoder** decoder) {
132
5.98k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
5.98k
        return Status::OK();
134
5.98k
    }
135
};
136
137
template <>
138
struct TypeEncodingTraits<FieldType::OLAP_FIELD_TYPE_DATE, FOR_ENCODING,
139
                          typename CppTypeTraits<FieldType::OLAP_FIELD_TYPE_DATE>::CppType> {
140
0
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
141
0
        return FrameOfReferencePageBuilder<FieldType::OLAP_FIELD_TYPE_DATE>::create(builder, opts);
142
0
    }
143
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
144
0
                                      PageDecoder** decoder) {
145
0
        *decoder = new FrameOfReferencePageDecoder<FieldType::OLAP_FIELD_TYPE_DATE>(data, opts);
146
0
        return Status::OK();
147
0
    }
148
};
149
150
template <>
151
struct TypeEncodingTraits<FieldType::OLAP_FIELD_TYPE_DATEV2, FOR_ENCODING,
152
                          typename CppTypeTraits<FieldType::OLAP_FIELD_TYPE_DATEV2>::CppType> {
153
0
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
154
0
        return FrameOfReferencePageBuilder<FieldType::OLAP_FIELD_TYPE_DATEV2>::create(builder,
155
0
                                                                                      opts);
156
0
    }
157
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
158
0
                                      PageDecoder** decoder) {
159
0
        *decoder = new FrameOfReferencePageDecoder<FieldType::OLAP_FIELD_TYPE_DATEV2>(data, opts);
160
0
        return Status::OK();
161
0
    }
162
};
163
164
template <>
165
struct TypeEncodingTraits<FieldType::OLAP_FIELD_TYPE_DATETIMEV2, FOR_ENCODING,
166
                          typename CppTypeTraits<FieldType::OLAP_FIELD_TYPE_DATETIMEV2>::CppType> {
167
0
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
168
0
        return FrameOfReferencePageBuilder<FieldType::OLAP_FIELD_TYPE_DATETIMEV2>::create(builder,
169
0
                                                                                          opts);
170
0
    }
171
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
172
0
                                      PageDecoder** decoder) {
173
0
        *decoder =
174
0
                new FrameOfReferencePageDecoder<FieldType::OLAP_FIELD_TYPE_DATETIMEV2>(data, opts);
175
0
        return Status::OK();
176
0
    }
177
};
178
179
template <>
180
struct TypeEncodingTraits<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ, FOR_ENCODING,
181
                          typename CppTypeTraits<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ>::CppType> {
182
0
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
183
0
        return FrameOfReferencePageBuilder<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ>::create(builder,
184
0
                                                                                           opts);
185
0
    }
186
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
187
0
                                      PageDecoder** decoder) {
188
0
        *decoder =
189
0
                new FrameOfReferencePageDecoder<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ>(data, opts);
190
0
        return Status::OK();
191
0
    }
192
};
193
194
template <FieldType type, typename CppType>
195
struct TypeEncodingTraits<type, FOR_ENCODING, CppType,
196
                          typename std::enable_if<IsIntegral<CppType>::value>::type> {
197
0
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
198
0
        return FrameOfReferencePageBuilder<type>::create(builder, opts);
199
0
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE7EavE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE7EsvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE7EivE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE7ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE7EnvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE7ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
200
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
201
0
                                      PageDecoder** decoder) {
202
0
        *decoder = new FrameOfReferencePageDecoder<type>(data, opts);
203
0
        return Status::OK();
204
0
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE7EavE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE7EsvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE7EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE7ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE7EnvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE7ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
205
};
206
207
template <FieldType type>
208
struct TypeEncodingTraits<type, PREFIX_ENCODING, Slice> {
209
25.3k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
210
25.3k
        return BinaryPrefixPageBuilder::create(builder, opts);
211
25.3k
    }
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.3k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
210
25.3k
        return BinaryPrefixPageBuilder::create(builder, opts);
211
25.3k
    }
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.96M
                                      PageDecoder** decoder) {
214
3.96M
        *decoder = new BinaryPrefixPageDecoder(data, opts);
215
3.96M
        return Status::OK();
216
3.96M
    }
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.96M
                                      PageDecoder** decoder) {
214
3.96M
        *decoder = new BinaryPrefixPageDecoder(data, opts);
215
3.96M
        return Status::OK();
216
3.96M
    }
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
398k
EncodingTypePB EncodingInfoResolver::get_v2_default_encoding(FieldType type) const {
405
398k
    return _lookup(_v2_default_map, type);
406
398k
}
407
408
606k
EncodingTypePB EncodingInfoResolver::get_v3_default_encoding(FieldType type) const {
409
606k
    return _lookup(_v3_default_map, type);
410
606k
}
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
4.16M
                                 const EncodingInfo** out) {
418
4.16M
    auto key = std::make_pair(data_type, encoding_type);
419
4.16M
    auto it = _encoding_map.find(key);
420
4.16M
    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
4.16M
    *out = it->second;
425
4.16M
    return Status::OK();
426
4.16M
}
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
4.12M
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
4.12M
    auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver();
478
4.12M
    if (resolver == nullptr) {
479
0
        return Status::InternalError("EncodingInfoResolver not initialized");
480
0
    }
481
4.12M
    return resolver->get(type, encoding_type, out);
482
4.12M
#endif
483
4.12M
}
484
485
387k
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
387k
    auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver();
490
387k
    if (resolver == nullptr) {
491
0
        return UNKNOWN_ENCODING;
492
0
    }
493
387k
    return resolver->get_v2_default_encoding(type);
494
387k
#endif
495
387k
}
496
497
603k
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
603k
    auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver();
502
603k
    if (resolver == nullptr) {
503
0
        return UNKNOWN_ENCODING;
504
0
    }
505
603k
    return resolver->get_v3_default_encoding(type);
506
603k
#endif
507
603k
}
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
1.00M
                                                      const TabletColumn& column) {
523
1.00M
    const bool is_v3 = (storage_format == TabletStorageFormatPB::TABLET_STORAGE_FORMAT_V3);
524
525
    // Row store data is already serialized as a single blob. Keep it on plain pages to
526
    // avoid introducing dictionary pages for the hidden row store column.
527
1.00M
    if (column.is_row_store_column()) {
528
1.32k
        return is_v3 ? PLAIN_ENCODING_V2 : PLAIN_ENCODING;
529
1.32k
    }
530
1.00M
    return is_v3 ? get_v3_default_encoding(column.type()) : get_v2_default_encoding(column.type());
531
1.00M
}
532
533
Status EncodingInfo::create_page_builder(const PageBuilderOptions& opts,
534
301k
                                         std::unique_ptr<PageBuilder>& builder) const {
535
301k
    PageBuilder* raw_builder = nullptr;
536
301k
    RETURN_IF_ERROR(_create_builder_func(opts, &raw_builder));
537
301k
    builder.reset(raw_builder);
538
301k
    return Status::OK();
539
301k
}
540
541
Status EncodingInfo::create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
542
365k
                                         std::unique_ptr<PageDecoder>& decoder) const {
543
365k
    PageDecoder* raw_decoder = nullptr;
544
365k
    RETURN_IF_ERROR(_create_decoder_func(data, opts, &raw_decoder));
545
365k
    decoder.reset(raw_decoder);
546
365k
    return Status::OK();
547
365k
}
548
549
} // namespace segment_v2
550
} // namespace doris