Coverage Report

Created: 2026-03-13 19:41

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
#include "common/compile_check_begin.h"
37
class BoolRLEDecoder final : public Decoder {
38
public:
39
6
    BoolRLEDecoder() = default;
40
6
    ~BoolRLEDecoder() override = default;
41
42
    Status set_data(Slice* slice) override;
43
44
    Status decode_values(MutableColumnPtr& doris_column, DataTypePtr& data_type,
45
                         ColumnSelectVector& select_vector, bool is_dict_filter) override;
46
47
    template <bool has_filter>
48
    Status _decode_values(MutableColumnPtr& doris_column, DataTypePtr& data_type,
49
                          ColumnSelectVector& select_vector, bool is_dict_filter);
50
51
    Status skip_values(size_t num_values) override;
52
53
private:
54
    RleDecoder<uint8_t> _decoder;
55
    std::vector<uint8_t> _values;
56
    size_t _num_bytes;
57
};
58
#include "common/compile_check_end.h"
59
60
} // namespace doris