Coverage Report

Created: 2026-04-15 14:28

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/format/parquet/bool_rle_decoder.h
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
#pragma once
19
20
#include <stddef.h>
21
#include <stdint.h>
22
23
#include <vector>
24
25
#include "common/status.h"
26
#include "core/data_type/data_type.h"
27
#include "format/parquet/decoder.h"
28
#include "util/rle_encoding.h"
29
30
namespace doris {
31
class ColumnSelectVector;
32
struct Slice;
33
} // namespace doris
34
35
namespace doris {
36
class BoolRLEDecoder final : public Decoder {
37
public:
38
6
    BoolRLEDecoder() = default;
39
6
    ~BoolRLEDecoder() override = default;
40
41
    Status set_data(Slice* slice) override;
42
43
    Status decode_values(MutableColumnPtr& doris_column, DataTypePtr& data_type,
44
                         ColumnSelectVector& select_vector, bool is_dict_filter) override;
45
46
    template <bool has_filter>
47
    Status _decode_values(MutableColumnPtr& doris_column, DataTypePtr& data_type,
48
                          ColumnSelectVector& select_vector, bool is_dict_filter);
49
50
    Status skip_values(size_t num_values) override;
51
52
private:
53
    RleDecoder<uint8_t> _decoder;
54
    std::vector<uint8_t> _values;
55
    size_t _num_bytes;
56
};
57
58
} // namespace doris