Coverage Report

Created: 2026-03-16 21:05

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/format/table/hudi_reader.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 "format/table/hudi_reader.h"
19
20
#include <vector>
21
22
#include "common/status.h"
23
#include "runtime/runtime_state.h"
24
25
namespace doris {
26
#include "common/compile_check_begin.h"
27
28
0
Status HudiReader::get_next_block_inner(Block* block, size_t* read_rows, bool* eof) {
29
0
    RETURN_IF_ERROR(_file_format_reader->get_next_block(block, read_rows, eof));
30
0
    return Status::OK();
31
0
};
32
33
Status HudiParquetReader::init_reader(
34
        const std::vector<std::string>& read_table_col_names,
35
        std::unordered_map<std::string, uint32_t>* col_name_to_block_idx,
36
        const VExprContextSPtrs& conjuncts,
37
        phmap::flat_hash_map<int, std::vector<std::shared_ptr<ColumnPredicate>>>&
38
                slot_id_to_predicates,
39
        const TupleDescriptor* tuple_descriptor, const RowDescriptor* row_descriptor,
40
        const std::unordered_map<std::string, int>* colname_to_slot_id,
41
        const VExprContextSPtrs* not_single_slot_filter_conjuncts,
42
0
        const std::unordered_map<int, VExprContextSPtrs>* slot_id_to_filter_conjuncts) {
43
0
    auto* parquet_reader = static_cast<ParquetReader*>(_file_format_reader.get());
44
0
    const FieldDescriptor* field_desc = nullptr;
45
0
    RETURN_IF_ERROR(parquet_reader->get_file_metadata_schema(&field_desc));
46
0
    DCHECK(field_desc != nullptr);
47
48
0
    auto parquet_fields_schema = field_desc->get_fields_schema();
49
0
    RETURN_IF_ERROR(gen_table_info_node_by_field_id(
50
0
            _params, _range.table_format_params.hudi_params.schema_id, tuple_descriptor,
51
0
            *field_desc));
52
0
    return parquet_reader->init_reader(read_table_col_names, col_name_to_block_idx, conjuncts,
53
0
                                       slot_id_to_predicates, tuple_descriptor, row_descriptor,
54
0
                                       colname_to_slot_id, not_single_slot_filter_conjuncts,
55
0
                                       slot_id_to_filter_conjuncts, table_info_node_ptr);
56
0
}
57
58
#include "common/compile_check_end.h"
59
} // namespace doris