Coverage Report

Created: 2026-04-05 12:58

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/format/table/hudi_reader.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
#pragma once
18
#include <memory>
19
#include <vector>
20
21
#include "format/orc/vorc_reader.h"
22
#include "format/parquet/vparquet_reader.h"
23
#include "format/table/table_schema_change_helper.h"
24
namespace doris {
25
#include "common/compile_check_begin.h"
26
27
// HudiParquetReader: directly inherits ParquetReader (no composition wrapping).
28
// Schema mapping is done in on_before_init_reader hook via field_id matching.
29
class HudiParquetReader final : public ParquetReader, public TableSchemaChangeHelper {
30
public:
31
    ENABLE_FACTORY_CREATOR(HudiParquetReader);
32
    HudiParquetReader(RuntimeProfile* profile, const TFileScanRangeParams& params,
33
                      const TFileRangeDesc& range, size_t batch_size, const cctz::time_zone* ctz,
34
                      io::IOContext* io_ctx, RuntimeState* state,
35
                      FileMetaCache* meta_cache = nullptr, bool enable_lazy_mat = true)
36
0
            : ParquetReader(profile, params, range, batch_size, ctz, io_ctx, state, meta_cache,
37
0
                            enable_lazy_mat) {}
38
0
    ~HudiParquetReader() final = default;
39
40
protected:
41
    Status on_before_init_reader(ReaderInitContext* ctx) override;
42
};
43
44
// HudiOrcReader: directly inherits OrcReader (no composition wrapping).
45
class HudiOrcReader final : public OrcReader, public TableSchemaChangeHelper {
46
public:
47
    ENABLE_FACTORY_CREATOR(HudiOrcReader);
48
    HudiOrcReader(RuntimeProfile* profile, RuntimeState* state, const TFileScanRangeParams& params,
49
                  const TFileRangeDesc& range, size_t batch_size, const std::string& ctz,
50
                  io::IOContext* io_ctx, FileMetaCache* meta_cache = nullptr,
51
                  bool enable_lazy_mat = true)
52
0
            : OrcReader(profile, state, params, range, batch_size, ctz, io_ctx, meta_cache,
53
0
                        enable_lazy_mat) {}
54
0
    ~HudiOrcReader() final = default;
55
56
protected:
57
    Status on_before_init_reader(ReaderInitContext* ctx) override;
58
};
59
60
#include "common/compile_check_end.h"
61
} // namespace doris