iceberg-cpp
Loading...
Searching...
No Matches
v1_metadata_internal.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
23
25
26namespace iceberg {
27
30 public:
31 ManifestEntryAdapterV1(std::optional<int64_t> snapshot_id,
32 std::shared_ptr<PartitionSpec> partition_spec,
33 std::shared_ptr<Schema> current_schema);
34
35 Status Init() override;
36 Status Append(const ManifestEntry& entry) override;
37
38 static std::shared_ptr<Schema> EntrySchema(std::shared_ptr<StructType> partition_type);
39 static std::shared_ptr<Schema> WrapFileSchema(std::shared_ptr<StructType> file_schema);
40 static std::shared_ptr<StructType> DataFileSchema(
41 std::shared_ptr<StructType> partition_type);
42};
43
46 public:
47 ManifestFileAdapterV1(int64_t snapshot_id, std::optional<int64_t> parent_snapshot_id)
48 : snapshot_id_(snapshot_id), parent_snapshot_id_(parent_snapshot_id) {}
49 Status Init() override;
50 Status Append(const ManifestFile& file) override;
51
52 static const std::shared_ptr<Schema> kManifestListSchema;
53
54 private:
55 int64_t snapshot_id_;
56 std::optional<int64_t> parent_snapshot_id_;
57};
58
59} // namespace iceberg
Adapter to convert V1 ManifestEntry to ArrowArray.
Definition v1_metadata_internal.h:29
Adapter for appending a list of ManifestEntrys to an ArrowArray. Implemented by different versions wi...
Definition manifest_adapter_internal.h:61
Adapter to convert V1 ManifestFile to ArrowArray.
Definition v1_metadata_internal.h:45
Adapter for appending a list of ManifestFiles to an ArrowArray. Implemented by different versions wit...
Definition manifest_adapter_internal.h:110
A manifest is an immutable Avro file that lists data files or delete files, along with each file's pa...
Definition manifest_entry.h:307
Entry in a manifest list.
Definition manifest_list.h:85