iceberg-cpp
Loading...
Searching...
No Matches
rest_table.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
22#include <memory>
23#include <string>
24
27#include "iceberg/result.h"
28#include "iceberg/table.h"
29#include "iceberg/type_fwd.h"
30
33
34namespace iceberg::rest {
35
38class ICEBERG_REST_EXPORT RestTable final : public Table {
39 public:
41 TableIdentifier identifier, std::shared_ptr<TableMetadata> metadata,
42 std::string metadata_location, std::shared_ptr<FileIO> io,
43 std::shared_ptr<Catalog> catalog, std::string full_name,
44 std::shared_ptr<MetricsReporter> reporter, RestScanContext rest_context,
45 std::unique_ptr<Labels> labels = nullptr);
46
47 ~RestTable() override;
48
52
55 const override;
56
57 private:
58 RestTable(TableIdentifier identifier, std::shared_ptr<TableMetadata> metadata,
59 std::string metadata_location, std::shared_ptr<FileIO> io,
60 std::shared_ptr<Catalog> catalog, std::string full_name,
61 std::shared_ptr<MetricsReporter> reporter, RestScanContext rest_context,
62 std::unique_ptr<Labels> labels);
63
64 std::shared_ptr<const RestScanContext> rest_context_;
65};
66
67} // namespace iceberg::rest
Represents an Iceberg table.
Definition table.h:45
Definition expected.h:1199
A Table whose NewScan() returns a RestTableScanBuilder, delegating PlanFiles() to the REST catalog se...
Definition rest_table.h:38
Result< std::unique_ptr< IncrementalAppendScanBuilder > > NewIncrementalAppendScan() const override
Returns a RestIncrementalAppendScanBuilder that delegates to the server.
Result< std::unique_ptr< DataTableScanBuilder > > NewScan() const override
Returns a RestTableScanBuilder that will delegate PlanFiles() to the REST catalog server.
Define symbol visibility macros for the REST catalog library.
REST catalog APIs.
Definition auth_manager.h:34
Define Result, Status, and error helpers.
Identifies a table in iceberg catalog.
Definition table_identifier.h:46
REST table context shared by its builders, scans and task streams.
Definition rest_table_scan.h:47
Define table abstractions and update entry points.