iceberg-cpp
Loading...
Searching...
No Matches
incremental_append_scan.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 <cstdint>
26#include <memory>
27#include <optional>
28#include <vector>
29
31#include "iceberg/result.h"
32#include "iceberg/table_scan.h"
33#include "iceberg/type_fwd.h"
34
35namespace iceberg {
36
38class ICEBERG_EXPORT IncrementalAppendScan : public IncrementalScan<FileScanTask> {
39 public:
42 std::shared_ptr<TableMetadata> metadata, std::shared_ptr<Schema> schema,
43 std::shared_ptr<FileIO> io, internal::TableScanContext context);
44
45 ~IncrementalAppendScan() override = default;
46
47 Result<std::vector<std::shared_ptr<FileScanTask>>> PlanFiles() const override;
48
49 protected:
51 std::optional<int64_t> from_snapshot_id_exclusive,
52 int64_t to_snapshot_id_inclusive) const override;
53
54 using IncrementalScan::IncrementalScan;
55};
56
57extern template class ICEBERG_EXTERN_TEMPLATE_CLASS_EXPORT
59
60} // namespace iceberg
A scan that reads data files added between snapshots (incremental appends).
Definition incremental_append_scan.h:38
static Result< std::unique_ptr< IncrementalAppendScan > > Make(std::shared_ptr< TableMetadata > metadata, std::shared_ptr< Schema > schema, std::shared_ptr< FileIO > io, internal::TableScanContext context)
Constructs an IncrementalAppendScan instance.
A base template class for incremental scans that read changes between snapshots, and return scan task...
Definition table_scan.h:510
Builder class for creating TableScan instances.
Definition table_scan.h:293
Definition expected.h:1199
Define symbol visibility macros for core Iceberg APIs.
Core Apache Iceberg C++ APIs.
Definition arrow_io_util.h:34
Define Result, Status, and error helpers.
Definition table_scan.h:260
Define table scan APIs and scan task types.