Coverage Report

Created: 2026-06-01 17:06

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
1.40k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
1.40k
        return PlainPageBuilder<type>::create(builder, opts);
56
1.40k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE2EavE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
2
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
2
        return PlainPageBuilder<type>::create(builder, opts);
56
2
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE2EsvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE2EivE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
1.13k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
1.13k
        return PlainPageBuilder<type>::create(builder, opts);
56
1.13k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE2ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
54
271
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
55
271
        return PlainPageBuilder<type>::create(builder, opts);
56
271
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE2EnvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
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
0
                                      PageDecoder** decoder) {
59
0
        *decoder = new PlainPageDecoder<type>(data, opts);
60
0
        return Status::OK();
61
0
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE2EavE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE2EsvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE2EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE2ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE2EnvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
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
15.3k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
15.3k
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
15.3k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
4.90k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
4.90k
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
4.90k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
66
10.4k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
67
10.4k
        return BinaryPlainPageBuilder<type>::create(builder, opts);
68
10.4k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
69
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
70
2.82k
                                      PageDecoder** decoder) {
71
2.82k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
2.82k
        return Status::OK();
73
2.82k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
39
                                      PageDecoder** decoder) {
71
39
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
39
        return Status::OK();
73
39
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
2.65k
                                      PageDecoder** decoder) {
71
2.65k
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
2.65k
        return Status::OK();
73
2.65k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
111
                                      PageDecoder** decoder) {
71
111
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
111
        return Status::OK();
73
111
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
70
21
                                      PageDecoder** decoder) {
71
21
        *decoder = new BinaryPlainPageDecoder<type>(data, opts);
72
21
        return Status::OK();
73
21
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE2ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
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
610
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
610
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
610
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
609
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
609
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
609
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
90
1
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
91
1
        return BinaryPlainPageV2Builder<type>::create(builder, opts);
92
1
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
93
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
94
0
                                      PageDecoder** decoder) {
95
0
        *decoder = new BinaryPlainPageV2Decoder<type>(data, opts);
96
0
        return Status::OK();
97
0
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE8ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
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
7.12k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
7.12k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
7.12k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE6EavE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
617
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
617
        return BitshufflePageBuilder<type>::create(builder, opts);
105
617
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE6EsvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
13
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
13
        return BitshufflePageBuilder<type>::create(builder, opts);
105
13
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE6EivE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
5.77k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
5.77k
        return BitshufflePageBuilder<type>::create(builder, opts);
105
5.77k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE6ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
359
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
359
        return BitshufflePageBuilder<type>::create(builder, opts);
105
359
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE6EnvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
4
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
4
        return BitshufflePageBuilder<type>::create(builder, opts);
105
4
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE8ELNS0_14EncodingTypePBE6EmvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
335
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
335
        return BitshufflePageBuilder<type>::create(builder, opts);
105
335
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE6ELNS0_14EncodingTypePBE6EjvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE6EfvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
2
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
2
        return BitshufflePageBuilder<type>::create(builder, opts);
105
2
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE6EdvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE6EhvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE6ENS_8uint24_tEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
4
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
4
        return BitshufflePageBuilder<type>::create(builder, opts);
105
4
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE6EjvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
7
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
7
        return BitshufflePageBuilder<type>::create(builder, opts);
105
7
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE6EmvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE6ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
11
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
11
        return BitshufflePageBuilder<type>::create(builder, opts);
105
11
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE6EmvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE6ENS_11decimal12_tEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
103
2
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
104
2
        return BitshufflePageBuilder<type>::create(builder, opts);
105
2
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE6EivE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE6ElvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE6EnvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE6EN4wide7integerILm256EiEEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE6EjvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE6EovE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
106
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
107
5.75k
                                      PageDecoder** decoder) {
108
5.75k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
5.75k
        return Status::OK();
110
5.75k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE6EavE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
336
                                      PageDecoder** decoder) {
108
336
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
336
        return Status::OK();
110
336
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE6EsvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
5
                                      PageDecoder** decoder) {
108
5
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
5
        return Status::OK();
110
5
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE6EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
4.99k
                                      PageDecoder** decoder) {
108
4.99k
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
4.99k
        return Status::OK();
110
4.99k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE6ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
223
                                      PageDecoder** decoder) {
108
223
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
223
        return Status::OK();
110
223
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE6EnvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE8ELNS0_14EncodingTypePBE6EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
183
                                      PageDecoder** decoder) {
108
183
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
183
        return Status::OK();
110
183
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE6ELNS0_14EncodingTypePBE6EjvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE6EfvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
1
                                      PageDecoder** decoder) {
108
1
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
1
        return Status::OK();
110
1
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE6EdvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE6EhvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE6ENS_8uint24_tEvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE6EjvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
5
                                      PageDecoder** decoder) {
108
5
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
5
        return Status::OK();
110
5
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE6EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE6ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
107
5
                                      PageDecoder** decoder) {
108
5
        *decoder = new BitShufflePageDecoder<type>(data, opts);
109
5
        return Status::OK();
110
5
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE6EmvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE6ENS_11decimal12_tEvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE6EivE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE6ElvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE6EnvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE6EN4wide7integerILm256EiEEvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE6EjvE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE6EovE19create_page_decoderERKNS_5SliceERKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
111
};
112
113
template <>
114
struct TypeEncodingTraits<FieldType::OLAP_FIELD_TYPE_BOOL, RLE, uint8_t> {
115
0
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
116
0
        return RlePageBuilder<FieldType::OLAP_FIELD_TYPE_BOOL>::create(builder, opts);
117
0
    }
118
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
119
0
                                      PageDecoder** decoder) {
120
0
        *decoder = new RlePageDecoder<FieldType::OLAP_FIELD_TYPE_BOOL>(data, opts);
121
0
        return Status::OK();
122
0
    }
123
};
124
125
template <FieldType type>
126
struct TypeEncodingTraits<type, DICT_ENCODING, Slice> {
127
3.81k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
3.81k
        return BinaryDictPageBuilder::create(builder, opts);
129
3.81k
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
127
2
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
2
        return BinaryDictPageBuilder::create(builder, opts);
129
2
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
127
140
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
140
        return BinaryDictPageBuilder::create(builder, opts);
129
140
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
127
3.35k
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
3.35k
        return BinaryDictPageBuilder::create(builder, opts);
129
3.35k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
127
311
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
128
311
        return BinaryDictPageBuilder::create(builder, opts);
129
311
    }
130
    static Status create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
131
4.39k
                                      PageDecoder** decoder) {
132
4.39k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
4.39k
        return Status::OK();
134
4.39k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
1
                                      PageDecoder** decoder) {
132
1
        *decoder = new BinaryDictPageDecoder(data, opts);
133
1
        return Status::OK();
134
1
    }
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
4.28k
                                      PageDecoder** decoder) {
132
4.28k
        *decoder = new BinaryDictPageDecoder(data, opts);
133
4.28k
        return Status::OK();
134
4.28k
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE5ENS_5SliceEvE19create_page_decoderERKS4_RKNS0_18PageDecoderOptionsEPPNS0_11PageDecoderE
Line
Count
Source
131
111
                                      PageDecoder** decoder) {
132
111
        *decoder = new BinaryDictPageDecoder(data, opts);
133
111
        return Status::OK();
134
111
    }
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
212
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
210
212
        return BinaryPrefixPageBuilder::create(builder, opts);
211
212
    }
Unexecuted instantiation: _ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE3ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
_ZN5doris10segment_v218TypeEncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE3ENS_5SliceEvE19create_page_builderERKNS0_18PageBuilderOptionsEPPNS0_11PageBuilderE
Line
Count
Source
209
212
    static Status create_page_builder(const PageBuilderOptions& opts, PageBuilder** builder) {
210
212
        return BinaryPrefixPageBuilder::create(builder, opts);
211
212
    }
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
203
                                      PageDecoder** decoder) {
214
203
        *decoder = new BinaryPrefixPageDecoder(data, opts);
215
203
        return Status::OK();
216
203
    }
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
203
                                      PageDecoder** decoder) {
214
203
        *decoder = new BinaryPrefixPageDecoder(data, opts);
215
203
        return Status::OK();
216
203
    }
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
11
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
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_TINYINT, BIT_SHUFFLE>();
226
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_TINYINT, PLAIN_ENCODING>();
227
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_TINYINT, FOR_ENCODING>();
228
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_SMALLINT, BIT_SHUFFLE>();
229
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_SMALLINT, PLAIN_ENCODING>();
230
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_SMALLINT, FOR_ENCODING>();
231
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_INT, BIT_SHUFFLE>();
232
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_INT, PLAIN_ENCODING>();
233
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_INT, FOR_ENCODING>();
234
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BIGINT, BIT_SHUFFLE>();
235
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BIGINT, PLAIN_ENCODING>();
236
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BIGINT, FOR_ENCODING>();
237
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_LARGEINT, BIT_SHUFFLE>();
238
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_LARGEINT, PLAIN_ENCODING>();
239
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_LARGEINT, FOR_ENCODING>();
240
241
    // unsigned integers
242
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_UNSIGNED_BIGINT, BIT_SHUFFLE>();
243
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT, BIT_SHUFFLE>();
244
245
    // FLOAT / DOUBLE
246
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_FLOAT, BIT_SHUFFLE>();
247
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_FLOAT, PLAIN_ENCODING>();
248
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DOUBLE, BIT_SHUFFLE>();
249
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DOUBLE, PLAIN_ENCODING>();
250
251
    // binary types (CHAR/VARCHAR/STRING/JSONB/VARIANT)
252
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_CHAR, DICT_ENCODING>();
253
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_CHAR, PLAIN_ENCODING>();
254
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_CHAR, PLAIN_ENCODING_V2>();
255
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_CHAR, PREFIX_ENCODING>();
256
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARCHAR, DICT_ENCODING>();
257
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARCHAR, PLAIN_ENCODING>();
258
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARCHAR, PLAIN_ENCODING_V2>();
259
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARCHAR, PREFIX_ENCODING>();
260
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_STRING, DICT_ENCODING>();
261
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_STRING, PLAIN_ENCODING>();
262
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_STRING, PLAIN_ENCODING_V2>();
263
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_STRING, PREFIX_ENCODING>();
264
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_JSONB, DICT_ENCODING>();
265
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_JSONB, PLAIN_ENCODING>();
266
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_JSONB, PLAIN_ENCODING_V2>();
267
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_JSONB, PREFIX_ENCODING>();
268
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARIANT, DICT_ENCODING>();
269
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARIANT, PLAIN_ENCODING>();
270
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARIANT, PLAIN_ENCODING_V2>();
271
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_VARIANT, PREFIX_ENCODING>();
272
273
    // BOOL
274
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BOOL, RLE>();
275
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BOOL, BIT_SHUFFLE>();
276
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BOOL, PLAIN_ENCODING>();
277
278
    // date / datetime
279
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATE, BIT_SHUFFLE>();
280
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATE, PLAIN_ENCODING>();
281
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATE, FOR_ENCODING>();
282
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATEV2, BIT_SHUFFLE>();
283
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATEV2, PLAIN_ENCODING>();
284
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATEV2, FOR_ENCODING>();
285
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATETIMEV2, BIT_SHUFFLE>();
286
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATETIMEV2, PLAIN_ENCODING>();
287
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATETIMEV2, FOR_ENCODING>();
288
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATETIME, BIT_SHUFFLE>();
289
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATETIME, PLAIN_ENCODING>();
290
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DATETIME, FOR_ENCODING>();
291
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ, BIT_SHUFFLE>();
292
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ, PLAIN_ENCODING>();
293
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ, FOR_ENCODING>();
294
295
    // decimal
296
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL, BIT_SHUFFLE>();
297
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL, PLAIN_ENCODING>();
298
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL32, BIT_SHUFFLE>();
299
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL32, PLAIN_ENCODING>();
300
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL64, BIT_SHUFFLE>();
301
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL64, PLAIN_ENCODING>();
302
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL128I, BIT_SHUFFLE>();
303
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL128I, PLAIN_ENCODING>();
304
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL256, BIT_SHUFFLE>();
305
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_DECIMAL256, PLAIN_ENCODING>();
306
307
    // ip
308
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_IPV4, BIT_SHUFFLE>();
309
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_IPV4, PLAIN_ENCODING>();
310
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_IPV6, BIT_SHUFFLE>();
311
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_IPV6, PLAIN_ENCODING>();
312
313
    // aggregate / binary-flavored types
314
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_HLL, PLAIN_ENCODING>();
315
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_HLL, PLAIN_ENCODING_V2>();
316
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BITMAP, PLAIN_ENCODING>();
317
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_BITMAP, PLAIN_ENCODING_V2>();
318
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_QUANTILE_STATE, PLAIN_ENCODING>();
319
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_QUANTILE_STATE, PLAIN_ENCODING_V2>();
320
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_AGG_STATE, PLAIN_ENCODING>();
321
11
    _register_supported_encoding<FieldType::OLAP_FIELD_TYPE_AGG_STATE, PLAIN_ENCODING_V2>();
322
323
    // ===== Phase 2a: V2 defaults (write path, V1/V2 segments) =====
324
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_TINYINT, BIT_SHUFFLE>();
325
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_SMALLINT, BIT_SHUFFLE>();
326
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_INT, BIT_SHUFFLE>();
327
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_BIGINT, BIT_SHUFFLE>();
328
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_LARGEINT, BIT_SHUFFLE>();
329
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_UNSIGNED_BIGINT, BIT_SHUFFLE>();
330
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT, BIT_SHUFFLE>();
331
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_FLOAT, BIT_SHUFFLE>();
332
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_DOUBLE, BIT_SHUFFLE>();
333
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_CHAR, DICT_ENCODING>();
334
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_VARCHAR, DICT_ENCODING>();
335
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_STRING, DICT_ENCODING>();
336
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_JSONB, DICT_ENCODING>();
337
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_VARIANT, DICT_ENCODING>();
338
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_BOOL, RLE>();
339
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_DATE, BIT_SHUFFLE>();
340
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_DATEV2, BIT_SHUFFLE>();
341
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_DATETIMEV2, BIT_SHUFFLE>();
342
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_DATETIME, BIT_SHUFFLE>();
343
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ, BIT_SHUFFLE>();
344
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_DECIMAL, BIT_SHUFFLE>();
345
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_DECIMAL32, BIT_SHUFFLE>();
346
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_DECIMAL64, BIT_SHUFFLE>();
347
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_DECIMAL128I, BIT_SHUFFLE>();
348
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_DECIMAL256, BIT_SHUFFLE>();
349
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_IPV4, BIT_SHUFFLE>();
350
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_IPV6, BIT_SHUFFLE>();
351
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_HLL, PLAIN_ENCODING>();
352
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_BITMAP, PLAIN_ENCODING>();
353
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_QUANTILE_STATE, PLAIN_ENCODING>();
354
11
    _set_v2_default<FieldType::OLAP_FIELD_TYPE_AGG_STATE, PLAIN_ENCODING>();
355
356
    // ===== Phase 2b: V3 defaults (write path, V3 segments) =====
357
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_TINYINT, PLAIN_ENCODING>();
358
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_SMALLINT, PLAIN_ENCODING>();
359
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_INT, PLAIN_ENCODING>();
360
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_BIGINT, PLAIN_ENCODING>();
361
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_LARGEINT, PLAIN_ENCODING>();
362
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_UNSIGNED_BIGINT, BIT_SHUFFLE>();
363
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_UNSIGNED_INT, BIT_SHUFFLE>();
364
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_FLOAT, BIT_SHUFFLE>();
365
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_DOUBLE, BIT_SHUFFLE>();
366
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_CHAR, DICT_ENCODING>();
367
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_VARCHAR, DICT_ENCODING>();
368
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_STRING, DICT_ENCODING>();
369
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_JSONB, DICT_ENCODING>();
370
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_VARIANT, DICT_ENCODING>();
371
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_BOOL, RLE>();
372
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_DATE, BIT_SHUFFLE>();
373
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_DATEV2, BIT_SHUFFLE>();
374
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_DATETIMEV2, BIT_SHUFFLE>();
375
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_DATETIME, BIT_SHUFFLE>();
376
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_TIMESTAMPTZ, BIT_SHUFFLE>();
377
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_DECIMAL, BIT_SHUFFLE>();
378
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_DECIMAL32, BIT_SHUFFLE>();
379
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_DECIMAL64, BIT_SHUFFLE>();
380
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_DECIMAL128I, BIT_SHUFFLE>();
381
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_DECIMAL256, BIT_SHUFFLE>();
382
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_IPV4, BIT_SHUFFLE>();
383
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_IPV6, BIT_SHUFFLE>();
384
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_HLL, PLAIN_ENCODING_V2>();
385
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_BITMAP, PLAIN_ENCODING_V2>();
386
11
    _set_v3_default<FieldType::OLAP_FIELD_TYPE_QUANTILE_STATE, PLAIN_ENCODING_V2>();
387
11
    _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
11
    _set_index_column_encoding<FieldType::OLAP_FIELD_TYPE_VARCHAR, PREFIX_ENCODING>();
395
11
}
396
397
10
EncodingInfoResolver::~EncodingInfoResolver() {
398
810
    for (auto& it : _encoding_map) {
399
810
        delete it.second;
400
810
    }
401
10
    _encoding_map.clear();
402
10
}
403
404
10.5k
EncodingTypePB EncodingInfoResolver::get_v2_default_encoding(FieldType type) const {
405
10.5k
    return _lookup(_v2_default_map, type);
406
10.5k
}
407
408
2.31k
EncodingTypePB EncodingInfoResolver::get_v3_default_encoding(FieldType type) const {
409
2.31k
    return _lookup(_v3_default_map, type);
410
2.31k
}
411
412
110
EncodingTypePB EncodingInfoResolver::get_index_column_encoding(FieldType type) const {
413
110
    return _lookup(_index_column_encoding_map, type);
414
110
}
415
416
Status EncodingInfoResolver::get(FieldType data_type, EncodingTypePB encoding_type,
417
43.4k
                                 const EncodingInfo** out) {
418
43.4k
    auto key = std::make_pair(data_type, encoding_type);
419
43.4k
    auto it = _encoding_map.find(key);
420
43.4k
    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
43.4k
    *out = it->second;
425
43.4k
    return Status::OK();
426
43.4k
}
427
428
template <typename TraitsClass>
429
EncodingInfo::EncodingInfo(TraitsClass traits)
430
891
        : _create_builder_func(TraitsClass::create_page_builder),
431
891
          _create_decoder_func(TraitsClass::create_page_decoder),
432
891
          _type(TraitsClass::type),
433
891
          _encoding(TraitsClass::encoding) {
434
891
    if (_encoding == BIT_SHUFFLE) {
435
242
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
649
    } else if (_encoding == DICT_ENCODING) {
437
55
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
11
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
44
        } else {
440
44
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
44
        }
442
594
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
319
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
11
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
11
        }
448
319
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
99
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
11
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
88
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
88
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<false>>();
460
88
        } 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
99
    }
467
891
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE1ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE3ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE5ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE7ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE9ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE8ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE6ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE10ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE11ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE5EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
11
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
11
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
        } else {
440
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } 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
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
11
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
11
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
11
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } 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
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain 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
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
11
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
11
            _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
11
    }
467
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE13ELNS0_14EncodingTypePBE3EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } 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
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain 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
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE5EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
11
        } else {
440
11
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
11
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
11
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
11
            _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
11
    }
467
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE17ELNS0_14EncodingTypePBE3EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE5EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
11
        } else {
440
11
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
11
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
11
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
11
            _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
11
    }
467
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE26ELNS0_14EncodingTypePBE3EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE5EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
11
        } else {
440
11
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
11
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
11
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
11
            _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
11
    }
467
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE34ELNS0_14EncodingTypePBE3EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE5EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
11
        } else {
440
11
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
11
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
11
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
11
            _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
11
    }
467
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE35ELNS0_14EncodingTypePBE3EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE4EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE24ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE14ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE28ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE29ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE15ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE40ELNS0_14EncodingTypePBE7EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE16ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE31ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE32ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE33ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE37ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE38ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE6EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
11
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE39ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE23ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
11
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
11
            _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
11
    }
467
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE25ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
11
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
11
            _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
11
    }
467
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE27ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
11
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
11
            _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
11
    }
467
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE2EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice 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
11
}
_ZN5doris10segment_v212EncodingInfoC2INS0_14EncodingTraitsILNS_9FieldTypeE36ELNS0_14EncodingTypePBE8EEEEET_
Line
Count
Source
430
11
        : _create_builder_func(TraitsClass::create_page_builder),
431
11
          _create_decoder_func(TraitsClass::create_page_decoder),
432
11
          _type(TraitsClass::type),
433
11
          _encoding(TraitsClass::encoding) {
434
11
    if (_encoding == BIT_SHUFFLE) {
435
0
        _data_page_pre_decoder = std::make_unique<BitShufflePagePreDecoder>();
436
11
    } else if (_encoding == DICT_ENCODING) {
437
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
438
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<true>>();
439
0
        } else {
440
0
            _data_page_pre_decoder = std::make_unique<BinaryDictPagePreDecoder<false>>();
441
0
        }
442
11
    } else if (_encoding == PLAIN_ENCODING) {
443
        // CHAR plain pages may contain trailing '\0' padding written by older
444
        // BEs; strip it once at page load so the cached page is unpadded.
445
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
446
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageCharStripPreDecoder>();
447
        }
448
11
    } else if (_encoding == PLAIN_ENCODING_V2) {
449
        // Only binary types (Slice) need the predecoder for PLAIN_ENCODING_V2 — it converts
450
        // varint-encoded lengths to an offset-array format that downstream Slice decoders expect.
451
        // CHAR pages additionally strip trailing '\0' padding written by the convertor; other
452
        // Slice types use the non-CHAR specialization. All current (type, PLAIN_ENCODING_V2)
453
        // registrations are Slice (CHAR/VARCHAR/STRING/JSONB/VARIANT/HLL/BITMAP/QUANTILE_STATE/
454
        // AGG_STATE per storage/types.h). The else throws at construction time to fail loudly
455
        // if a future non-Slice registration is added.
456
        if constexpr (TraitsClass::type == FieldType::OLAP_FIELD_TYPE_CHAR) {
457
            _data_page_pre_decoder = std::make_unique<BinaryPlainPageV2PreDecoder<true>>();
458
11
        } else if constexpr (std::is_same_v<typename TraitsClass::CppType, Slice>) {
459
11
            _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
11
    }
467
11
}
468
469
#ifdef BE_TEST
470
static EncodingInfoResolver s_encoding_info_resolver;
471
#endif
472
473
43.4k
Status EncodingInfo::get(FieldType type, EncodingTypePB encoding_type, const EncodingInfo** out) {
474
43.4k
#ifdef BE_TEST
475
43.4k
    return s_encoding_info_resolver.get(type, encoding_type, out);
476
#else
477
    auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver();
478
    if (resolver == nullptr) {
479
        return Status::InternalError("EncodingInfoResolver not initialized");
480
    }
481
    return resolver->get(type, encoding_type, out);
482
#endif
483
43.4k
}
484
485
10.5k
EncodingTypePB EncodingInfo::get_v2_default_encoding(FieldType type) {
486
10.5k
#ifdef BE_TEST
487
10.5k
    return s_encoding_info_resolver.get_v2_default_encoding(type);
488
#else
489
    auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver();
490
    if (resolver == nullptr) {
491
        return UNKNOWN_ENCODING;
492
    }
493
    return resolver->get_v2_default_encoding(type);
494
#endif
495
10.5k
}
496
497
2.31k
EncodingTypePB EncodingInfo::get_v3_default_encoding(FieldType type) {
498
2.31k
#ifdef BE_TEST
499
2.31k
    return s_encoding_info_resolver.get_v3_default_encoding(type);
500
#else
501
    auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver();
502
    if (resolver == nullptr) {
503
        return UNKNOWN_ENCODING;
504
    }
505
    return resolver->get_v3_default_encoding(type);
506
#endif
507
2.31k
}
508
509
110
EncodingTypePB EncodingInfo::get_index_column_encoding(FieldType type) {
510
110
#ifdef BE_TEST
511
110
    return s_encoding_info_resolver.get_index_column_encoding(type);
512
#else
513
    auto* resolver = ExecEnv::GetInstance()->get_encoding_info_resolver();
514
    if (resolver == nullptr) {
515
        return UNKNOWN_ENCODING;
516
    }
517
    return resolver->get_index_column_encoding(type);
518
#endif
519
110
}
520
521
EncodingTypePB EncodingInfo::resolve_default_encoding(TabletStorageFormatPB storage_format,
522
12.6k
                                                      const TabletColumn& column) {
523
12.6k
    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
12.6k
    if (column.is_row_store_column()) {
528
1
        return is_v3 ? PLAIN_ENCODING_V2 : PLAIN_ENCODING;
529
1
    }
530
12.6k
    return is_v3 ? get_v3_default_encoding(column.type()) : get_v2_default_encoding(column.type());
531
12.6k
}
532
533
Status EncodingInfo::create_page_builder(const PageBuilderOptions& opts,
534
5.39k
                                         std::unique_ptr<PageBuilder>& builder) const {
535
5.39k
    PageBuilder* raw_builder = nullptr;
536
5.39k
    RETURN_IF_ERROR(_create_builder_func(opts, &raw_builder));
537
5.39k
    builder.reset(raw_builder);
538
5.39k
    return Status::OK();
539
5.39k
}
540
541
Status EncodingInfo::create_page_decoder(const Slice& data, const PageDecoderOptions& opts,
542
2.76k
                                         std::unique_ptr<PageDecoder>& decoder) const {
543
2.76k
    PageDecoder* raw_decoder = nullptr;
544
2.76k
    RETURN_IF_ERROR(_create_decoder_func(data, opts, &raw_decoder));
545
2.76k
    decoder.reset(raw_decoder);
546
2.76k
    return Status::OK();
547
2.76k
}
548
549
} // namespace segment_v2
550
} // namespace doris