iceberg-cpp
Loading...
Searching...
No Matches
file_scan_task_reader.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 <string>
27#include <unordered_map>
28#include <vector>
29
32#include "iceberg/result.h"
33#include "iceberg/type_fwd.h"
34
35namespace iceberg {
36
47class ICEBERG_DATA_EXPORT FileScanTaskReader {
48 public:
50 struct Options {
52 std::shared_ptr<FileIO> io;
54 std::shared_ptr<Schema> table_schema;
56 std::vector<std::shared_ptr<Schema>> schemas;
64 std::shared_ptr<Schema> projected_schema;
67 bool case_sensitive = true;
69 std::shared_ptr<NameMapping> name_mapping;
71 std::unordered_map<std::string, std::string> properties;
75 bool apply_residuals{false};
76 };
77
80
82
96
98 FileScanTaskReader& operator=(const FileScanTaskReader&) = delete;
99
100 private:
101 class Impl;
102 explicit FileScanTaskReader(std::unique_ptr<Impl> impl);
103 std::unique_ptr<Impl> impl_;
104};
105
106} // namespace iceberg
Opens a FileScanTask as an ArrowArrayStream.
Definition file_scan_task_reader.h:47
Result< ArrowArrayStream > Open(const FileScanTask &task)
Open a task and return an Arrow C stream for its projected live rows.
static Result< std::unique_ptr< FileScanTaskReader > > Make(Options options)
Create a reusable task reader from shared read context.
Task representing a data file and its corresponding delete files.
Definition table_scan.h:68
Definition expected.h:1199
Define symbol visibility macros for data APIs.
Core Apache Iceberg C++ APIs.
Definition arrow_io_util.h:34
Define Result, Status, and error helpers.
Options shared by all tasks opened by this reader.
Definition file_scan_task_reader.h:50
std::shared_ptr< Schema > projected_schema
Definition file_scan_task_reader.h:64
std::shared_ptr< NameMapping > name_mapping
Optional name mapping for files written without field IDs.
Definition file_scan_task_reader.h:69
std::shared_ptr< Schema > table_schema
The table schema. Used as the primary field lookup for delete file resolution.
Definition file_scan_task_reader.h:54
std::vector< std::shared_ptr< Schema > > schemas
Optional list of historical table schemas for field lookup.
Definition file_scan_task_reader.h:56
std::shared_ptr< FileIO > io
FileIO instance for reading data and delete files.
Definition file_scan_task_reader.h:52
std::unordered_map< std::string, std::string > properties
Format-specific or implementation-specific options for data readers.
Definition file_scan_task_reader.h:71