iceberg-cpp
Loading...
Searching...
No Matches
delete_loader.h
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20#pragma once
21
24
25#include <memory>
26#include <span>
27#include <string_view>
28
29#include "iceberg/iceberg_data_export.h"
30#include "iceberg/result.h"
31#include "iceberg/type_fwd.h"
32
33namespace iceberg {
34
36class ICEBERG_DATA_EXPORT DeleteLoader {
37 public:
40 explicit DeleteLoader(std::shared_ptr<FileIO> io);
41
43
54 Result<PositionDeleteIndex> LoadPositionDeletes(
55 std::span<const std::shared_ptr<DataFile>> delete_files,
56 std::string_view data_file_path) const;
57
64 Result<std::unique_ptr<UncheckedStructLikeSet>> LoadEqualityDeletes(
65 std::span<const std::shared_ptr<DataFile>> delete_files,
66 const StructType& equality_type) const;
67
68 private:
70 Status LoadPositionDelete(const DataFile& file, PositionDeleteIndex& index,
71 std::string_view data_file_path) const;
72
74 Status LoadDV(const DataFile& file, PositionDeleteIndex& index) const;
75
76 std::shared_ptr<FileIO> io_;
77};
78
79} // namespace iceberg
Loads delete files and constructs in-memory delete indexes.
Definition delete_loader.h:36
Tracks deleted row positions using a bitmap.
Definition position_delete_index.h:38
A data type representing a struct with nested fields.
Definition type.h:108
DataFile carries data file path, partition tuple, metrics, ...
Definition manifest_entry.h:62